deja-vu is a local tool that provides memory capabilities for coding agents. It uses the session histories that 42 agents such as Claude Code, Codex, and Cursor have already saved to disk, builds an index, and keeps agents from repeatedly debugging problems that have already been fixed.
Purpose
Coding agents save their history to disk in every session. deja-vu indexes all of this history (going back months) and hands the relevant parts to the current agent while it works. This way, a fix discovered in Codex can be reused in Claude Code, Cursor, or opencode, and all 42 agents read the same index.
Main capabilities
- Local search: Run
dejain the terminal to open the search interface, where you can search the history of all agents. Supports filtering by agent (e.g.codex:), time (today、yesterday、week、month), and project (in:<project>). - Automatic recall at session start: Automatically provides recall at the start of a session, before editing files, before running commands, and after a command fails, with no need to ask manually.
- Indexes work content: Indexes not only conversations, but also the files opened in each turn, commands with exit statuses, and the exact ranges of edit replacements.
- Status markers:
deja promote <id> --state rejectedcan mark decisions that were reverted, and later hits will explain that the decision was tried and why it was abandoned;--state acceptedcan undo the marker. - Local and private: No model, no embeddings, no server. When the index is built, secrets and tokens are stripped and replaced with
[redacted:<kind>], while the surrounding text remains searchable. - Cross-machine sync:
deja sync ssh laptopcan sync between machines without a cloud service;deja handoff --to codexcan switch to another agent to continue. - Single Go binary: Supports macOS, Linux, and Windows, and can be installed via Homebrew, Scoop, winget, npm, or go install.
- Optional semantic recall: Point
DEJA_EMBED_URLat a local Ollama, LM Studio, or OpenAI-compatible endpoint, and rewritten queries can also hit. When it is not set, lexical search and MCP recall work as usual.
Usage
On macOS and Linux, the install script places the binary in ~/.local/bin. If that directory is not in PATH, you need to run the next line of command printed by the script or open a new shell. After installation, run the second command to connect MCP recall to all detected agents, enable session-start recall on supported agents, and build the first index.
Start a new agent session and ask about work done months ago, for example:
have we dealt with jwt refresh rotation before? check your memory
You can also run deja directly to search on your own. Other installation methods include:
brew install deja-vugo install github.com/vshulcz/deja-vu/cmd/deja@latestnpx @vshulcz/deja-vu "query"(try it without installing)
On Windows, the install script exits because it is not supported; you can use Scoop or winget, or download deja-vu_<version>_windows_amd64.zip from the latest release and put deja.exe into PATH.
Searching can be done with the binary alone: indexing, searching,show、ctx、blame、--json , and redaction do not require any other components.deja install is used to connect MCP to agents and enable session-start recall, and is optional.deja warmup will leave a skill file in ~/.agents/skills/deja-search/SKILL.md to teach agents to use the CLI contract.
Use cases
- A coding agent needs to recall problems already solved in past sessions.
- Share fixes and decisions across multiple agents.
- Need local, private session history search without relying on a cloud service.
- Need to sync session memory across different machines.
Limitations
- Indexing and searching are local operations; the network is only used for
deja update、deja sync ssh、deja doctorversion checks in ,deja embedas well as the once-daily latest version check in interactive commands.DEJA_OFFLINE=1orDEJA_NO_UPDATE_NOTICE=1can be disabled. - Redaction cannot capture all sensitive information; the source transcript still retains the original content;
deja secretscan list sessions containing secrets without printing the values,deja secrets --scrubcan rewrite the parts that can be handled. - Semantic recall requires an accessible embedding endpoint; if no runtime is available, it falls back to lexical search.
- TRAE IDE's chat history is in an encrypted database and can only be accessed via MCP and skills; hooks need to be manually enabled in settings.
- Some agents do not support user-level instruction files or session-start recall mechanisms.
- Specific fees, prices, and platform support details are not yet provided.