# deja-vu

> Local memory tool that indexes existing coding-agent session transcripts and returns relevant past work to agents via hooks and MCP.

deja-vu is an open-source, MIT-licensed local memory tool for coding agents, maintained by vshulcz. It indexes the session transcripts that Claude Code, Codex, Cursor and dozens of other agents already write to disk, then hands relevant past work back to whichever agent is running through hooks and an MCP server. It ships as a single Go binary, with the latest release listed as v0.23.1.

## What It Is

A memory layer for coding agents that treats existing transcripts as the memory, so there is no separate capture step. It parses each agent's session store in place, builds a local index, and strips credentials such as keys, tokens and PEM blocks as the index is built. Indexing and search run locally with no LLM; embeddings are used only if semantic recall is enabled.

## How the Workflow Runs

After installing with the shell script, `deja install --auto` wires MCP recall into the agents it finds, enables session-start recall where supported, and builds the first index. Agents can then recall past work at session start, before a file is edited or a command runs, and after a command fails. Running bare `deja` opens a terminal search screen over every agent's history, where you can read a session, resume it in its own agent, or continue it in another agent with what it asked, decided and left open.

## Commands and Outputs

The CLI includes search, `wip`, `blame` for tying files to sessions, `fix` and `how` for past errors and commands, `ctx` digests, `handoff`, `sync` between machines over SSH, `stats --card` for a shareable SVG summary, and `secrets` for finding credentials left in source transcripts. The MCP server exposes a single `deja` tool with several modes, including recall, context, blame, fix, how, orient, remember and handoff.

## Privacy and Benchmarks

The docs state that nothing leaves the machine unless configured, with no account or telemetry. The author, who maintains the project, publishes benchmark results such as 97.2% R@5 on LongMemEval-S and a 17.6 s index of 19,195 sessions, and says the drivers and corpus are in the repository for re-running.

## Features
- Indexes existing session transcripts from 43 coding agents
- Retroactive search over months of prior history
- MCP server with a single deja tool and multiple modes
- Auto-recall hooks at session start, before edits or commands, and after failures
- Terminal search screen with filters, resume and cross-agent continue
- Credential redaction at index time
- deja blame, fix, how, wip and ctx commands
- Handoff of sessions between agents
- SSH-based sync between machines
- Optional semantic recall via local or OpenAI-compatible embeddings
- Stats card export as SVG
- Local benchmarks via deja bench

## Integrations
Claude Code, Codex CLI, Cursor, opencode, Gemini CLI, Cline, Copilot CLI, Roo Code, aider, Goose, Qwen Code, Kimi Code, OpenClaw, Zed, Hermes, Ollama, LM Studio, OpenAI embeddings API

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, VSC_EXTENSION, JETBRAINS_PLUGIN, CLI

## Pricing
Open Source

## Version
v0.23.1

## Links
- Website: https://vshulcz.github.io/deja-vu/
- Documentation: https://vshulcz.github.io/deja-vu/guide/getting-started.html
- Repository: https://github.com/vshulcz/deja-vu
- EveryDev.ai: https://www.everydev.ai/tools/deja-vu
