arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2608.11095cs.AIcs.LGcs.SE

CLAUDE.md 为何不断膨胀?智能体编码中的灾难性记忆

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

Kushal Chakrabarti

首次发表
浏览论文内容

中文总结 AI 辅助

该研究针对智能体编码中提示文件无限制膨胀的问题,提出通过提示注释消除多余指令,可使现实中智能体指令遵循能力提升多达23.1%。

中文摘要 AI 辅助

像 http URL 这样的智能体编码 README 文件在真实代码仓库中会无限制地增长,仅在仓库停用或有人彻底重写该文件时才会停止。我们将此归因于不完善的记忆:追加一条指令总是成本低廉,但一旦某条指令的基本原理消失,删除它而不冒正确性回归风险的成本为 O(2^|D|),其中 |D| 是提示中的指令数量。我们将这种偏差命名为灾难性记忆,它是持续学习所围绕的灾难性遗忘的逆过程。首先,我们在 1867 个仓库的 247694 条指令生命周期中对该现象进行了表征:智能体提示会无限制增长,在其生命周期内增长超过三倍(+226%),每次提交净增加 +4.9 条指令;此外,指令越旧,被删除的可能性越小(对数风险为 -0.032/次提交)。然后,我们证明提示注释可以阻止这种增长:对 IFEval 进行反转可得到可验证的世界,其最优提示是已知的,而编码潜在推理的注释可消除 99.3% 的多余指令(从 +211.3% 降至 +1.4%)。最后,将相同的反转应用于 WildIFEval,我们表明提示注释可将现实世界中智能体的指令遵循能力提升多达 23.1%。如果英语是新的代码,我们为何还没有注释?

英文摘要

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?

发表机构

  • South Park Commons(南公园社区)

机构由 AI 辅助整理,请以论文原文为准。

↑