[Blog](https://supermemory.ai/blog/) · [Learning](https://supermemory.ai/blog/tag/learning/)

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

By [Dhravya Shah](https://supermemory.ai/blog/author/dhravya/) January 30, 2026 · 7 min read 

![A blurred photo of sunlit leaves against a blue sky, with the supermemory logo and the headline Supermemory for Claude Code.](https://supermemory.ai/_astro/cover.Bd0TwQ1-_AnrdL.webp)

Start with what Claude Code already has. CLAUDE.md holds the rules you write and [auto memory holds notes Claude writes for itself](https://supermemory.ai/blog/claude-code-auto-memory/), and for one person on one machine that covers a lot ([Anthropic docs](https://code.claude.com/docs/en/memory)). 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](https://code.claude.com/docs/en/memory) 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](https://github.com/supermemoryai/claude-supermemory), [Cursor docs](https://supermemory.ai/docs/integrations/cursor) and [billing docs](https://supermemory.ai/docs/overview/billing) 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](https://supermemory.ai/blog/self-hosted-ai-memory-tradeoffs/) 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](https://github.com/supermemoryai/claude-supermemory)):

* **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](https://supermemory.ai/blog/claude-code-memory-rehab/). The plugin's settings and commands are in its [README](https://github.com/supermemoryai/claude-supermemory).

## Why we built it

![Claude Code and supermemory logos on a terracotta background under a line drawing of a face, captioned Supercharge your Claude Code with Supermemory.](https://supermemory.ai/_astro/image-1.CeHxeOh7_ZOL03j.webp)

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 plugin` sets up any of Claude Code, OpenCode and Codex in one go and signs you in through the browser ([changelog](https://supermemory.ai/changelog/every-coding-agent-plugin-is-now-free/)).
* **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](https://supermemory.ai/changelog/coding-plugins-now-free/)).
* **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](https://supermemory.ai/changelog/automatic-memory-recall-and-a-live-statusline-in-claude-code/)).
* **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](https://github.com/supermemoryai/codex-supermemory#shared-agents-containers) or [Cursor](https://supermemory.ai/blog/cursor-memory-via-mcp/).
* **A security fix in August.** If you installed before August 12, update: a crafted Bash command could be approved automatically during recall ([changelog](https://supermemory.ai/changelog/security-update-for-the-claude-code-plugin/)).
* **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](https://github.com/supermemoryai/claude-supermemory)).

### Can I use the plugin and supermemory's MCP server together?

Yes, and the plugin already registers the MCP tools. The [MCP server](https://supermemory.ai/mcp/) 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](https://supermemory.ai/pricing/) has the rates.

## Related posts

1. [Claude Code persistent memory: what it keeps between sessions, and how to add more Claude Code remembers two things between sessions: the CLAUDE.md files you write, and the auto memory notes it writes for itself. What each keeps, where they stop, and how to add memory that recalls earlier sessions and follows the repo to your other agents. LearningSep 16, 2026 ](https://supermemory.ai/blog/claude-code-memory-rehab/)
2. [OpenCode Memory with the Supermemory Plugin OpenCode doesn't remember earlier sessions on its own. It reads the instructions you write in AGENTS.md. The supermemory plugin adds memory that's saved as you work and recalled on each prompt, in OpenCode 1 and OpenCode 2. LearningJul 10, 2026 ](https://supermemory.ai/blog/opencode-memory/)
3. [Cursor memory: rules, memory banks and the supermemory plugin Cursor doesn't remember your earlier chats on its own. It loads the instructions you write down, in rules and AGENTS.md files. How memory banks fill part of the gap, and how the supermemory plugin adds memory that follows the repo, in Cursor and Grok Bot. LearningMay 27, 2026 ](https://supermemory.ai/blog/cursor-memory-via-mcp/)
4. [Self-hosted memory for AI agents: options and trade-offs You can self-host memory for AI agents three ways: build it on your own database, run a memory framework on your own servers, or run a vendor's memory server inside your network. What each leaves you to build, how to run supermemory Local, and what still leaves your network. LearningJul 1, 2026 ](https://supermemory.ai/blog/self-hosted-ai-memory-tradeoffs/)

## Other posts.

1. [How we built insanely good memory for grok bot (by making it a teammate instead) Grok Bot is built around Bots working together. So for Grok Bot, we built Supermemory as a Bot. It sits in the conversation like any other teammate. NewsNov 3, 2026 ](https://supermemory.ai/blog/grok-bot-memory/)
2. [We dug into Claude Code's memory. Here's exactly how it works Last month, our founder Dhravya Shah broke down how Instinct's memory works. We wanted to do the same for Claude, since that's where we spend most of our day. EngineeringOct 28, 2026 ](https://supermemory.ai/blog/claude-code-auto-memory/)
3. [How AI memory actually works. A beginner's guide How AI apps remember things between chats, why a bigger context window doesn't solve it, and the parts every memory system shares. EngineeringOct 9, 2026 ](https://supermemory.ai/blog/how-ai-memory-works/)
4. [We're open sourcing the company brain. Here's how we designed the multiplayer harness Company Brain is now open source. A walkthrough of the multiplayer harness behind its Slack experience, from proactivity and memory boundaries to approvals and recovery. NewsSep 25, 2026 ](https://supermemory.ai/blog/open-sourcing-company-brain/)
5. [Jev changes a lot in memory & context engineering. Here's exactly how. We tested Jev across reranking, chunking, observation, and harness decisions. Here is where fast decision models help memory systems, where they cost more, and where they still fall short. EngineeringSep 24, 2026 ](https://supermemory.ai/blog/jev-memory-context-engineering/)
6. [I reverse-engineered Instinct's memory. Here's exactly how it works Instinct keeps its memory as git-tracked markdown files, found with grep rather than vectors. Here is the whole system as far as black-box probing can reconstruct it, and how to rebuild it on supermemory in about 60 lines. EngineeringSep 20, 2026 ](https://supermemory.ai/blog/reverse-engineering-instinct-memory/)
7. [An update to supermemory We've discontinued the supermemory company brain and Nova. Everyone who was charged has been refunded, our MCP and plugins continue to run, and we're going all in on the memory engine. NewsSep 10, 2026 ](https://supermemory.ai/blog/an-update-to-supermemory/)
8. [Scaling Conversations: How Adapta Grew Usage Without Losing Context Adapta added Supermemory as a persistent memory layer so every conversation keeps its context — letting the team scale usage without losing the thread. Case StudyJun 12, 2026 ](https://supermemory.ai/blog/adapta-scaling-conversations/)
9. [How Chatarmin Ditched RAG and Went Memory-Only with Supermemory Chatarmin replaced a heavy RAG pipeline with Supermemory's memory layer — cutting average AI response time from 40s to 12s and token usage by 40–50%. Case StudyJun 10, 2026 ](https://supermemory.ai/blog/chatarmin-memory-only/)
10. [SMFS: making agentic retrieval 55% cheaper AND more accurate We launched SMFS.ai (Supermemory Filesystem) a few weeks ago, with a simple bet: We can redesign the filesystem specifically for agents, with special files, structures, and commands that it can use for it's tasks. Today, SMFS is used by hundreds of companies to power their agents. EngineeringMay 28, 2026 ](https://supermemory.ai/blog/smfs-making-agentic-retrieval-55-cheaper-and-more-accurate/)
11. [Introducing Dynamic Dreaming: supermemory now connects the dots, for you. Dreaming is magical. TLDR: We're launching Dynamic Dreaming in supermemory today, which automatically works if you're using supermemory in any way - API, OpenClaw, Hermes agent, etc. EngineeringMay 25, 2026 ](https://supermemory.ai/blog/introducing-dynamic-dreaming-supermemory-now-connects-the-dots-for-you/)
12. [Dear reader, we just made supermemory insanely cheap... the Context Cloud When I first started building supermemory, I had one goal: To build the best memory system for AI. I would talk to customers, and find out that memory was not the only thing they needed - They were all setting up 7-8 different vendors at the same time. EngineeringMay 18, 2026 ](https://supermemory.ai/blog/dear-reader-we-just-made-supermemory-insanely-cheap-the-context-cloud/)
13. [Introducing @supermemory/tools v2.0.0 Today we're releasing v2.0.0\. This release unifies the API across all agents sdk integrations from AI SDK to Mastra, makes conversation identity a first-class concept, and ships with memory saving on by default. EngineeringApr 27, 2026 ](https://supermemory.ai/blog/introducing-supermemory-tools-v2-0-0/)
14. [Solving the Precision-Recall Tradeoff: Search Result Aggregation When you're building memory for AI, search is your foundational layer. The way search generally works is straightforward: the user defines a query, and then sets a limit (top-K) on how many search results they want returned. Usually, this is set to 10 or 20. EngineeringApr 5, 2026 ](https://supermemory.ai/blog/solving-the-precision-recall-tradeoff-search-result-aggregation/)
15. [OpenClaw Memory Problems: Why It Forgets and How to Fix It (2026) OpenClaw remembers by writing Markdown files in its workspace, so it forgets anything the agent didn't save. Why that breaks down, how the supermemory plugin recalls and saves on every turn instead, and how to install it, free on every plan. EngineeringFeb 19, 2026 ](https://supermemory.ai/blog/why-everyone-is-complaining-about-openclaws-memory-it-sucks-and-why-supermemory-fixes-it/)
16. [Stateful Coding Agents with Memory: Build Long-Running Agents (2026) We built a plugin for Claude Code and OpenCode that gives your coding agent persistent memory. It remembers your preferences, learns your codebase, and never loses context mid-conversation. The result is an agent you can run for months without starting over. EngineeringFeb 18, 2026 ](https://supermemory.ai/blog/infinitely-running-stateful-coding-agents/)
17. [Clawd / Molt bot's memory SUCKS. We gave it supermemory. I'm the founder of supermemory. Clawd/Molt bot is blowing up right now, with many, many use cases. I set it up, too, and have been using it through telegram. TLDR: just go to https://supermemory.ai/docs/integrations/clawdbot to set up supermemory for your clawd bot. EngineeringJan 28, 2026 ](https://supermemory.ai/blog/clawd-molt-bots-memory-sucks-we-gave-it-supermemory/)
18. [Catch up with our UNFORGETTABLE Launch Week Over the last year, one belief has guided almost everything we’ve built at Supermemory AI becomes meaningfully useful only when it remembers. Memory shouldn’t be something developers rebuild from scratch. It shouldn’t be fragile, expensive, or trapped inside a single tool. NewsJan 4, 2026 ](https://supermemory.ai/blog/catch-up-with-our-unforgettable-launch-week/)
19. [Empowering the Next Generation of Founders: Supermemory Startup Program If there’s one thing we’ve learned while building Supermemory, it’s that most startups don’t fail because they didn't build features; they fail when infrastructure slows them down, or they built too slow. NewsDec 31, 2025 ](https://supermemory.ai/blog/empowering-the-next-generation-of-founders-supermemory-startup-program/)
20. [Building code-chunk: AST Aware Code Chunking At Supermemory, we're building context engineering infrastructure for AI. A huge part of that is dealing with code: ingesting repos, understanding structure, and making it searchable. The problem is that most code chunking solutions are terrible. We built code-chunk to fix this. EngineeringDec 29, 2025 ](https://supermemory.ai/blog/building-code-chunk-ast-aware-code-chunking/)
21. [Supermemory raises $3 million with the best memory engine for LLMs Today, I am excited to announce our first funding round to accelerate our mission of building an interoperable, scalable and reliable memory for LLMs and agents. Memory is one of the hardest challenges in AI right now. NewsOct 6, 2025 ](https://supermemory.ai/blog/supermemory-raises-3-million-and-building-the-best-memory-engine-for-llms/)
22. [Mem0 vs Supermemory: Why Scira Switched Scira AI moved its production memory layer from Mem0 to Supermemory. This is what failed, what improved, and how the team evaluated the two systems. Case StudyOct 2, 2025 ](https://supermemory.ai/blog/why-scira-ai-switched/)
23. [Never Record Again: How Montra Uses Supermemory to Rethink Video Creation Campbell Baron, the founder of Montra, has been making videos since he was twelve. By thirteen, he was already doing brand work. Today, he’s betting on a very different future for creators: a world where recording is the exception, and most videos are generated from scratch. Case StudyAug 21, 2025 ](https://supermemory.ai/blog/never-record-again-how-montra-uses-supermemory-to-rethink-video-creation/)
24. [Unified Memory That Works Where You Work: Your Second Brain With Supermemory Hi everyone, I’m Dhravya, the founder of Supermemory. I want to start with a little story behind why this product means so much to me. You can also skip straight to what it is and how it works below. EngineeringJul 25, 2025 ](https://supermemory.ai/blog/unified-memory-that-works-where-you-work-your-second-brain-with-supermemory/)
25. [Supermemory just got faster on PlanetScale What is Supermemory? Supermemory completes the missing part of the LLM puzzle: memory. Just as memory is crucial for human intelligence, it's essential for truly intelligent AI systems. EngineeringJul 18, 2025 ](https://supermemory.ai/blog/supermemory-just-got-faster-on-planetscale/)
26. [Faster, smarter, reliable infinite chat: Supermemory IS context engineering. People are obsessed with prompts and prompt engineering. Sure, what you say is important, but what the model knows when you say it is the difference between a stateless text generator and an intelligent AI system. In short, context is the most crucial component. NewsJul 9, 2025 ](https://supermemory.ai/blog/faster-smarter-reliable-infinite-chat-supermemory-is-context-engineering/)
27. [We solved AI API interoperability One API to rule them all, One spec to find them, One library to bring them all and in the TypeScript, bind them. When we were building the Infinite Chat API, initially, we only supported the OpenAI format. This was fine, until a lot of our customers started asking for more. EngineeringJul 7, 2025 ](https://supermemory.ai/blog/we-solved-ai-api-interoperability/)
28. [The Wow Factor of Memory - How Flow Used Supermemory To Build Smarter, Stickier Products Overview: Flow is a note-taking app built around a bold vision: to create a more personal, context-aware writing experience powered by AI. At the heart of this mission is memory. Case StudyJun 14, 2025 ](https://supermemory.ai/blog/the-wow-factor-of-memory-how-flow-used-supermemory-to-build-smarter-stickier-products/)
29. [The UX and technicalities of awesome MCPs Last month, we launched the Supermemory MCP, mostly to test our own infrastructure and get some initial traction. It blew up. To my absolute surprise, the initial launch itself got half a million impressions (!!!). Then, we launched and got #2 on ProductHunt too. EngineeringJun 8, 2025 ](https://supermemory.ai/blog/the-ux-and-technicalities-of-awesome-mcps/)
30. [Architecting a memory engine inspired by the human brain Language is at the heart of intelligence, but what truly powers meaningful interaction is memory — the ability to accumulate, recall, and contextualize information over time. Large Language Models (LLMs) have mastered language, but memory remains their Achilles’ heel. EngineeringJun 5, 2025 ](https://supermemory.ai/blog/memory-engine/)

## Start building with supermemory.

Memory and continual learning for any model, any harness. Available through our API, plugins, and MCP.

[Build with supermemory ](https://console.supermemory.ai/)
