Agent memory. What it remembers, what it should.


Fresh session, same agent: it re-reads the project, re-derives the conventions you explained last Tuesday, and re-makes the mistake you already corrected once. Not because it cannot remember — because nothing told it to write things down.

Memory for coding agents has settled into a small set of mechanisms, close enough across Claude Code, Codex and friends to describe once:

What belongs in memory

What does not

The rot problem

Memory is configuration now, and it deserves the treatment config gets:

The honest trade-offs

Where I landed

The two-line test settled it: if a new teammate would need to know it, the committed file; if only I would, the personal layer; if nobody needs it in a month, nowhere. Memory went from “the agent keeps forgetting” to “the notes need occasional weeding” — which is the same transition every knowledge system here has made before it started working.