• 2 min read
deja-vu turns agent logs into searchable local memory
The open-source deja-vu tool indexes Claude Code, Codex, and opencode histories locally, with redaction, sync, and MCP recall built in.

Image: Hacker News
deja-vu is an open-source tool aimed at a growing problem with coding agents: they already wrote the answer somewhere, but finding it inside piles of local session logs is hard. Created by Vladislav Shulcz, the project indexes conversation histories from Claude Code, Codex CLI, and opencode into a local search layer that can be queried in 7–9 ms over multi-gigabyte archives, according to the project page.
The pitch is straightforward: instead of adding another memory platform or capture pipeline, deja-vu works with logs the tools already store on disk. It can search old histories retroactively, generate a compact markdown context digest with deja ctx <query>, and expose an MCP server so agents can pull relevant past work into the current session. An optional --auto setup adds a SessionStart hook that injects recent project memory automatically.
The project also emphasizes local-first operation. Shulcz says there is no network code in the indexing or search path, and the tool runs as a zero-dependency binary. For opencode, indexing shells out to the sqlite3 CLI, which the project says is preinstalled on macOS and most Linux distributions.
Security is a central part of the design. The tool redacts credentials at index time, including:

Recommended reading
Signal tests Android phones as linked devices
- AWS keys
- generic api_key= and token= assignments
- bearer tokens and raw JWTs
- PEM private key blocks
- provider tokens such as ghp_, sk-, npm_, xox., and AIza
- scheme://user:pass@host URLs
Export and sharing features re-apply redaction on the way out. Sessions can be shared as sanitized digests with deja share <id>, and memory can be moved between machines with deja sync export, import, or ssh. Sync is described as append-only and idempotent, with plain JSONL batches and safeguards to prevent records from echoing back to their origin.
Supported harnesses and performance
Current support covers:
- Claude Code: ~/.claude/projects/*/.jsonl
- Codex CLI: ~/.codex/sessions/** + history.jsonl
- opencode: ~/.local/share/opencode/opencode.db
The project says aider and Gemini CLI support are planned in issues #6 and #7.
Performance figures are based on what the repository calls a real corpus of 1,250+ sessions and roughly 3.3GB across three harnesses. On that dataset, warm search is listed at 7–9 ms typical, around 40 ms worst-case, with a cold index time of about 10 s. The resulting index size is about 2.4% of the source corpus.
The tool stores its local inverted index in ~/.cache/deja, using manifest.json to track per-file state so repeat runs only ingest changed data. Installation options include a shell script, go install, npx, and Homebrew, and the project is released under the MIT license.
Computing Editor
Tomas lives in the terminal. He covers chips, laptops, and operating systems with a focus on performance and efficiency. He reads kernel changelogs the way other people read fiction, and he's always on the hunt for the perfect mechanical keyboard switch. If it processes data, Tomas has an opinion on it.
via Hacker News


