vshulcz/deja-vu

Coding agent memory for Claude Code, Codex, Cursor and 38 more, built from the session history already on your disk. Local search, MCP and hooks, no LLM, one Go binary.

off_topic: false

One-liner: Locally indexes the session history of 41+ coding AI agents (Claude Code, Codex, Cursor, etc.) and hands the relevant past decisions back to whichever agent is working now, so it stops re-debugging what you already fixed.

What it is: deja-vu is a single Go binary that scans, indexes, and searches the transcripts that coding agents already save to disk. It exposes that memory via a CLI, a TUI, and an MCP (Model Context Protocol) server so agents can recall past fixes, commands, and decisions automatically — without any cloud service or embeddings.

Why it matters: AI coding agents have severe amnesia — they forget what they did last week, last month, or in another tool. This creates repeated failures and re-debugging. deja-vu solves the 'one memory, every agent' problem: a fix found in Codex comes back in Claude Code, because all agents read the same local index.

Key highlights (all from README):

  • Starts full: Indexes months of pre-installation history on day one (indexes 19,195 sessions in ~17.6s).
  • Proactive recall: Delivers relevant memory at session start, before file edits, and after a command fails — via a single MCP tool (deja) costing only 477 tokens of definitions per turn.
  • Local & private: No model, no embeddings, no server. Credentials are redacted as the index is built ([redacted:<kind>]), and deja secrets can scrub source transcripts.
  • Survives compaction: Keeps 77% of decisions and 0.2% of commands across 43 measured compactions.
  • Rich CLI: Includes deja <query> (semantic-ish search with word forms), deja blame <file> (which sessions discussed it), deja fix <error> (what worked after that error before), deja wip (current work), deja resume <id> (reopen a session), deja promote <id> (distill into a curated note), and deja sync (move memory between machines via SSH).
  • Cross-harness: Wires into 41 agents (Claude Code, Codex, Cursor, opencode, etc.) by writing to each agent's own guidance/skill files.
  • Benchmark: 97.2% R@5 recall on LongMemEval-S, using half the tokens of agentmemory.

How it works (tech): It's a compiled Go program. It uses MCP (Model Context Protocol) to expose recall to agents Looks up session transcripts from many specific agent tools on disk, indexes text (no embeddings — it uses lexical + word-form matching), and serves results through a TUI, CLI, or MCP server.

Target audience: Developers who heavily use AI coding agents and want persistent, cross-tool memory for their own projects without sending history to a cloud service.

Quick start: curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh followed by deja install --auto (macOS/Linux). Windows via scoop install deja-vu or winget install vshulcz.deja-vu.

Related

  • Project
  • Project
  • Project
  • Project
  • Project