Study finds agent context files are accurate maps but unreliable rulebooks
A large arXiv study checks architectural claims in CLAUDE.md and AGENTS.md files against real repositories, finding paths mostly accurate while dependency rules often fail.
In plain words
AI coding agents read project guide files, such as CLAUDE.md and AGENTS.md, at the start of each session because they have no memory of the codebase. Researchers tested whether the architectural statements in these files match the actual code. Paths were usually correct, but written import rules were frequently already broken.
What was announced
The authors checked 41,090 path claims and 184 dependency rules drawn from 3,602 context files across 3,346 open-source projects, verifying them against the code and its history. Around 5% of path claims pointed to paths they could not find, but they estimate only 2.2% were real errors, comparable to the 3.5% error rate they found in READMEs. When code moved, 61% of claims that became stale were fixed, mostly in the same commit.
Dependency rules behaved differently: 33 of 184 rules, about 18%, were already broken on the day they were written, usually because of older code, and nearly all stayed broken. The authors conclude that these files act as good maps but less reliable rulebooks, often describing the architecture a team wants rather than the one it has. In an exploratory comparison of 7,480 commits, agent-assisted commits broke rules about 1.8 times as often as other commits (0.29% versus 0.16%), but with only 14 breaks the authors say this is not significant and not evidence of a difference.
What it does not show
- The study covers open-source projects and verifiable path and dependency claims, so findings may not extend to other claim types or closed repositories.
- The agent-versus-other commit comparison rests on only 14 rule breaks, which the authors state is not statistically significant.
- The authors used an LLM with human review at each step, a method they note carries its own offers and risks for mining studies.
- Only the abstract is available, so full methodological detail cannot be verified.
For security and IT teams
- Scope
- Findings apply to path claims and dependency rules in CLAUDE.md- and AGENTS.md-style context files in open-source repositories, not to all content in such files.
Sources
Source-support review completed 1 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 1 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.