Search and read structured memory from past sessions in this project. Use when the user asks "did we already do this?", "how did we fix X last time?", "what happened last week?", or when you need context from a previous conversation before answering.
Save durable cross-session memories — user feedback, project decisions, recurring patterns, and lessons learned. Use when the user says "remember this", "save this as feedback", "make a note that...", or when you notice a non-obvious fact that will matter in future sessions.
Read raw Claude Code session transcripts and the mnemo SQLite database directly. Use when recall output is truncated, when you need exact user wording or full tool output, or when you want to reconstruct a session from the source bytes.
Render the temporal/decision shape of a past session - phases, gaps, tool bursts, compact boundary, broken-prompt candidates. Use when the user asks how a session unfolded, what the decision arc was, where a decision happened, or when reconstructing a session after compacting.
Matches all tools
Hooks run on every tool call, not just specific ones
Admin access level
Server config contains admin-level keywords
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Structured memory system for Claude Code. Captures every tool call in real time, extracts durable observations and turn summaries via a background agent, and feeds them back into future sessions — so conversations start with context, not from scratch.
Claude-Mnemo hooks into five points of the Claude Code lifecycle:
| Hook | Trigger | What it does |
|---|---|---|
| SessionStart | Session begins / resumes / clears / post-compact | Injects recent session summaries, turn highlights, and active memories into context |
| UserPromptSubmit | Every user message | Creates (or resumes) the session + a new turn row in SQLite |
| PostToolUse | Every tool call | Writes a raw observation (tool_name + input + result), enqueues it for extraction, wakes the worker |
| Stop | Agent finishes a turn | Backfills the assistant response + tool counts, enqueues a turn-stop job |
| PreCompact | Main agent is about to compact | Synchronously flushes the worker queue for this session and pushes a final session summary |
Extraction does not run inside the hook process. Hooks write to SQLite and return; a long-lived worker (Bun HTTP server on 127.0.0.1:37778) picks up the work asynchronously, sends it to Mnemosyne (an isolated Claude Agent SDK query session), and writes the extracted titles, content, insights, tags, and types back into the same database.
Session [S12] one per conversation
Turn [T3] one per user prompt (promptNumber scoped to session)
Observation [O87] one per tool call
Memory [M4] durable cross-session knowledge
Turns carry a type tag: 🔴 bugfix · 🟣 feature · 🔄 refactor · ✅ change · 🔵 discovery · ⚖️ decision.
Memories are the durable layer — user feedback, project decisions, gotchas, and patterns — with scope either global or an absolute project path.
All pending extraction work lives in a single pending_queue table keyed by a monotonic seq (AUTOINCREMENT). Hooks write to pending_queue inside the same SQLite transaction as the observation or turn-stop update, so a crashed worker or killed hook never drops work — the next worker boot resumes from the queue in FIFO order.
In Claude Code, add the marketplace and install:
/plugin marketplace add KawaiiLLM/claude-mnemo
/plugin install claude-mnemo
Bun is the only runtime dependency — bun-runner.js auto-installs it if missing. Marketplace and source installs ship with prebuilt plugin/scripts/*.cjs entrypoints, so hooks, MCP, and the worker run without a post-install build.
git clone https://github.com/KawaiiLLM/claude-mnemo.git
cd claude-mnemo
npm install
npm run build
Then symlink the built plugin:
ln -s "$(pwd)/plugin" ~/.claude/plugins/claude-mnemo
For contributors, npm run build refreshes the committed release artifacts in plugin/scripts/.
Once installed, Claude-Mnemo works automatically — hooks fire on every session, the worker extracts in the background, and SessionStart injects context on the next launch.
Two skills expose the read and write paths to the main agent:
mnemo-recall — Reading Past WorkAuto-loaded when the user asks questions like "did we already do this?", "how did we fix X last time?", or "show me the exact tool calls from last Thursday". Documents the full recall + replay API.
Quick reference:
recall() # recent sessions
recall(query="auth race") # FTS across all layers
recall(query="type:bugfix file:src/auth.ts") # typed filters
recall(time="-7d") # relative time window
recall(id="S12") # session summary
recall(id="S12/T3") # turn by promptNumber
recall(id="S12/T3..7", depth="expanded") # turn range with content
recall(id="S12/T3/O*") # observations in a turn
recall(id="O87", depth="expanded") # specific observation
recall(id="M*") # all active memories
replay(id="S12") # transcript turn overview
replay(id="S12/T3", depth="expanded") # exact prompt + response + tool I/O
replay(id="S12/T3/Tool2", depth="full") # single tool call, untruncated
npx claudepluginhub kawaiillm/claude-mnemo --plugin claude-mnemoPersistent local memory for Claude Code. Every tool call, every file edit, every thinking block from every session — stored verbatim on your machine. Semantic recall in ~126ms with zero API calls.
Automatic semantic memory for Claude Code — remembers what you worked on across sessions
Persistent memory across Claude Code sessions using Cognis
Persistent memory system for Claude Code - seamlessly preserve context across sessions
Semantic search for Claude Code conversations. Remember past discussions, decisions, and patterns.
Persistent memory for Claude Code. Capture work across sessions and recall relevant context.