In a YouTube interview, Alex Newman, who maintains Claude-Mem, described it as a tool that gives agents "persistent context across sessions." By June 2, the open-source project had drawn 80,253 stars and 6,910 forks on GitHub, with 149 open issues and pull requests.
Under the installation guide, Claude-Mem captures session events through hooks, compresses them into observations and exposes search through MCP. The same guide lists Claude Code, Cursor, Gemini CLI, Windsurf, OpenCode and Codex CLI as supported hosts, which turns a memory plug-in into a local worker and database stack.
Newman gave the open-source rationale in the same interview, saying the project was moving to Apache 2 "so that anybody can take it and build the primitives into their systems." Changelog entry v13.0.0 records the relicensing from AGPL-3.0 to Apache-2.0.
Key Takeaways
- Claude-Mem captures Claude Code tool use through hooks and stores dated observations for later recall.
- The supported install path is npx or the Claude Code marketplace, not npm global install.
- Gemini and OpenRouter can generate observations, but host hooks or adapters still matter.
- Local storage reduces cloud exposure, while provider calls and transcript growth remain watch items.
AI-generated summary, reviewed by an editor. More on our AI guidelines.
The hook path
Claude-Mem's architecture document names the moving parts: Claude Code hooks, a Bun CLI layer, an Express worker, SQLite, Chroma and an MCP server. Current docs describe hooks around SessionStart, UserPromptSubmit, selected pre-tool file context, PostToolUse and Stop summary handling. Transport errors exit without blocking Claude Code.
Newman described the hook result in the interview. Claude-Mem is "not like a transcript memory tool," he said, because it creates "new thoughts, new observations" and searches those. The Getting Started guide says each captured tool execution can be processed into a title, subtitle, narrative, facts, concepts, type and file reference.
A debugging session that used Read, Bash and Edit can later reappear as a dated observation about the failing test, the file touched and the fix attempted. The next Claude Code session gets a prior record before it scans the repository again.
The setup stack
The supported install path is npx claude-mem install, or the Claude Code marketplace commands /plugin marketplace add thedotmack/claude-mem and /plugin install claude-mem. The docs warn that npm install -g claude-mem installs only the SDK and library. It does not register hooks or start the worker.
The installer and repair command handle Bun, uv and plug-in cache dependencies outside the Claude Code session. The Setup hook, according to the installation guide, only reads the .install-version marker and tells the user to run npx claude-mem repair if the marker is stale.
| Use case | Setup path | Caveat |
|---|---|---|
| Claude Code | npx claude-mem install or marketplace plugin | Worker and hooks must both be active |
| Gemini or OpenRouter | Set CLAUDE_MEM_PROVIDER and provider keys | Output format and rate limits matter |
| Cursor, Codex or OpenCode | Use detected IDE wiring or an adapter | The host still needs compatible events |
A successful Claude Code launch is therefore not enough evidence of memory. The operator still has to check worker logs and confirm that new rows appear in observations or session_summaries.
Gemini, OpenRouter and host adapters
For observation extraction, the configuration docs list Claude, Gemini and OpenRouter. The Gemini page puts the tradeoff in rate limits: 5 to 10 requests per minute without billing, compared with 1,000 to 4,000 RPM after billing is enabled. OpenRouter's page points to more than 100 models and OpenAI-compatible routing.
Provider support stops at parsing. In issue #2738, a user report says Gemini and OpenRouter history truncation can drop the init prompt containing output instructions. The provider can then return prose that the parser rejects instead of the XML-style observation format.
Host support depends on wiring. Gemini CLI setup installs eight lifecycle hooks into ~/.gemini/settings.json and injects context into ~/.gemini/GEMINI.md. Cursor docs say users can run Claude-Mem without a Claude Code subscription when Gemini or OpenRouter supplies the observation model. The adapters guide tells new Codex or OpenCode-style hosts to emit the REST V1 event shape rather than depend on Claude Code internals.
Where the memory can break
The search tools describe a three-step recall path: compact search results first, timeline context second and full observations only on demand. The docs estimate 50 to 100 tokens for a search result, 100 to 200 for a timeline observation and 500 to 1,000 for a full observation, versus loading 20 full observations upfront.
Later in the interview, Newman said memory systems hallucinate when they have "no temporal context" and no timestamp, leaving a bucket of facts that can surface in unrelated tasks. The project's production guide reports 23 days of use with more than 3,400 observations across two servers and eight projects.
Get the briefing on AI agents that keep state
Strategic AI news from San Francisco. No hype, no "AI will change everything" throat clearing. Just what moved, who won, and why it matters. Daily at 6am PST.
No spam. Unsubscribe anytime.
Published growth estimates do not cover every failure. The production guide estimates about 24 MB a month for SQLite and 120 MB a month for Chroma under active daily development. Issue #2754 reported observer transcripts reaching 6.1 GB across 287 JSONL files, including one 1.9 GB file.
The security policy says state is written locally and that Claude-Mem does not collect telemetry. It also says prompts or transcript context can leave the machine through Claude Agent SDK, Gemini, OpenRouter or embedding backends, depending on configuration, and that Claude-Mem reads the Claude Code OAuth token from the platform credential store before injecting it into worker subprocesses. Private tags strip marked content before storage, but Claude still sees that text in the live session.
Claude-Mem records tool use and summaries instead of asking the next session to reconstruct history from prompt context. After installation, users should open the viewer or the SQLite database and confirm that observations and summaries are being written.
Know someone who'd find this useful? ✉️ Email it to a friend in one click, or they can subscribe free here.
Frequently Asked Questions
What is Claude-Mem?
Claude-Mem is a memory layer for coding agents. It captures tool use, turns sessions into structured observations, stores them locally and exposes search tools so later sessions can retrieve relevant project history.
How do I install Claude-Mem?
Use npx claude-mem install or the Claude Code plugin marketplace commands. The project docs warn that npm install -g claude-mem installs only the SDK and library, not the hooks or worker.
Does Claude-Mem work with models besides Claude?
Yes, for observation generation it supports Claude, Gemini and OpenRouter. That does not make every chat app compatible; the host still needs hooks, a plug-in path or a compatible adapter.
Where does Claude-Mem store data?
The docs place the database, logs, settings and worker state under ~/.claude-mem/ by default. Security docs say Claude-Mem does not collect telemetry, while provider calls can still transmit prompt or transcript context.
What should users watch after setup?
Verify the worker is running, observations and summaries are being written, semantic search works and transcript growth stays bounded. The issue tracker shows current failures around Chroma, provider output and transcript size.
AI-generated summary, reviewed by an editor. More on our AI guidelines.



IMPLICATOR