About this project

deja-vu is a local-only memory layer for AI coding agents. It indexes the session transcripts that 34+ agents—including Claude Code, Codex CLI, Cursor, Copilot CLI, Gemini CLI, Goose, and many others—already write to disk, and makes that history searchable across all of them. A fix found in one agent becomes retrievable in any other. Key capabilities: - Retroactive search: Queries gigabytes of existing history, including sessions from before deja-vu was installed. Natural-language queries fall back to relevance tiers; time is a hint, not a filter. - Cross-agent recall via MCP: A single `deja` MCP tool in `recall` mode answers questions like "we fixed this three weeks ago" regardless of which agent originally solved it. - Compaction survival: On Claude Code and Codex, hooks capture the task, files, and commands as compaction starts, then return them once in the next session. Measured over 43 compactions, summaries retain 77% of decisions but only 0.2% of commands; deja-vu recovers the rest. - Point-of-action recall: Before an agent edits a file or runs a command, deja-vu surfaces prior decisions or working invocations. A PostToolUse hook answers with what followed the same error previously. - Work indexing: Records files opened, commands run with exit status, and exact edit spans—the details summaries discard. - Redaction: AWS keys, API tokens, JWTs, PEM private key blocks, bearer tokens, URL credentials, and high-entropy values are stripped at index time. CLI commands include `deja <query>` for searching, `deja blame <path>` for file-level history, `deja fix <error>` for past error resolutions, `deja friction` for recurring errors, `deja ctx <query>` for a markdown digest, `deja sync ssh` for machine-to-machine memory transfer, and `deja stats --card` for a visual summary. `deja forget` writes tombstones to prevent re-indexing of removed sessions. Installation is via curl script, Homebrew, Scoop, Go install, or npx. `deja install --auto` wires MCP recall into every detected agent and builds the first index. Optional semantic recall is available through `deja embed` with a local Ollama, LM Studio, or OpenAI-compatible endpoint; lexical search works without it. The repository ships benchmark harnesses (LongMemEval-S and LoCoMo) and multiple `deja bench` subcommands for recall ranking, context digestion, block survival, and ingestion cost. All indexing and search run locally; the network is used only by `deja update`, `deja sync ssh`, and version checks.