lockstep

Auto Memory (Claude Code)

Auto memory is the notes Claude Code writes for itself across sessions, stored per repository on your machine and indexed in a MEMORY.md file.

Auto memory is Claude Code's own notebook. While you work, Claude saves notes it expects to need later, and loads them back at the start of future sessions. You don't write these notes; Claude does.

What it saves

Per Anthropic's documentation, each memory has one of four types:

  • user: your role, expertise, and preferences
  • feedback: corrections you gave and approaches you confirmed
  • project: ongoing work and decisions it can't derive from the code
  • reference: where to find things outside the project

It skips anything it can work out from the codebase and anything your CLAUDE.md already says.

Where it lives and how much loads

Memories live in ~/.claude/projects/<project>/memory/, with a MEMORY.md index and one file per memory. The first 200 lines or 25KB of the index load into every session; topic files load when needed. All worktrees of a repository share one directory.

Auto memory is machine-local. It is not shared across machines or with teammates, so what your agent learned doesn't reach anyone else's. That is the gap covered in Claude Code team memory. For how it fits with the rest, see how Claude Code memory works.

For auto memory next to CLAUDE.md files, see CLAUDE.md vs CLAUDE.local.md vs auto memory.

What is Claude Code auto memory?
Notes Claude Code writes for itself as you work: your preferences, corrections you gave, project context it can't derive from the code, and where to find outside information. They load into future sessions so you don't repeat yourself.
Where is Claude Code auto memory stored?
In ~/.claude/projects/<project>/memory/ on your machine, with a MEMORY.md index and one file per memory. All worktrees of one git repository share the directory. It is not shared across machines or with teammates.
How much auto memory loads?
The first 200 lines or 25KB of MEMORY.md, whichever comes first, at the start of every session. Topic files load only when Claude decides it needs them.
How do I turn auto memory off?
Use the toggle in /memory, set autoMemoryEnabled to false in settings, or set CLAUDE_CODE_DISABLE_AUTO_MEMORY=1.

Related