Skip to main content

What's new

What the research says about AGENTS.md, and how we keep ours honest

The Repository instructions card showing AGENTS.md on the main branch, with a meter for the file's line count, an Edit notes button, a usage count on one note and a warning on a note that may be out of date.

Most advice on coding agents says to give them a context file, and most agents will write one for you with a single command. It's cheap and it feels obviously right, so few of us have checked. Thibaud Gloaguen, Niels Mündler-Sasahara, Mark Niklas Müller, Veselin Raychev and Martin Vechev, from ETH Zurich and LogicStar.ai, did. Their paper, “Evaluating AGENTS.md”, was presented at two ICLR 2026 workshops, and its results are less flattering than the advice.

What they tested

They ran four agent and model pairings, including Claude Code and Codex, on 300 tasks from SWE-bench, a standard benchmark built from real GitHub issues, and on 138 new tasks from 12 repositories that already keep a context file. Each task ran with no file and with a generated one. The 138 also ran with the file the repository's own people wrote. A task counted as solved when the agent's patch passed the tests.

What they found

Generated files lowered average success a little, by 0.5% on one benchmark and 2% on the other. Neither drop is statistically significant, so the fair reading is no measurable effect. The cost result is clear: generated files raised it by 20% and 23%. Hand-written files raised success by 2.4%, also not significant, and added up to 19% to cost, though they did significantly beat generated files. Agents weren't ignoring these files. They followed them closely, running more tests, searching more and reasoning more, and that's where the money went. Repository overviews, which are popular and recommended by model providers, were the disappointment: agents reached the relevant files no faster with one. File length on its own showed no clear effect either way.

Two caveats

The study covers Python, where models already know the tooling, and it measures whether tasks pass, leaving code quality and security for later work. One result also points the other way. When the researchers removed a repository's other documentation, generated files improved success by 2.7%. A context file seems to help most when it's the only documentation around, which the authors suggest may explain why so many people feel it works.

What to do with yours

The authors suggest leaving out generated files for now and keeping hand-written ones to what an agent can't get from the README, such as specific conventions and non-functional requirements. In practice, delete the tour of your directories, since any agent can list a folder. Cut whatever your README already says. Keep the commands that aren't obvious and the rules an agent would otherwise break. Agents obey what you write, so treat each line as a standing cost. In one follow-up on a single model, removing the testing section from generated files cut cost significantly with no significant change in success. Before you add much, run a few representative tasks with and without the file and compare.

How we handle it in 1904

We read this as a warning, because 1904's agents write notes too, which puts those lines closer to generated than hand-written. So the rules are strict. A note has to be something a later agent would otherwise rediscover, written as one short line in the same change, so you review it in the pull request. An agent that finds a note contradicting the code trusts the code and fixes the note. We aim for about 200 lines, with longer detail moved to docs/agents/, where agents look it up only when they need it. The study found no clear link between length and cost, so that number is our own habit and the paper doesn't back it.

Signals for pruning

1904 checks each note against your default branch and flags it May be out of date when a path or npm script it names is gone. It also counts how often agents look a note up, and a saved instruction nobody has looked up in two weeks says so. Both have limits. The check can't tell when a sentence has quietly become false, and a lookup count shows that a note was found and says nothing about whether it helped. Neither measures what the study measured, so we use them as reasons to reread the file.

← All posts

Start with an idea, or start with what you have.

Use AI supplied by 1904, or connect the subscription you already pay for.