Claude Code Memory Explained: When to Use CLAUDE.md vs. External MCP Memory
Key takeaways
- Claude Code combines explicit
CLAUDE.mdfiles (loaded every session) with local Auto Memory (stored under~/.claude/projects/<project>/memory/) and temporary session context. CLAUDE.mdworks best for repository rules, build commands, and architecture conventions—not for tickets, decision rationale, or cross-repository knowledge.- Keeping tickets, design decisions, and cross-project notes in an external MCP memory layer like JadeNote keeps
CLAUDE.mdlean and lets Cursor, Codex, and ChatGPT share the same context.
Details about Claude Code’s built-in memory features in this article were verified against the official Claude Code documentation as of November 28, 2026 (see “References” at the end).
Developers using Claude Code quickly run into a maintenance question: where should project context live? Putting everything into CLAUDE.md makes the file bloated and slow to read. Leaving decisions inside terminal sessions means the next session—or another tool like Cursor or ChatGPT—starts from zero.
Knowing what Claude Code remembers natively makes it clear where CLAUDE.md ends and an external MCP memory layer begins.
What Claude Code Remembers—and What It Forgets
According to the official Claude Code documentation, Claude Code manages context through three distinct layers:
- Session context (ephemeral): Everything discussed, read, or edited in the current conversation. Once you clear or start a new session, that working context is gone.
CLAUDE.mdfiles (explicit instructions): Plain Markdown files loaded at the start of every session. Claude Code supports a hierarchy including organization-wide managed policies, projectCLAUDE.md(committed to Git), modular.claude/rules/*.mdfiles, git-ignoredCLAUDE.local.md, and user-level~/.claude/CLAUDE.md. You can check what loaded with/contextor manage files with/memory.- Auto Memory (local autonomous notes): Claude Code can write down workflow habits, debugging tips, and recurring project notes on its own under
~/.claude/projects/<project>/memory/. It maintains aMEMORY.mdindex (loading the first 200 lines or roughly 25KB per session) plus on-demand topic files. Auto Memory lives locally on that machine and is scoped to that Git repository.
All three are useful, yet none of them is designed to hold your cross-repository decisions, active task tracker, or context shared with ChatGPT, Cursor, and mobile reading.
What Belongs in CLAUDE.md—and What Does Not
Because CLAUDE.md is loaded into every session automatically, treat it like a concise engineering handbook for the repository.
Put in CLAUDE.md:
- Build, lint, and targeted test commands
- Repository layout and key module boundaries
- Coding conventions, naming rules, and safety constraints (such as migration rules or files never to touch)
- Team-wide review checklists
Keep out of CLAUDE.md:
- Active tickets, backlog items, and pull request links
- Long explanations of why a product or architecture decision was made three months ago
- Personal scratch notes, tentative ideas, and meeting summaries
- Knowledge shared across multiple repositories (for instance, API contracts between a backend repo, a mobile repo, and a marketing site)
When those items creep into CLAUDE.md, every unrelated session pays the token cost of reading them, and Git history fills with churn unrelated to code changes.
Memory That Belongs Outside the Repository: External MCP Memory
Anything that outlives a single session, spans multiple repositories, or needs to be read by non-coding tools belongs in an external MCP memory layer.
| Layer | Best stored here | Scope | Shared with ChatGPT / Cursor? |
|---|---|---|---|
CLAUDE.md | Repo rules, build/test commands, architecture invariants | Single Git repo (loaded every session) | △ Cursor can read local repo files; ChatGPT web cannot |
| Claude Code Auto Memory | Local debugging notes and personal workflow habits | Single repo on one local machine | × Local to Claude Code |
| External MCP memory (JadeNote) | Tickets, decision rationale, cross-repo specs, personal engineering notes | Across all repos, devices, and AI clients | ○ Any MCP client (Claude Code, Cursor, Codex, ChatGPT, Claude) |
A Practical Workflow: CLAUDE.md + JadeNote
In JadeNote’s own development, CLAUDE.md and JadeNote serve complementary roles:
CLAUDE.mdstays compact: commands to run tests, deployment rules, and module boundaries.- JadeNote (
TasksandDecisionscategories) holds tickets, design context, and why a given approach was chosen.
A typical loop looks like this:
-
Connect Claude Code to JadeNote once:
claude mcp add --transport http jadenote https://api.jadenote.app/mcpThen run
/mcpinside Claude Code to sign in with OAuth. -
Start a task by asking Claude Code to read the ticket note from JadeNote (including any linked design notes or prior comments).
-
After implementing and opening a pull request, Claude Code updates the ticket’s
Pull Requestfield with the PR URL and adds a short comment summarizing what changed and what remains. -
Later, if you open Claude on the web or ChatGPT on your phone to plan the next release, the exact same ticket and decision history are already there.
If you want a ticket flag in JadeNote to kick off a Claude Code routine automatically without even opening your terminal, see the step-by-step setup in “Set up a Claude Code routine.”
Sharing the Same Memory with Cursor and Other Coding Agents
Because JadeNote uses a standard remote MCP server (https://api.jadenote.app/mcp), connecting a second coding agent takes less than a minute:
- Cursor: add
"jadenote": { "url": "https://api.jadenote.app/mcp" }undermcpServersin~/.cursor/mcp.jsonand sign in via OAuth. - Codex, Gemini CLI, ChatGPT, and Claude: point them at the same URL (or use the ChatGPT Plugin / Claude directory connector).
Your coding rules stay version-controlled in each repository’s CLAUDE.md, while your tickets, rationale, and cross-project knowledge live in one external memory layer that every agent can search on demand.
FAQ
What is the difference between CLAUDE.md and Claude Code’s Auto Memory?
CLAUDE.md contains explicit instructions you write and check into a repository (or ~/.claude/CLAUDE.md for user-level rules), loaded at the start of every session. Auto Memory is where Claude Code records its own project learnings locally under ~/.claude/projects/
What should NOT go into CLAUDE.md?
Avoid putting active task tickets, meeting notes, long decision histories, temporary debugging logs, or knowledge that spans multiple repositories into CLAUDE.md. Because CLAUDE.md loads into every session, bloating it wastes context and adds noise.
How can Claude Code share memory with Cursor, Codex, or ChatGPT?
By storing cross-project knowledge and tickets in a remote MCP server that every tool connects to. With JadeNote, you run one command to add https://api.jadenote.app/mcp to Claude Code, and connect Cursor, Codex, or ChatGPT to the same endpoint.
How do I trigger Claude Code automatically from a task note?
In JadeNote Pro, adding a flag to a note can start a Claude Code routine automatically. The routine reads the note over MCP, does the work, and comments back with the result.
Start free with JadeNote — includes a 30-day Pro Trial.