Claude-Mem
Updated
Persistent memory compression system built for Claude Code. Context survives across sessions by capturing tool observations and generating semantic summaries.
/plugin marketplace add thedotmack/claude-mem && /plugin install claude-mem npx claude-mem install npx claude-mem install --ide gemini-cli npx claude-mem install --ide opencode What it does
Every new Claude Code session makes you re-explain prior decisions, which files you touched, and which bugs you fixed. Long sessions exhaust the context window and /compact inevitably drops important detail.
Claude-Mem runs a background observer agent that records and classifies Claude’s work in real time, compresses it with AI, and stores it. On the next session, only the relevant slice of project history is auto-injected — no more repeating yourself.
Features
- Real-time observation — a dedicated observer agent emits searchable “observations” during the session, auto-classified as decisions, bug fixes, feature additions, and discoveries
- Progressive Disclosure — a lightweight index (~2.1k tokens) loads at session start; detailed observations (~850 tokens each) load on demand, with token cost visible
mem-searchskill — natural-language queries over project history (e.g. “find decisions about token refresh”, “what decisions touched index.ts?”)- Web Viewer — live memory stream at
http://localhost:37777for inspection and management - Claude Desktop skill — the same memory search is available in Desktop app conversations
- Privacy control — content wrapped in
<private>tags is excluded from storage - Citations — reference prior records by observation ID to trace provenance
- Automatic operation — runs in the background after install; no extra commands required
Supported environments
| Client | Support |
|---|---|
| Claude Code | ✓ (plugin or NPX) |
| Claude Desktop | ✓ (memory search skill) |
| Gemini CLI | ✓ (--ide gemini-cli) |
| OpenCode | ✓ (--ide opencode) |
| Cursor IDE | ✓ (integration guide in docs) |
Requirements
- Node.js 18.0.0 or later
- Claude Code (plugin-capable version)
- Bun, uv, SQLite 3 — auto-installed/bundled during setup
Notes
- Built by Alex Newman (@thedotmack). Architecture, integration guides, and advanced settings are at the official docs.
- License is AGPL-3.0 — network-service distribution triggers source disclosure. The
ragtime/directory is under PolyForm Noncommercial instead. - Experimental features like Endless Mode are available on the beta channel.
- This plugin isn’t on claude.com/plugins; add the marketplace first with
/plugin marketplace add thedotmack/claude-mem, then install.
Frequently Asked Questions
What is Claude-Mem?
A persistent memory plugin where a background observer agent records, classifies, and compresses what happens during a Claude Code session, then re-injects the relevant items at the start of the next session. Built by Alex Newman (@thedotmack).
Where does it run?
Claude Code, Claude Desktop, Gemini CLI, OpenCode, and Cursor IDE.
How do I install it?
In Claude Code: `/plugin marketplace add thedotmack/claude-mem && /plugin install claude-mem`. A universal NPX install (`npx claude-mem install`) and IDE-specific options for Gemini CLI / OpenCode are also supported.
What are the prerequisites?
Node.js 18.0.0+ and Claude Code (plugin-capable). Bun, uv, and SQLite 3 are installed or bundled during setup.
What's the license?
AGPL-3.0 — network deployment triggers source-disclosure obligations. The `ragtime/` directory is licensed under PolyForm Noncommercial.
Can I keep sensitive content out of memory?
Yes. Wrap content in `<private>` tags and it's excluded from storage.