Best memory for Claude Code in 2026: built-ins, plugins and supermemory

Start with what Claude Code already has. CLAUDE.md holds the rules you write and auto memory holds notes Claude writes for itself, and for one person on one machine that covers a lot (Anthropic docs). Add a memory plugin when you want earlier sessions recalled by what they're about, or memory that follows a repo to another machine or another agent.
We make supermemory, one of the plugins below, so read this with that in mind. Every option is described from its own docs as of October 21, 2026, and judged on the same six questions.
How we compared them
- What it keeps, and who writes it: you, Claude, or a plugin.
- When Claude sees it: every session, on every prompt, or only when the model asks.
- Where it's stored: your repo, your machine, or someone's cloud.
- Who else can use it: other agents, other machines, your team.
- What it costs.
- What you have to set up. The table is ordered by this, from nothing to install to a hosted service.
Claude Code memory options compared
| Option | What it keeps | When Claude sees it | Where it's stored | Other agents and machines | Cost |
|---|---|---|---|---|---|
| CLAUDE.md or AGENTS.md | Rules you write: commands, conventions, layout | Every session, in full | Your repo and home folder | Teammates get it through Git, and other agents read AGENTS.md | Free |
| Auto memory | Notes Claude writes on your preferences, corrections and ongoing work | Every session: the first 200 lines or 25KB of the index | ~/.claude/projects/ on your machine |
One machine, every worktree of the repo | Free |
| claude-mem | Summaries of your sessions and tool use, written by a model through hooks | Context at session start, plus search tools Claude can call | A local SQLite database and vector index, with optional cloud backup | Several coding tools on the same machine | Open source (Apache 2.0). Summaries run on your Claude plan, your own model key or its paid hosted option |
| Other memory plugins: Mem0, cognee, Hindsight | Varies | Check whether recall runs on every prompt or waits for the model to call a tool | Varies: hosted, local or self-hosted, depending on the plugin | Varies | Varies |
| supermemory plugin | Memories extracted from your sessions, plus a profile for each project | Profile at session start, a memory search on every substantive prompt | supermemory's cloud, or supermemory Local on your own machine | Claude Code, Codex, Cursor, OpenCode and Muse Code share one memory per repo, on any machine signed in to your organization | Plugin free on every plan. Usage draws on credits, and Free includes $5 a month |
Sources: Anthropic's memory docs for the built-ins, claude-mem's README on GitHub, each vendor's own Claude Code pages for the other plugins, and our plugin README, Cursor docs and billing docs for supermemory.
Which memory should you use with Claude Code?
- One person, one machine, rules you can write down: CLAUDE.md plus auto memory. Nothing to install, and auto memory is on by default.
- You want sessions captured automatically but kept on your machine: a local plugin such as claude-mem.
- You switch machines, use more than one coding agent, or share a repo with a team: a hosted memory plugin. This is where supermemory fits, since the Claude Code, Codex, Cursor, OpenCode and Muse Code plugins all read and write one memory per repo.
- Memory can't leave your infrastructure: supermemory Local, which the plugin can point at, or another self-hosted option. Self-hosted memory for AI agents compares them.
Whatever you pick, keep CLAUDE.md for the rules. A plugin is for what happened in sessions, not for what should always apply.
What the supermemory plugin does
Install it with one command, which also sets up OpenCode and Codex if you use them, and approve sign-in once in the browser:
npx supermemory plugin
From then on it runs on hooks, so nothing waits for the model to decide to call a tool (README):
- When a session starts, it loads your profile for the project.
- On every substantive prompt, it searches memory with your prompt and adds the matches before Claude reads it.
- When Claude finishes responding, it saves the new part of the conversation in the background.
- On demand, Claude can use supermemory's MCP tools for a deeper search or a deliberate save, and read-only lookups are approved automatically.
Setup in detail, settings, and a two-session test to check it's working are in our Claude Code memory guide. The plugin's settings and commands are in its README.
Why we built it

When we launched the plugin in January, the problem was simple. Claude Code changed how I work, but every day I had to explain the same things to it again: that the user service talks to Postgres, not MySQL, and that the ugly function is ugly on purpose. The workarounds were long CLAUDE.md files and pasting context at the start of every prompt.
A lot has changed since then:
- One command installs it.
npx supermemory pluginsets up any of Claude Code, OpenCode and Codex in one go and signs you in through the browser (changelog). - It's free on every plan. The Claude Code plugin stopped needing a paid plan in July, and every coding plugin was free by August 15. Usage still counts against your credits (changelog).
- Recall happens on every prompt. It used to depend on Claude deciding to search. Since August 21, the hook searches on every substantive prompt itself (changelog).
- One memory per repo across agents. Claude Code, Codex, Cursor, OpenCode and Muse Code now use the same container for a repo, keyed to its Git remote. A decision made in Claude Code is there when you open the repo in Codex or Cursor.
- A security fix in August. If you installed before August 12, update: a crafted Bash command could be approved automatically during recall (changelog).
- The status line is gone. August's status line with counts was removed in October. On Claude Code 2.1.287 or later in the terminal, a headline above the prompt shows when memories came back.
How do you test a memory tool for Claude Code?
Use a fact the model couldn't guess. Tell Claude "we deploy from the release branch, never from main," end the session, and ask in a new session which branch you deploy from. Memories form in the background, so if nothing comes back yet, ask again a little later. Then correct the fact and check the new answer wins, and ask from another repo to check it doesn't leak. Run the same test on each option you're considering. A general memory benchmark won't tell you how a tool does on your repo, and this takes five minutes.
Common questions
Does Claude Code have memory?
Yes. CLAUDE.md files hold the instructions you write, and auto memory holds notes Claude writes about your preferences and ongoing work. Both load at the start of every session. Neither recalls earlier sessions by relevance, and auto memory stays on the machine that wrote it.
Is CLAUDE.md enough?
For rules, yes. CLAUDE.md is the right home for build commands and conventions, because changes to it get reviewed like code. It only knows what someone wrote down, though, so the approach you dropped last week or the half-finished migration usually isn't in it.
Do memory plugins slow Claude Code down?
Each prompt waits for the plugin's search before Claude reads it. supermemory's hooks have short time limits and fail open, so if supermemory is slow or unreachable your session carries on without the extra context (README).
Can I use the plugin and supermemory's MCP server together?
Yes, and the plugin already registers the MCP tools. The MCP server on its own is the way to share one memory across chat apps such as Claude and ChatGPT, where there are no hooks to install.
What does the supermemory plugin cost?
The plugin is free on every plan, including Free, which comes with $5 of credits a month. Saving and searching draw on those credits, and the pricing page has the rates.