Stop Using /init for AGENTS.md
Addy Osmani ยท article ยท 2026-02-23 source โ Reader ๐ฅ๏ธ
Agent SkillsAgent Context Files (CLAUDE.md / AGENTS.md)Context EngineeringContext Rot & Context LimitsIntent DebtProgressive Disclosure
AGENTS.md should hold only project-specific facts an agent cannot discover by reading the code itself โ because auto-generated, comprehensiveness-optimized context files duplicate what agents already find on their own and measurably slow and bias them โ and the file should function as a living log of unfixed codebase friction to be resolved in the code, not as a permanent, ever-growing configuration.
practical ยท argumentative โ Builds an evidence-based case against a widespread practice (/init-generated AGENTS.md) and argues for a specific alternative practice (treat AGENTS.md as a diagnostic, friction-tracking artifact; move toward a layered, selectively-loaded context architecture).
Structure
| Part | Role |
|---|---|
| Two 2026 papers (Lulla et al., ICSE JAWs; ETH Zurich) compared with and without AGENTS.md | evidence |
| Reconciliation: auto-generated files are redundant (duplicate discoverable info), human-written files with non-discoverable project facts help | synthesis of the two studies' apparently conflicting results |
| The anchoring / 'pink elephant' effect of mentioning anything in a flat context file | additional cost mechanism beyond raw token/discoverability waste |
| Case against /init specifically: its output is 99-100% codebase overview, i.e. pure redundancy | application of the discoverability filter to the concrete, common ritual |
| What earns a line: the uv-vs-pip usage-rate data | evidence for a concrete inclusion criterion |
| The static-file problem: a flat file can't condition on task type | architectural critique, independent of content quality |
| ACE framework and the proposed three-layer (protocol file / focused persona-skill files / maintenance subagent) architecture | proposed solution to the architectural problem |
| Arize AI automated prompt-optimization results | evidence that even expert human intuition about content misjudges what helps the model |
| Reframe: AGENTS.md as diagnostic tool for codebase friction, to be fixed in code and then deleted | conclusion / practical mindset |
| Limitations of both papers (no correctness measure; fresh-file-only scenario; no layered architecture tested; model-trajectory decay) | qualification |
Key terms
- pink elephant problem
The anchoring effect of merely mentioning something in a context file: once stated, it occupies every subsequent prompt's context and biases the agent toward it, because the model cannot distinguish 'this is what we used to do' from 'this is what you should do.' - discoverability filter
The practical test for whether a line belongs in AGENTS.md: can the agent find this itself by reading the code? If yes, it's noise and should be deleted. - protocol file (Layer 1)
What AGENTS.md should actually be: not a codebase overview or style guide, but a routing document โ available personas/skills and when to invoke them, available MCP connections, and only the minimum facts the agent genuinely cannot discover. - AGENTS.md as living list of friction
A diagnostic artifact: every line added is a signal that something in the codebase is confusing enough to trip an agent (and likely a new human), to be investigated and fixed in the code itself, after which the line should be deletable.
Propositions
- explicitA paired experiment on 124 real GitHub PRs (Lulla et al., ICSE JAWs 2026) found that the presence of an AGENTS.md file reduced median wall-clock runtime by 28.64% and output token consumption by 16.58%, holding task, repo, and agent constant.conf: highsupportsAudit your Agent files ยท p4 โ Both find context files don't cleanly improve correctness at scale (audit-your-agent-files: 288 runs, no clear gain; here: efficiency gain measured but correctness untested) โ convergent caution against assuming AGENTS.md helps output quality.
- explicitA separate ETH Zurich study found that LLM-generated (auto-generated) context files reduced task success by 2-3% while increasing cost by over 20%, whereas developer-written files improved success by about 4% while increasing cost by up to 19%.conf: high
- explicitAuto-generated context content is not inert but actively redundant: when the ETH Zurich team stripped all existing documentation from repos before testing, the same LLM-generated files then improved performance by 2.7%, showing the content itself has value but duplicates what the agent could already find in the repo.conf: highsupportsThe Anatomy of an Agent Harness ยท p5 โ Both cite the same context-degradation research lineage (Lost in the Middle / Levy et al.) to argue that adding content, even accurate content, has a real attention cost distinct from whether the content is 'wrong.'
- explicitMerely stating a fact in AGENTS.md (e.g. a legacy tech-stack detail) biases the agent toward that pattern on every future prompt, because the model does not distinguish 'this is what we used to do' from 'this is what you should do' โ an anchoring cost independent of the fact's accuracy.conf: high
- explicitThe ETH Zurich paper found that /init-style auto-generation is overwhelmingly codebase-overview content: 100% of Sonnet 4.5's and 99% of GPT-5.2's auto-generated context files contained codebase overviews โ exactly the content an agent discovers anyway by listing directories and reading READMEs.conf: high
- explicitThe right inclusion test for an AGENTS.md line is whether it is non-discoverable from the codebase, operationally significant, and impossible to guess by convention (e.g. 'use uv, not pip' โ which raised per-task tool usage from under 0.01 to 1.6 when stated) โ not whether it is true or helpful to a human reader.conf: highsupportsYour AGENTS.md might be a big problem ยท p7 โ Both converge on the same editorial principle โ fewer, well-chosen, non-discoverable instructions beat exhaustive coverage โ from independent evidence (usage-rate data here, instruction-budget limits there).
- explicitA flat, static context file cannot condition on task type, so instructions irrelevant to the current task (e.g. 'always run the full test suite' during a documentation-only change) are still applied, wasting tokens and time โ a structural limitation that no amount of content pruning fixes.conf: highextendsYour AGENTS.md might be a big problem ยท p6 โ Pocock's piece shows nested files defer cost by loading selectively; this article generalizes that into a full three-layer architecture (protocol file, task-gated persona/skill files, maintenance subagent) as the structural fix for the static-file problem.
- explicitThe correct architecture is layered and selectively loaded: a thin routing/protocol file (minimum undiscoverable facts, available personas/skills/MCP connections), focused persona or skill files loaded only for the relevant task type, and a maintenance subagent whose sole job is keeping the protocol file accurate as the codebase evolves.conf: high
- explicitNo major coding agent currently exposes the lifecycle hooks needed to build the three-layer architecture cleanly; it can only be approximated today with sub-agents and scoped context.conf: highextendsThe Intent Debt ยท p18 โ Osmani's own later piece reframes AGENTS.md specifically as an 'intent ledger' of non-discoverable why; this article's 'Layer 1 protocol file... minimum essential facts the agent genuinely cannot discover' is the same move stated architecturally rather than philosophically.
- explicitAutomated prompt-optimization of CLAUDE.md instructions (Arize AI's generator/evaluate/feedback/meta-prompt loop) outperformed manually written instructions by +5.19% accuracy cross-repo and +10.87% in-repo, because what a human finds obviously useful and what actually helps the model navigate a codebase are often different things.conf: high
- explicitAGENTS.md should function as a diagnostic log of unfixed codebase friction: an agent's repeated mistake should first be investigated as a codebase problem (confusing directory structure, an easy-to-grab deprecated dependency, a missing automated check) and fixed in the code or build pipeline; only if that's not possible should the fix remain as a prose instruction, which should then be deletable once the underlying problem is addressed.conf: highsupportsAudit your Agent files ยท p9 โ Both argue that an always-true rule belongs in a test/hook/build-pipeline check rather than as prose competing for instruction budget โ convergent on 'encode it, don't just write it down.'
- explicitInstructions essential to a context file today lose value over a few months as underlying models improve at codebase navigation on their own, so a well-tuned AGENTS.md can become net overhead by the next quarter purely from model improvement, independent of codebase or content changes.conf: medium
- implicitThe widespread practice of onboarding a coding agent like a new human hire (office tour, org chart, architecture walkthrough) misapplies a model of discovery cost that doesn't hold for agents, which can grep an entire codebase before a human finishes typing a prompt.conf: medium
- implicit'Can the agent discover this' is treated as a binary possible/impossible test, but discovery is not free โ it costs tool calls, reasoning tokens, and time even when something is technically findable, so the real inclusion criterion is a discovery-cost threshold the article never makes explicit or quantifies.conf: medium
Arguments
Stop running /init for AGENTS.md; keep only non-discoverable, operationally significant facts, and treat the file as diagnostic rather than permanent. strength: high
Explicit premises:
- Auto-generated context files are 99-100% codebase overview, i.e. duplicate what agents can discover themselves
- Redundant content still costs tokens, time, and reconciliation steps (and the ETH study measured both a success and a cost penalty for it)
- Even true, accurate content anchors the model toward it on every future prompt regardless of continued relevance (the pink-elephant effect)
- Non-discoverable, operationally significant content (uv vs. pip) demonstrably changes agent behavior for the better and is what the human-authored-file study's gains trace to
Implicit premises:
- A measured efficiency or success gain from AGENTS.md in aggregate studies generalizes to a per-line editorial principle for any individual team's file
- Developers can reliably self-assess, line by line, whether something is 'discoverable' without the same optimization tooling (Arize) that the article shows outperforms human judgment
Inferences:
- If model navigation keeps improving, the discoverable share of any given AGENTS.md will keep growing, so the file's rightful size trends toward zero over time, not toward stability
Narratives
- A Cloudflare engineer's critique that the ETH Zurich study's one-time /init files don't represent thoughtfully maintained context files, which the author concedes is fair โ but reframes as evidence the failure mode is comprehensiveness, not staleness.
โ Pre-empts the obvious rebuttal ('the study just caught a sloppy best case') and uses it to sharpen the real diagnosis: auto-generation optimizes for coverage, and coverage itself is the problem.
Questions addressed
- โ
Does AGENTS.md help or hurt coding-agent performance?
Both, depending entirely on content: auto-generated/redundant content hurts (cost up, success down); human-written, non-discoverable content helps (cost up some, success up, runtime/tokens down in the efficiency-only study). - โญ Does AGENTS.md improve the correctness of agent output, not just its speed/cost?
The efficiency-focused Lulla paper explicitly does not measure correctness; a full correctness evaluation is named as future work. - โญ What architecture would let context be loaded selectively per task type, rather than as one flat file?
Sketched (three-layer protocol/persona-skill/maintenance-subagent model) but explicitly not solvable cleanly today because no major agent exposes the needed lifecycle hooks.
Gaps
- incompleteNeither underlying paper tests the hierarchical, selectively-loaded architecture (the author's own proposed Layer 1/2/3 structure); both only evaluate the flat monolithic file. The article's central architectural recommendation is therefore not itself empirically validated by the evidence it marshals against /init.
Read next: Look for benchmark studies specifically comparing a layered/on-demand context architecture (e.g. nested AGENTS.md, skill-gated loading) against a flat file, holding task and model constant. - incompleteThe article proposes 'can the agent discover this?' as a clean binary filter but never grapples with discovery cost (tool calls, reasoning tokens, latency) as a continuum โ the Arize result, which shows manual human judgment about what helps a model is often wrong, undercuts the article's own closing advice to apply this filter by intuition rather than by measurement.
Read next: Look for guidance or tooling that quantifies discovery cost per fact (not just possible/impossible) to make the discoverability filter operational and auditable rather than another intuition-based judgment call.
Closes gaps elsewhere
- Encoding Team Standards ยท g1 โ Supplies exactly the measured instruction-budget/bloat evidence that gap called for: two 2026 studies quantify how AGENTS.md content competes for context/instruction budget and silently degrades (cost +20%+, success -2-3% for auto-generated/redundant content), confirming that 'encoding a standard as an executable instruction' is not reliably executed at scale once the file grows โ it degrades the same way bloated context files do.
Related documents
- Audit your Agent files
- Charlie Hills ๐ฆฉ's Post
- Lessons from building Claude Code: How we use skills
- How Claude Code works in large codebases: Best practices and where to start
- Encoding Team Standards
- Externalization in LLM Agents: A Unified Review of Memory, Skills, Protocols and Harness Engineering
- The Orchestrator's Tax
- Agent Skills
- No Vibes Allowed: Solving Hard Problems in Complex Codebases โ Dex Horthy, HumanLayer
- Harness engineering: leveraging Codex in an agent-first world