Auto memory
By Mike Schreiber · Updated 31 October 2026
Auto memory
Auto memory is persistent context an AI assistant writes for itself to improve future sessions. In Claude Code, it captures useful preferences, corrections, project facts unavailable from code, and references to external information. It is selective note-taking, not a complete conversation archive or a guarantee that every instruction will be followed. [1]
How it works
Claude Code stores auto memory in ~/.claude/projects/<project>/memory/ by default. Worktrees and subdirectories of the same Git repository share that directory. A MEMORY.md index points to individual topic files. At conversation startup, Claude loads the first 200 lines or 25KB of the index, whichever comes first; topic files are read on demand. Memory is machine-local, not automatically shared across machines or cloud environments. [1]
Auto memory complements authored instructions. Use CLAUDE.md for deliberate project rules and auto memory for learned preferences and corrections. Both provide context rather than enforced configuration. Direct AGENTS.md support is version-dependent: Claude Code supports it from v2.1.277, subject to file-selection settings and session limitations. [1]
Related mechanisms
Session history preserves a conversation for resumption. Claude Code’s /resume restores saved conversation state, while /export produces readable transcript text. Neither is the same as selecting durable notes for future conversations. [2]
An MCP memory server is a separate context service, not another name for built-in auto memory. Local MCP servers typically run on the same machine using standard input/output; hosted servers run remotely and commonly use Streamable HTTP. For a memory service, check its storage location, access controls, and retention separately. MCP defines context exchange, not automatic synchronization or how an assistant must use retrieved information. [3]
Hark serves a different role: a shared project record covering Inventory, Health, Work, Authority, and Decisions. Its briefs, memory, and handoffs read that record. This supports project continuity, not universal transcript transfer between assistants. Linked repository instruction files can remain authoritative. [4]
Practical example
After correcting an assistant, say: “Remember that I prefer concise explanations before code changes.” Then run /memory to inspect the saved note and edit or delete anything inaccurate. If a rule must apply to the whole team, explicitly add it to the repository’s instruction file instead. For a handoff, record the accepted decision, outstanding uncertainty, and next action rather than assuming another tool inherits the conversation. [1][4]
Sources
[4] How Hark works