Updated
The best memory for Claude Code in 2026
The best memory for Claude Code is Glen if more than one person on your team runs Claude Code, and Claude Code's own CLAUDE.md plus auto memory if you work alone on one machine. Glen records every Claude Code turn into memory your whole org shares and injects the relevant part into the next prompt, so a fix one engineer's session worked out on Tuesday reaches another engineer's session on Wednesday without anyone writing it down.
Claude Code already remembers more than it used to. Auto memory is on by default and writes notes to ~/.claude/projects/<project>/memory/, and CLAUDE.md files load at the start of every session. Both stop at the edge of one laptop: Anthropic's docs say auto memory is not shared across machines or cloud environments, and CLAUDE.md only holds what someone took the time to write. We compared six options on what they capture, whether a teammate's agent can read it, and what they cost.
Short answer
- A team of engineers all running Claude Code
- Glen
- Solo, one machine, no new tools
- Claude Code auto memory + CLAUDE.md
- Solo, open source, local-first capture
- claude-mem
- A memory API you also call from your own app
- Supermemory or Mem0
- Notes you edit by hand in Obsidian
- Basic Memory
Claude Code memory tools at a glance
| # | Tool | Connects via | Captures | Team sharing | Price |
|---|---|---|---|---|---|
| 01 | Plugin (hooks) plus a CLI | Every turn, automatically | Whole orgOrg-wide, filtered per user at recall | Free for 15,000 memories, no card | |
| 02 | Built in | Auto memory writes notes as it works | Repo filesCLAUDE.md through git; auto memory stays on one machine | Included with Claude Code | |
| 03 | Plugin (hooks) | Every tool use and session end, automatically | One personLocal per project; team sharing is a pilot | Free locally; CMEM Pro $30/mo | |
| 04 | Plugin (claude-supermemory) or remote MCP | Automatic with the plugin; tool calls over MCP | Shared spacesPer repo by default; orgs with scoped keys | Free with $5 credit; Pro $19/mo | |
| 05 | Plugin or remote MCP | Batches every 5 exchanges and at session end | Shared spacesPer user, agent or app entity | Free tier; paid is usage-based or custom | |
| 06 | Plugin or MCP (local or cloud) | Mostly agent-written notes; opt-in capture mode | Shared spacesCloud workspaces with members | Free locally; Cloud $19/mo per workspace |
How we ranked them
- Capture without asking. Does it record what the session did on its own, through Claude Code's hooks, or only when the agent decides to call a save tool? Tool-call memory depends on the model remembering to save, and it usually doesn't.
- Recall on every turn. Claude Code's UserPromptSubmit hook can add context before the model sees a prompt. Tools that use it put memory in front of the model; tools that don't wait for the agent to search.
- Reach past one person. Can a teammate's Claude Code session, or a Codex or Cursor session, read what yours worked out? Most memory tools are scoped to a user or a repo on one machine.
- Stale facts drop out. When the team reverses a decision, does the old one keep surfacing? Memory that only appends turns into a list of contradictions.
- Setup and price. Install steps, what runs locally, and the first paid tier, from each vendor's own pricing page as of November 2026.
The 6 best memory tools for Claude Code

Glen
Our pickBest for: Teams where several engineers, and several agents, work on the same codebase.

tryglen.com - Connects to Claude Code
- Plugin (hooks) plus a CLI
- Captures
- Every turn, automatically
- Shared with your team
- Org-wide, filtered per user at recall
Glen's Claude Code plugin is four hooks, each a one-line glen CLI call. UserPromptSubmit sends your prompt and workspace context (repo, branch) to Glen and injects the memories that match before the model reads the prompt. Stop records the finished turn. PostToolUse links each git commit to the session that wrote it, so glen code-search can later trace a line of code back to the conversation behind it.
The memory belongs to the org, not the laptop. Sessions from Claude Code, Codex and Cursor land in the same store, alongside public Slack channels, GitHub, tickets and call transcripts from Fireflies, Fathom or Granola. Access control runs per observation at recall, so an agent only sees what its user is already cleared to see. When a newer decision contradicts an older one, the older one stops surfacing. In a replay of 100 merged PRs with Codex 5.5, the arm with Glen used 29% fewer tokens and reached a merged change 21% faster, with quality at parity or better.
Strengths
- Recall lands before the first model call on every prompt, not only when the agent thinks to search
- One memory across Claude Code, Codex, Cursor, Slack and GitHub
- Incognito mode keeps a session out of team memory; glen off turns it all off
- Skills, artifacts and session transcripts sit in the same library
Limits
- A hosted service; there is no self-hosted build
- Most useful once two or more people are recording into it
Managed service · Free for 15,000 memories, no card
Set up Glen in Claude Code →
Claude Code auto memory + CLAUDE.md
Best for: One developer who wants memory with nothing to install.

