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.

Try it on your existing transcripts: deja-vu builds its SQLite + FTS5 index across Claude Code, Codex, Cursor and 49 other agents in 13.6 seconds (19,195 sessions; 97.2% R@5 on LongMemEval-S) and wires lifecycle hooks plus .deja/memory.jsonl.
$brew install deja-vu && deja install --auto
$npx @vshulcz/deja-vu install --auto
deja-vu on GitHubDay-zero benchmarks →

What differs

deja-vuclaude-mem
Where memory comes fromthe session files each agent already keeps, including everything from before installhooks record sessions from install on
Who writes itnobody: transcripts are indexed as written, with secrets redacteda 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 backgroundnothinga worker on Bun with an HTTP port, and Chroma for vector search
Installone 20 MB binarynpx claude-mem install, which pulls Bun and uv if missing
Agents52, read nativelyClaude Code, Codex, Cursor, opencode, Windsurf, Antigravity, Grok Bot, OpenClaw
Tool definitions sent with every request477 tokens, 1 tool2,307 tokens, 15 tools
Searchlexical, optional embeddingsSQLite FTS5 and Chroma vectors
Browse itdeja view, one local HTML fileweb viewer served by the worker
LicenseMITApache-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 deja reads ~/.claude-mem/claude-mem.db read-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.