A claude-mem alternative for Codex, Cursor and opencode
memory built from the transcripts already on disk, with no model writing it
claude-mem is the memory plugin most people meet first. It has 95k stars, and it now installs into Codex, Cursor, opencode, Windsurf, Antigravity, Grok Bot and OpenClaw as well as Claude Code. It watches sessions through hooks and has a model write summaries of what happened, which the next session gets back.
deja-vu takes the other route. Every coding agent already writes its sessions to disk; deja indexes those files as they are and hands the relevant turns back to whichever agent is running. Nothing writes the memory, so nothing has to be paid to write it, and the history from before you installed it is there on the first day.
.deja/memory.jsonl.brew install deja-vu && deja install --autonpx @vshulcz/deja-vu install --autoWhat differs
| deja-vu | claude-mem | |
|---|---|---|
| Where memory comes from | the session files each agent already keeps, including everything from before install | hooks record sessions from install on |
| Who writes it | nobody: transcripts are indexed as written, with secrets redacted | a model summarises each session: claude-mem's hosted observer (sign-in, 14-day trial), your OpenRouter or Gemini key, or your Anthropic plan |
| Runs in the background | nothing | a worker on Bun with an HTTP port, and Chroma for vector search |
| Install | one 20 MB binary | npx claude-mem install, which pulls Bun and uv if missing |
| Agents | 52, read natively | Claude Code, Codex, Cursor, opencode, Windsurf, Antigravity, Grok Bot, OpenClaw |
| Tool definitions sent with every request | 477 tokens, 1 tool | 2,307 tokens, 15 tools |
| Search | lexical, optional embeddings | SQLite FTS5 and Chroma vectors |
| Browse it | deja view, one local HTML file | web viewer served by the worker |
| License | MIT | Apache-2.0 |
The claude-mem column is from its README and repository at v13.28.0, read on September 29, 2026. The token counts were measured on September 24 against claude-mem 13.25.3; the method is on the day-zero page. Corrections welcome: open an issue.
The first day
Memory that records forward is empty on the day you install it. On the day-zero corpus, 19,195 real sessions and 100 questions whose answers are somewhere in them, claude-mem answers none, and that is its design rather than a fault: it has not recorded anything yet. deja builds its index over the same pile in 13.6 seconds and puts the right session first for 19 questions and in the top fifty for 65. The same table has six other tools that read existing history.
What a summary keeps
A summary is cheaper to inject and drops whatever the writer did not think mattered: the exact error text, the flag, the command that failed before the one that worked. deja keeps the turns, so deja fix "<error>" returns what was run after the same error last time, and deja blame path:line the session that wrote the line. The cost is the other side of it: the record is bigger than a summary, and lexical search misses paraphrases an embedding would catch. The benchmarks page shows where.
When a summary stream fits differently
- If your workflow prefers short LLM-curated bullet summaries from new sessions over preserving verbatim failing commands, exit codes, and file diffs across 52 tools, a forward-capture observer optimizes for shorter notes.
- Because
dejareads~/.claude-mem/claude-mem.dbread-only across all 52 supported agents, both styles can coexist without losing older observations.
Switching, or running both
brew install deja-vu # or: curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh deja install --auto
--auto wires every agent it finds on the machine: the MCP server, session-start recall where the agent has hooks, and the first index, so sessions from months ago answer in the next session you open. Per-agent details are under Codex, Cursor and opencode.
The two do not get in each other's way. When switching, deja also reads ~/.claude-mem/claude-mem.db directly so observations from sessions older than Claude Code's 30-day transcript cleanup remain searchable. Both can run together: deja only reads the SQLite store and never modifies ~/.claude-mem. Both add context when a session opens, though, so with both on the agent gets two blocks. If that is more than you want, deja install --all wires the same agents without the session-start recall, and deja answers only when the agent asks.
Questions people ask
What is a lightweight alternative to claude-mem that does not require Bun, Node.js, or background workers?
deja-vu ships as a single 20 MB Go binary with no Bun, Node.js, Python or background daemon. It indexes local transcripts on demand and serves recall over stdio MCP and short-lived CLI hooks.
Can deja-vu search sessions from before it was installed?
Yes. Because coding agents already write their transcripts to disk, deja index indexes months of existing Claude Code, Codex and Cursor sessions on the first run.
Does deja-vu work across Codex, Cursor, Gemini CLI, and OpenCode in addition to Claude Code?
Yes. deja-vu natively parses 52 coding agents — including Claude Code, Codex, Cursor, Gemini CLI and opencode — into one shared local index, so a fix or decision in one agent is recalled in the others (switching agents).
Every memory tool, compared · Day zero · What memory costs
Found this useful? Star deja-vu on GitHub.