# Why Does CLAUDE.md Keep Growing? Catastrophic Remembering in Agentic Coding

DevFeed: [Why Does CLAUDE.md Keep Growing? Catastrophic Remembering in Agentic Coding](<https://devfeed.tech/articles/why-does-claude-md-keep-growing-catastrophic-remembering-in-agentic-coding-148245.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2608.11095>)

Author: Kushal Chakrabarti

Published: 2026-11-23T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>), [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [agentic-coding](<https://devfeed.tech/topics/agentic-coding.md>), [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [Agentic AI](<https://devfeed.tech/topics/what-is-agentic-ai.md>)

Tags: [agentic](<https://devfeed.tech/tags/agentic.md>), [agentic-coding](<https://devfeed.tech/tags/agentic-coding.md>), [agents](<https://devfeed.tech/tags/agents.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [capability](<https://devfeed.tech/tags/capability.md>), [claude-md](<https://devfeed.tech/tags/claude-md.md>), [code](<https://devfeed.tech/tags/code.md>), [coding](<https://devfeed.tech/tags/coding.md>), [commit](<https://devfeed.tech/tags/commit.md>), [context](<https://devfeed.tech/tags/context.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [edits](<https://devfeed.tech/tags/edits.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [english](<https://devfeed.tech/tags/english.md>), [growth](<https://devfeed.tech/tags/growth.md>), [instructions](<https://devfeed.tech/tags/instructions.md>), [maintainers](<https://devfeed.tech/tags/maintainers.md>), [model](<https://devfeed.tech/tags/model.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [prompts](<https://devfeed.tech/tags/prompts.md>), [real-world](<https://devfeed.tech/tags/real-world.md>)

## AI overview

Across 1,867 repositories and 247,694 instruction lifetimes, agentic prompts such as CLAUDE.md grew nearly monotonically, increasing 226% over their lifetimes, or 4.7 net instructions per commit. The authors attribute this pattern to imperfect recall: as edits erase the reasoning behind older instructions, removing them risks regressions, while adding instructions remains cheap. They report that comments preserving this latent reasoning reduced excess prompt size in verifiable tests from 211.3% to 1.4% (a 99.3% reduction). Comments also produced smaller prompts than existing context maintainers in real-world and coding-convention settings, and improved instruction-following by 17.7% in small-scale tests on real repositories. The excerpt says effectiveness increased with model capability; it does not establish broad real-world performance or that comments eliminate prompt growth in all settings.

## Source excerpt

arXiv:2608.11095v2 Announce Type: replace-cross Abstract: Agentic prompts like CLAUDE.md 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?