AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Oct 3, 2026, 10:00 JST

CLAUDE.md vs auto memory: Claude Code's two memories, split by who writes them

CLAUDE.md vs auto memory: Claude Code's two memories, split by who writes them

3 Key Points

  1. What happened

    The article lays out the split in Claude Code — CLAUDE.md is the file the user writes with instructions and rules, while auto memory is where Claude writes down its own learnings, and both load at session start.

  2. Why it matters

    Which one you use decides what carries over between sessions — instructions you set deliberately, or patterns Claude picks up from your corrections, and auto memory is enabled by default.

  3. What to watch

    CLAUDE.md is passed as a message at the start of a conversation, not an enforced rule, so the article says how much Claude follows it depends on how it is written.

WHO IT HITSTeams and individual developers who work with Claude Code on a shared codebase, who need to decide what belongs in a version-controlled CLAUDE.md versus what auto memory records privately per project.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The starting point for both mechanisms is the same problem: Claude Code begins every session from a blank state, so anything carried over has to be loaded again at the start. The article splits that load into two boxes by asking who does the writing. CLAUDE.md is Markdown the user maintains, and where it sits changes who sees it — a fixed OS-level path holds organization-wide rules, ~/.claude/CLAUDE.md holds one person's preferences across every project, ./CLAUDE.md or ./.claude/CLAUDE.md in the working directory holds team-shared policy under version control, and ./CLAUDE.local.md holds one person's project-specific settings. Files in the working directory and its parent levels load together at startup, while anything in subdirectories is pulled in only when Claude reads a file there.

auto memory works from the other direction. Rather than waiting for instructions, Claude notes down what it judges worth keeping, sorted into four kinds: the user's role and preferences, corrections and confirmed approaches, project decisions that code and git history do not reveal, and pointers to outside references such as issue trackers or dashboards. Anything readable from the code, or already written in CLAUDE.md, is left out. Its index, MEMORY.md, is read every session, but because that file has limits, the design pushes detail into separate topic files and keeps the index short.

The practical friction sits in that difference. The article notes CLAUDE.md arrives as a message at the beginning of a conversation rather than as an enforced rule, so its effectiveness depends on how it is written — concrete and checkable, roughly 200 lines, and free of contradictions, since conflicting instructions leave Claude's choice unsettled. The test of whether the split is working may be simply how often the same correction gets typed twice; on the second time, it is likely a candidate for CLAUDE.md rather than something left to auto memory to absorb.

FAQ
Where does auto memory store what it learns?
It saves into a per-project directory at ~/.claude/projects/<project>/memory/. That folder holds an index file called MEMORY.md plus individual topic files Claude creates.
Can I turn auto memory off?
Yes. Open /memory in a session to toggle it, and the setting is saved as autoMemoryEnabled in ~/.claude/settings.json. A project can disable it in its own settings file.
How long should a CLAUDE.md file be?
The article suggests keeping it to around 200 lines. Once it grows too long, the accuracy with which Claude follows the instructions actually drops.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleMeta open sources Muse code so you can build your own AI gadgets