Guide
How to make Claude Code remember between sessions
Claude Code forgets the conversation when a session ends. What it keeps depends on where you put it. Here are the four places, what each is good for, and how to tell what it remembered.
1. CLAUDE.md: your rules
CLAUDE.md loads at the start of every session. Put what's always true: how to build and test, conventions, what not to touch. One in the repository covers that project; ~/.claude/CLAUDE.md covers all of them. Keep it short and current, and ask Claude Code to update it when you change a rule. CLAUDE.md vs AGENTS.md.
2. Auto memory: what it learns
Claude Code also writes its own notes as it works: a fix that worked, a command that's needed, a preference you repeated. They load at the start of the next session. Run /memory to see and edit them. Prune them now and then, since a note that was true in March can mislead in October.
3. Resuming a session
claude --continue reopens the last session, and claude --resume lets you pick one. Use it to finish the same task. For a new task, a fresh session with good files beats dragging a long history along. /compact vs /clear covers the in-between.
4. A memory server: everything else
The first three only know what happened in Claude Code. The decision from a call, the bug report you read in email, what you worked out with Codex yesterday: none of it is there, so you explain it again.
Cachejay keeps those as you work on your Mac and lets Claude Code search them over MCP. It also keeps your Claude Code and Codex sessions, so one agent can find what another was told. Choose Connect AI Apps → Claude Code in Cachejay's menu; it adds the server and a skill that tells Claude Code to look before asking and to report back what it finished. Details: Cachejay for Claude. What an MCP memory server is, in general: a plain-English guide.
Check what it remembers
Start a new session and ask: “What do you know about this project's conventions, and where did you get it?” Then ask about a decision made outside the editor. If the first answer cites CLAUDE.md and the second cites a call or an earlier session, all four layers are working. Still typing the same intro every morning? Stop re-explaining your project to Claude Code and Cursor.