Memory system
Also called Memory · Persistent memory · Auto-memory
Whatever lets an agent carry information across sessions: notes on disk, a memory directory, a store it reads at startup.
A memory system is any mechanism that lets an agent remember something after the session ends. Since the model is stateless and the context window is thrown away, remembering has to be built: the harness writes facts to files or a database during a session and loads them back into context at the start of the next one. That is all memory is, at every scale, from a MEMORY.md to a vector store.
Two failure shapes. One, no memory at all: every session re-learns your conventions, your quirks, and the thing you told it yesterday. Two, memory that grows without curation, so each session starts with a wall of stale notes competing for attention. A memory that says the tests take five minutes when they now take thirty is worse than no memory, because it is trusted.
Keep memory small, factual, and dated. Store decisions and preferences, not transcripts. Put project-wide facts in AGENTS.md where every session sees them, and keep personal or volatile notes in a memory file the harness loads on demand. Review it occasionally the way you would a runbook. Anything the repo already records, such as code structure or history, does not belong in memory; the agent can read the primary source.
- Claude CodeCLAUDE.md is shared project memory; a per-project auto-memory directory holds notes the agent writes for itself between sessions.
- Claude CoworkProjects keep files and instructions attached so each task starts with the same grounding.
- CursorRules files carry the durable instructions; saved memories from past chats can be layered on top.
“Why does it keep suggesting npm when we're a pnpm repo?”
“Because nothing tells it. Add one line to the memory file and it stops.”
“Won't it forget again next session?”
“That's the point of the memory system: it's loaded every time. Just keep it short.”
Course 01 puts every one of these terms to work: you install Claude Code, run the loop, and ship a real project — permission modes, compaction, hooks and all.
Start Course 01 →