Alex Newman (thedotmack) · 2026-04-09 · major
claude-mem — Persistent Memory Plugin for Claude Code
Claude Code plugin that captures every coding session, compresses it with Claude's agent-sdk, and re-injects relevant context next time. 54k stars; v12.1.0 adds Knowledge Agents for queryable corpora.
Give Claude Code memory that survives session restarts — local-first, compressed, and searchable via MCP.
Key specs
| Version | v12.1.0 |
|---|---|
| License | AGPL-3.0 |
| GitHub stars | 54k |
| Contributors | 92 |
| Supported languages | 24 |
What is it?
claude-mem is an open-source Claude Code plugin by Alex Newman (@thedotmack) that gives Claude persistent memory across coding sessions. It runs locally, stores everything Claude does in a Chroma vector database and SQLite, and uses lifecycle hooks to inject relevant past context back into new sessions automatically. The project has grown to 54k GitHub stars and 228 releases, and v12.1.0 shipped on 2026-04-09.
How does it work?
Five Claude Code lifecycle hooks observe the session and capture tool calls, file reads, and messages. A compression pass (using Claude's agent-sdk) turns that raw history into observations stored in ~/.claude-mem. On the next session start, a semantic + keyword hybrid search pulls relevant observations and injects them as context. v12.0 added intelligent file-read gating — when a file already has observations, the PreToolUse hook blocks the redundant read and injects the prior observations instead. v12.1 introduces Knowledge Agents: you compile a filtered slice of observations into a corpus, prime it into a session, and ask questions conversationally through 6 new MCP tools and 8 HTTP endpoints.
Why does it matter?
Claude Code, Codex, and similar agents forget everything between sessions, forcing you to re-explain context on every restart. claude-mem is the most-starred community answer to that problem, and the rate of v11 → v12.1 improvements (semantic injection, file-read gating, platform source isolation across Claude and Codex, Knowledge Agents) shows it's being used hard in practice. AGPL-3.0 means teams can self-host it without worrying about cloud-memory lock-in.
Who is it for?
Claude Code / Codex users who want persistent project memory without a hosted service.
Try it
npx claude-mem install