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

Published
Source
arXiv
Paper number
880
Field
AI / General
arXiv ID
2608.11095

Key points

  • It tracked 247,694 instructions across 1,867 GitHub repositories and showed that agent prompts grow by 226% over their lifetime while the deletion probability only keeps falling.
  • The cause is incomplete recall: once the reason for adding an instruction disappears, it cannot be safely deleted, so additions continue indefinitely, with O(2^|D|) complexity.
  • 76.8% of instruction deletions happen in a single commit that rewrites the entire file, so individual deletions are rare.
  • If you annotate the prompt with why each instruction is needed, you can remove 99.3% of unnecessary instructions, reducing growth from +211.3% to +1.4%.
  • On the real WildIFEval benchmark, prompt annotations improved instruction-following accuracy by up to 23.1%.

Paper links

External research summaries. These are not HDATF publications or measured product results.

Read original (opens in a new tab)