---
title: "Why Does CLAUDE.md Keep Growing? Catastrophic Remembering in Agentic Coding"
source: "arXiv AI/CL/LG（论文）"
source_tier: "t2"
url: "https://arxiv.org/abs/2608.11095v1"
permalink: "https://feed.astralor.com/items/itm_a6643a6e2eb84940166fe46a"
published: "2026-08-11T16:00:55.000Z"
score: 76
channel: "ai"
tags: ["Agentic Coding","Anthropic","CLAUDE.md","IFEval","Prompt Engineering"]
---

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

## AI commentary

> What makes this paper worth watching is that it turns the widely felt problem of prompt bloat into a quantifiable, verifiable, and solvable scientific question. For engineering teams building long-memory agents, the trick of using comments as explicit reasoning traces is elegantly simple and may be easier to adopt than more complex memory-compression mechanisms.

## At a glance

This paper finds that agentic coding prompts like CLAUDE.md grow without bound in real repositories, expanding by 226% on average and gaining 4.9 net instructions per commit. The cause is the prohibitive cost of deleting an instruction—it requires evaluating interactions with all other instructions—so older instructions become almost impossible to remove, termed catastrophic remembering (the inverse of catastrophic forgetting). Adding comments that encode latent reasoning reduces excess growth from 211.3% to 1.4% and improves real-world instruction-following by up to 23.1% on WildIFEval.

## Key points

- Analyzing 247,694 instruction lifetimes across 1,867 repositories confirms unbounded prompt growth: +226% on average, with +4.9 net instructions per commit, and older instructions become less likely to be deleted (log-hazard -0.032 per commit).
- Inverting IFEval to produce verifiable worlds with known optimal prompts, they show comments encoding latent reasoning remove 99.3% of excess instructions (+211.3% to +1.4%).
- Applying the same inversion to WildIFEval, comments improve real-world agentic instruction-following by up to 23.1%.

## Full text

Agentic coding READMEs like CLAUDE.md grow without bound in real repositories, stopping only when the repository retires or someone rewrites the file wholesale. We trace this to imperfect recall: appending an instruction is always cheap, but once an instruction's rationale is gone, deleting it without risking a correctness regression costs O(2^|D|) in a prompt of |D| instructions. We name the resulting divergence catastrophic remembering, the inverse of catastrophic forgetting around which continual learning is organized. First, we characterize this phenomenon across 247,694 instruction lifetimes in 1,867 repositories: agentic prompts grow without bound, more than tripling over their lifetime (+226%), gaining +4.9 net instructions every commit; further, the older an instruction gets, the less likely it is to be deleted (log-hazard -0.032/commit). Then, we show that prompt comments can halt the growth: inverting IFEval yields verifiable worlds whose optimal prompts are known, and there comments encoding latent reasoning remove 99.3% of excess instructions (+211.3% to +1.4%). Finally, applying the same inversion to WildIFEval, we show that prompt comments can improve real-world agentic instruction-following by up to 23.1%. If English is the new code, why don't we have comments yet?

---

Verify against the original before citing; curated by Astral Feed: https://feed.astralor.com/items/itm_a6643a6e2eb84940166fe46a