claude.com - Connects to Claude Code
- Built in
- Captures
- Auto memory writes notes as it works
- Shared with your team
- CLAUDE.md through git; auto memory stays on one machine
Claude Code has two built-in layers. CLAUDE.md files load at four levels (managed policy, ~/.claude/CLAUDE.md, the project's ./CLAUDE.md or .claude/rules/, and a gitignored CLAUDE.local.md), and they hold whatever you or the agent write there. Auto memory, on by default, keeps a MEMORY.md index plus topic files under ~/.claude/projects/<project>/memory/ and loads the first 200 lines or 25 KB each session. You manage both with /memory, or turn auto memory off with autoMemoryEnabled or CLAUDE_CODE_DISABLE_AUTO_MEMORY=1.
For one person this covers a lot. The gap shows up with a second engineer: their auto memory is a different folder on a different machine, so the two sessions learn the same things separately, and only what someone commits to CLAUDE.md is shared.
Strengths
- Free, on by default, no account
- Plain Markdown you can read and edit
- Project CLAUDE.md and rules travel with the repo
Limits
- Auto memory is per machine; cloud sessions and teammates don't see it
- Only the first 200 lines of MEMORY.md load each session
- Nothing from Slack, GitHub or other agents
Built into Claude Code · Included with Claude Code
Visit claude.com ↗
claude-mem
Best for: Solo developers who want open-source, local capture.

cmem.ai - Connects to Claude Code
- Plugin (hooks)
- Captures
- Every tool use and session end, automatically
- Shared with your team
- Local per project; team sharing is a pilot
With about 112,000 GitHub stars, claude-mem is the most-installed memory plugin for Claude Code. It hooks tool use and session end, compresses what happened into summaries with an LLM, stores them in SQLite with full-text search plus a Chroma vector index, and injects relevant summaries into new sessions. Install it from the plugin marketplace or with npx claude-mem install; the same installer covers Cursor, OpenCode and Codex.
Everything runs locally by default. CMEM Pro ($30 a month after a 30-day trial) adds a hosted observer, cloud sync and a private MCP link. Its team feature, TeamBrain, lets each person choose what to share, and was still a pilot with no public pricing when we checked.
Strengths
- Free and local, Apache 2.0
- Automatic capture through hooks, close to how Glen captures
- Works in Cursor, OpenCode and Codex too
Limits
- Built around one person's machine; sharing is opt-in per person and not yet generally available
- Summaries cost LLM calls you run or pay for
Open source (Apache 2.0) · Free locally; CMEM Pro $30/mo
Visit cmem.ai ↗
Supermemory
Best for: Developers who want the same memory in Claude Code and in their own app.

supermemory.ai - Connects to Claude Code
- Plugin (claude-supermemory) or remote MCP
- Captures
- Automatic with the plugin; tool calls over MCP
- Shared with your team
- Per repo by default; orgs with scoped keys
Supermemory is a hosted memory API with coding-agent plugins on top. The claude-supermemory plugin saves the conversation on Stop and searches and injects matches on UserPromptSubmit, and it defaults to one container per repo that Codex and OpenCode sessions also read. The remote MCP server at mcp.supermemory.ai uses OAuth sign-in if you'd rather not run the plugin.
The draw is that the API you use from Claude Code is the same one you'd call from a product you're building. The core is MIT-licensed and can run locally in Docker. Pro costs $19 a month and includes three seats.
Strengths
- Plugin hooks recall and save automatically
- Same API for your agents and your own app
- Open source with a local option
Limits
- Memory is keyed to a repo container, not to who is allowed to see what
- Usage is metered in credits
Open source (MIT) · Free with $5 credit; Pro $19/mo
Visit supermemory.ai ↗
Mem0
Best for: Teams already using Mem0 as the memory layer in their product.

mem0.ai - Connects to Claude Code
- Plugin or remote MCP
- Captures
- Batches every 5 exchanges and at session end
- Shared with your team
- Per user, agent or app entity
Mem0's Claude Code plugin buffers exchanges through hooks and sends a batch every five exchanges or when the session ends, then recalls on the first prompt of the next session. You can also connect the remote MCP server at mcp.mem0.ai, where saving happens only when the agent calls the tool. Mem0 stores extracted facts in a vector store; graph memory is on the Custom plan.
Two things changed in 2026: the OpenMemory MCP server is gone from the Mem0 repo, and the Starter, Growth and Pro plans are closed to new accounts. New users get a free tier (10,000 adds and 1,000 retrievals a month) and then usage billing or a custom contract.
Strengths
- Large ecosystem, about 68,000 GitHub stars
- Plugin plus MCP, with integrations for most coding agents
- Self-hostable under Apache 2.0
Limits
- Recall in Claude Code happens at session start, not on every prompt
- No published paid price for new accounts
- Team sharing isn't described in the docs
Open source (Apache 2.0) · Free tier; paid is usage-based or custom
Visit mem0.ai ↗
Basic Memory
Best for: People who want memory as Markdown notes they can open in Obsidian.

basicmemory.com - Connects to Claude Code
- Plugin or MCP (local or cloud)
- Captures
- Mostly agent-written notes; opt-in capture mode
- Shared with your team
- Cloud workspaces with members
Basic Memory stores everything as Markdown files that both you and the agent read and write, indexed for full-text and vector search. Install the Claude Code plugin with bm install claude-code to get a session-start briefing and a checkpoint before context compaction; the agent writes most notes itself through MCP tools.
It suits people who think of memory as a notebook they curate. Locally it's free under AGPL-3.0; Basic Memory Cloud costs $19 a month per workspace with two members.
Strengths
- Human-readable files you own
- Works with Obsidian
- Free locally
Limits
- Capture depends on the agent choosing to write
- AGPL license can rule it out inside some companies
Open source (AGPL-3.0) · Free locally; Cloud $19/mo per workspace
Visit basicmemory.com ↗
Set up Glen in Claude Code
Glen installs as a Claude Code plugin through its CLI. You need Node.js and a Glen account; the free plan covers 15,000 memories with no card.
1. Install the CLI and the plugin
This installs the glen CLI, signs you in, and adds the Claude Code plugin with its hooks.
bashnpx @tryglen/cli@latest install2. Start Claude Code in a repo
The session-start hook shows your org and recording mode. From the next prompt on, matching memories are injected and each finished turn is recorded.
3. Ask about past work
Ask something like "why does the billing worker batch at 500?" and the agent answers from team memory, with citations, or runs glen search for anything recall didn't cover.
bashglen search "why the billing worker batches at 500 instead of streaming"
Which one should you pick?
If you work alone, start with what Claude Code ships: auto memory and a project CLAUDE.md cost nothing and cover most of what one person needs. Add claude-mem if you want richer local capture and are happy to run it yourself.
Once a second engineer runs Claude Code in the same codebase, per-machine memory starts working against you: each session rediscovers what the other already found, and the only shared layer is whatever someone remembered to commit to CLAUDE.md. Glen is built for that case. It records every turn from every teammate's Claude Code, Codex and Cursor sessions into one store, injects the relevant part before each prompt, filters it by what each person is allowed to see, and drops facts the team has since reversed.
FAQ
- Does Claude Code have memory?
- Yes. CLAUDE.md files load at the start of every session, and auto memory (on by default) writes notes to ~/.claude/projects/<project>/memory/. Both are local to one machine; only CLAUDE.md files you commit to the repo are shared.
- Where does Claude Code store memory?
- Project instructions live in ./CLAUDE.md or .claude/CLAUDE.md, personal ones in ~/.claude/CLAUDE.md, and auto memory in ~/.claude/projects/<project>/memory/MEMORY.md plus topic files. Run /memory to see and edit what's loaded.
- Can my teammates' Claude Code sessions share memory?
- Not with the built-in features beyond a committed CLAUDE.md. Glen does it by recording every teammate's sessions into one org memory and recalling from it on each prompt, filtered by what each person can access.
- Is Glen an alternative to claude-mem?
- Both capture Claude Code sessions automatically through hooks. claude-mem is free, open source and local to your machine. Glen is hosted and shares memory across your team and across Claude Code, Codex and Cursor.
- Does a memory plugin slow Claude Code down?
- Recall adds a hook round trip before each prompt. In Glen's 100-PR replay that overhead was counted inside the result, and the Glen arm still finished 21% faster on 29% fewer tokens, because the agent spent less time rediscovering the codebase.
- Can I keep a Claude Code session out of memory?
- With Glen, run glen incognito to keep recall but record nothing, or glen off to do neither. Claude Code's own auto memory can be disabled with CLAUDE_CODE_DISABLE_AUTO_MEMORY=1.