claude-supermemory
Persistent memory for Claude Code, powered by Supermemory

Conceptual overview. Some command names in the image predate the current plugin; see Commands for what's available now.
A Claude Code plugin that gives your agent persistent memory across sessions using
Supermemory. Your agent remembers what you worked on, across
sessions and across projects.
Installation
Requires Node.js 18+ on your PATH. The memory hooks run as Node scripts.
/plugin marketplace add supermemoryai/claude-supermemory
/plugin install supermemory
Set your API key (get one at console.supermemory.ai),
or just start a session and let browser login handle it:
export SUPERMEMORY_CC_API_KEY="sm_..."
Migrating from the old claude-supermemory plugin
That plugin was renamed to supermemory, so it won't update in place. Migrate with:
/plugin marketplace update supermemory-plugins
/plugin install supermemory@supermemory-plugins
Then, only if you still have the old plugin installed, remove it:
/plugin uninstall claude-supermemory@supermemory-plugins
Features
| |
|---|
🧠 Direct recall When authenticated, the hook searches substantive prompts before Claude sees them and injects fresh matches. No permission prompt or MCP tool call. | 🔎 Hosted MCP tools
search_memory, listSpaces, whoAmI, and more are available through the same credentials as the hooks, subject to your Claude Code permissions. |
💾 Auto capture At the end of a session, the Stop hook saves new conversation content in the background. It asks Supermemory to retain durable context rather than transient Git state. | 🏷️ Shared repo memory Automatic captures use the repository container shared with Codex and OpenCode and carry sm_scope: personal metadata. |
🧭 Deep multi-container search The context-gatherer subagent fans out several searches across a project's containers and returns a synthesized brief. | ⚙️ Project config Per-repo settings, API keys, and container tag overrides via .claude/.supermemory-claude/config.json. |
🗂️ Codebase index
/supermemory:index saves architecture, conventions, and how to run into this project's container. | 👋 Session context Loads profile facts at session start and shows a welcome-back notice when you return to a project after 6+ hours. |
- Recall strip — On Claude Code 2.1.287+ in the terminal, press the changing memory headline above the prompt to browse the full returned facts one at a time
On Claude Code 2.1.250, local marketplace install/update and the SessionStart and UserPromptSubmit command hooks were verified, but claude plugin validate rejects the recall mod's classic.SessionStart event. The strip is not available on that version; other older versions and install sources have not been verified.
How it works
Claude Code supports hooks and MCP servers. supermemory registers four hooks, in lifecycle order:
SessionStart → UserPromptSubmit → PreToolUse → Stop
| Step | Hook | Event | What it does |
|---|
| 1 | session-start | SessionStart | Bootstraps auth and loads profile context plus a welcome-back notice. It does not install a statusline; an old auto-installed one is removed. |
| 2 | recall-directive | UserPromptSubmit | Searches Supermemory directly with the prompt and injects fresh matches, deduplicated within the session. |
| 3 | recall-approve | PreToolUse | Displays read-only Supermemory activity without approving calls or changing their input. |
| 4 | capture | Stop | Saves the completed conversation delta in the background. |
By default, recall is performed by the hook itself, not delegated to the model. It searches
substantive prompts when authenticated, without waiting for Claude to choose a tool call.
Setting recallDirective switches to advisory mode: the hook stops searching and instead
tells Claude when it should decide to search on its own.