CLAUDE.md vs Auto Memory
People often think auto memory and CLAUDE.md are the same file. Both reach Claude at the start of a session, but different people write them. You write CLAUDE.md, and your team can share it in git. Claude writes auto memory for itself, from what it learns while working with you. It lives in your home folder, so it is never shared.
CLAUDE.md
A file of rules Claude Code reads each time it starts.
CLAUDE.md is a plain text file of instructions that Claude Code reads at the start of every session. You write it in Markdown. It can hold your build commands, your style rules and things to avoid. There can be one in your home folder for all projects, one in the project for the team, and more in sub-folders. Claude Code loads them all together. Running /init writes a first version for you by looking at your code.
Auto Memory
Notes Claude writes for itself, loaded again at the next session.
Auto memory is the notes Claude writes for itself as it works with you. It saves things like your preferences, corrections you gave and facts about the project that the code does not show. The notes live in a folder for each repository under ~/.claude/projects/. An index file named MEMORY.md is loaded at the start of each session, up to its first 200 lines or 25 KB. You write CLAUDE.md. Claude writes auto memory.
In one line
- CLAUDE.md
- A file of rules Claude Code reads each time it starts.
- Auto Memory
- Notes Claude writes for itself, loaded again at the next session.