Computer Science > Artificial Intelligence
Title:Why Does CLAUDE.md Keep Growing? Catastrophic Remembering in Agentic Coding
Abstract:Agentic prompts like this http URL grow without bound in real repositories, stopping only when history ends or someone rewrites the file wholesale. We trace this to imperfect recall: appending an instruction is always cheap, but once an instruction's latent reasoning is gone, deleting it without risking a regression costs O(2^|D|) in a prompt of |D| instructions. Successive edits destroy that latent reasoning, additions outrun deletions and prompts grow until agents become non-functional -- catastrophic remembering. First, we characterize this phenomenon across 247,694 instruction lifetimes in 1,867 repositories: agentic prompts grow nearly monotonically, more than tripling over their lifetime (+226%) at +4.7 net instructions per commit. Deletion hazard decays geometrically with instruction age, consistent with imperfect recall and with no other rival we test. Then, we show that prompt comments can halt the growth: in verifiable worlds built by inverting IFEval, comments encoding latent reasoning remove 99.3% of excess size (+211.3% to +1.4%). Finally, we show comments yield smaller real-world and coding-convention prompts than existing context maintainers, grow more effective with model capability and, at small scale, improve instruction-following in real repositories by 17.7%. If English is the new code, why don't we have comments yet?
| Subjects: | Artificial Intelligence (cs.AI) ; Machine Learning (cs.LG); Software Engineering (cs.SE) |
|---|---|
| Cite as: | arXiv:2608.11095 [cs.AI] |
| (or arXiv:2608.11095v2 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2608.11095 arXiv-issued DOI via DataCite |
Submission history
Access Paper:
- HTML (experimental)
Additional Features
- Audio Summary
Current browse context:
References & Citations
- Google Scholar
- Semantic Scholar
BibTeX formatted citation
Bookmark
Bibliographic and Citation Tools
Code, Data and Media Associated with this Article
Demos
Recommenders and Search Tools
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.