Skip to content

ProperPath

Menu

Free resources · Notes and skills

Claude MEMORY.md explained, and how to make Claude read your notes first

What Claude MEMORY.md is, how it differs from the CLAUDE.md you write, and one small test that shows Claude reading your note before it answers.

Built by ProperPath

What is Claude's MEMORY.md?

MEMORY.md is the notebook Claude Code keeps for itself, not the Claude chat app's memory. With auto memory, which is on by default, Claude saves short notes as it works, from your corrections and the preferences it picks up, and MEMORY.md is their index. So it shows up without you asking, and a session sometimes says "Saved 2 memories".

It lives in your home folder, with one folder per project:

~/.claude/projects/<project>/memory/MEMORY.md

At the start of each session, Claude Code loads the first 200 lines or 25KB of it, whichever comes first, and leaves out the rest. Claude reads the other notes in that folder only when it decides it needs them.

Type /memory in a session to open the auto memory folder or to switch auto memory off; the notes are plain markdown you can edit or delete. For one project only, put this in that project's .claude/settings.json:

{
  "autoMemoryEnabled": false
}

How it fits with the other files Claude reads is in our CLAUDE.md best practices.

How is it different from CLAUDE.md?

You write CLAUDE.md, and Claude writes MEMORY.md. CLAUDE.md is a plain text file in your project folder that Claude Code loads whole at the start of every session, so it holds what you decided, while MEMORY.md holds what Claude noticed.

Both land in the context window, everything Claude can see in one session, and neither is a setting Claude must obey. In our view, facts that matter belong in files you write and review yourself.

Why does Claude ignore notes it has loaded?

Because loading is not reading. At the start of a session only CLAUDE.md and the start of MEMORY.md load; Claude opens any other note only when it decides it needs it. A question that names a project thing gives Claude something to search for. A general-sounding question gives it nothing to search for, so it answers with what is true in most projects. This is how you end up feeling CLAUDE.md is ignored.

We measured it with Claude Haiku 5.5, in headless runs (claude -p) that could only read and search files, one fresh invented project per question, ten facts each asked three times. Questions naming a project thing ("Which port does the local dev server listen on?") got the right answer 29 of 30 times with no rule, some from a search result without opening the note, while general-sounding ones such as "How should I format a commit message?" got it 5 of 30 times, rising to 29 of 30 with the one CLAUDE.md line used in the steps below.

Can a hook back the rule up?

Yes. A hook is a command you set up that Claude Code runs at a fixed moment, whatever Claude decides. In our test, a Stop hook, which runs when Claude finishes a reply, sent the reply back once unless Claude had read the right note. With the rule and the hook, 30 of 30 replies gave the project's answer.

One reply better than the rule alone is too small a gap to prove the hook wins. Treat it as a backstop: the CLAUDE.md line does most of the work, and the hook catches the miss.

How do I get Claude to read the note first?

Write one note whose answer differs from the usual one, and one CLAUDE.md line that says where facts live and to read first. Use a throwaway folder: ~/.claude/CLAUDE.md in your home folder loads in every project, but ./CLAUDE.md only in that one. This makes a tiny project whose commit rule nobody would guess:

mkdir -p ~/memory-test/notes && cd ~/memory-test
cat > notes/commits.md <<'EOF'
# Commit messages
Every commit message in this project starts with the ticket id
in square brackets, then a short summary. Example:
[ORBIT-12] Fix the refund rounding
EOF
cat > CLAUDE.md <<'EOF'
# Project rules

Project facts live in the notes folder. Before you answer a question about this project, read the note that covers it.
EOF

The CLAUDE.md file is the one our test used; the note is our own wording, untested, and the question below is the one our test asked.

Start Claude Code in that folder:

cd ~/memory-test
claude

Then repeat it on your own project, with one fact where your team differs from the usual answer.

Where is the full answer?

Check it worked

First the files:

ls ~/memory-test ~/memory-test/notes
cat ~/memory-test/CLAUDE.md

A reply with only the usual advice (a subject line of about 50 characters, no ticket id) came from habit. Make sure Claude Code started inside ~/memory-test, and type /context all to see CLAUDE.md listed under Memory files. For contrast, ask the same in a second new folder with the notes but no CLAUDE.md.