Claude Code Memory: Persistent Memory Across Sessions (2026)
Claude Code forgets everything between sessions. The supermemory plugin gives it persistent memory - your style, your codebase, your decisions - in two commands. Here's how it works and how to set it up.

Claude Code has genuinely changed how I work. But there's this one thing that drives me crazy: every day, I have to explain the same exact things to it.
"The user service connects to Postgres, not MySQL." "Don't refactor that function - I know it looks ugly but there's a reason it's like that."
Claude writes great code. Then I close the session, and it forgets everything. Next day? Groundhog Day. Again.
We have all built workarounds - massive CLAUDE.md files, copy-pasting context at the start of every prompt, maintaining "memory" documents the agent never looks at.
So we built something.
The two-command install
/plugin marketplace add supermemoryai/claude-supermemory
/plugin install supermemory
That's it. Claude Code now has persistent memory. (GitHub)
Once installed, the plugin runs on its own:
- Reasoned recall - before each turn, Claude decides whether recalling memory would help the current message, and only searches when it's worth it.
- Auto-capture - conversations and important tool usage are saved for later sessions.
- Team memory - project knowledge is shared separately from your personal memories.
- Explicit skills - ask Claude to search or save memories when you want control.
Commands
| Command | What it does |
|---|---|
/supermemory:index |
Index codebase architecture and patterns |
/supermemory:project-config |
Configure project-level settings |
/supermemory:session |
Show a clickable URL for the current session document |
/supermemory:status |
Show authentication status |
/supermemory:logout |
Clear saved credentials |
CLAUDE.md vs. memory: files first, memory always
CLAUDE.md is not the enemy. It's static memory - the rules you already know you want enforced. Keep it. But it has three limits:
- You have to write it. It only contains what you remembered to put there.
- It never learns. Session 50 knows exactly what session 1 knew.
- It's all-or-nothing. The whole file rides along on every prompt, relevant or not.
Persistent memory is the complement: it captures what actually happens in sessions, tracks how your preferences change, and retrieves the right slice at the right moment. The setups that work best use both - CLAUDE.md for the constitution, memory for everything that happens after.
it remembers where you left off
We utilize user profiles in supermemory to create a profile of you, which contains both episodic content about you, as well as the "static" information. Claude knows that this week, your entire goal is to drive the costs down and migrate to another postgres provider.
it learns your style
Instead of writing slop code just like everyone else, it will learn as you use it - like "Use less useEffects!!!". Claude code will now remember exactly how you fixed an error last time, and this knowledge compounds into an agent that feels truly insanely customized for your use case... slowly.
it knows YOU
It knows that you're a founder, or college student, or a system engineer, and will suggest tools and practices accordingly. Claude code learns your requirements, your style, your taste. Because taste is the #1 thing that differentiates good engineering vs bad.
Developer: "I need to add rate limiting to this endpoint"
Agent: "Based on the rate limiting you implemented in the payments-api
last month (using sliding window with Redis), and your preference for
the express-rate-limit middleware, here's an approach that matches
your existing patterns..."
The technical piece that makes this work is what we call hybrid memory.

Most "memory" solutions for AI are just RAG - retrieve some similar documents and stuff them in the context. That works for knowledge bases. It doesn't work for memory.
Memory isn't just "find similar stuff." It's understanding that when you say "the auth bug," you mean the specific issue you've been debugging for three days. It's knowing that your preferences have evolved - you used to like classes, now you prefer functions. It's tracking that a decision was made, then revisited, then changed.
We built a system that actually extracts facts, tracks how they change over time, builds a profile of you that's always current, and retrieves the right context at the right moment. Not just similar context - relevant context. On LongMemEval, the benchmark for this, supermemory scores 85.2%.
How is this different from the MCP?
The supermemory MCP is great, but comes with one big limitation: we cannot control when claude code chooses to run the tools. That means no control over what the system gets to learn from - and a memory system is only good if there's things to recall later.
This plugin adds:
- Context Injection: on session start, a User Profile is automatically injected into Claude's context
- Automatic Capture: conversation turns are captured and stored for future context
Both of these were not possible with the MCP before.
Prefer everything on your machine?
The plugin works with self-hosted supermemory. Run npx supermemory local, point the plugin at your local API with the key printed on first boot, and your data never leaves your machine.
So, go ahead and install it! Instructions here: github.com/supermemoryai/claude-superme…

Feel free to let us know if you like it, you can also join our community supermemory.link/discord for any feedback!