The deja-vu project
vshulcz published
Core features
deja-vu scans the conversation files that Claude Code, Codex, and opencode already write to disk. Search runs against an embedded index and returns results in 7โ9 ms even on gigabytes of history. The MCP recall tool lets an agent query past sessions directly, so it can reference fixes applied weeks earlier instead of repeating work.
Redaction removes API keys, JWTs, and private keys at index time. The resulting store can stay on disk without additional safeguards. Stats output shows harness usage, project distribution, and an activity sparkline. The share command produces a sanitized digest of any session, while sync export and import move the append-only index between machines with idempotent merges.
Auto-recall works through a SessionStart hook. After deja install --auto, relevant excerpts load into context before the first user message. No separate daemon runs and nothing leaves the local machine.
Setup process
Installation uses the provided shell script, Go install, npm wrapper, or Homebrew tap. The binary detects common agent config locations and creates backups before editing them. Running deja install --all wires MCP recall into supported harnesses. The --auto flag additionally registers the context hook.
Indexing shells out to the sqlite3 CLI for opencode logs, which already ships on macOS and most Linux distributions. No model downloads or external services are required. The same binary handles query, stats, share, and sync subcommands.
Practical considerations
The approach depends on agents continuing to write plain-text logs in the expected locations. If a harness changes its format or storage path, indexing breaks until deja-vu is updated. Redaction occurs only at index time, so any secrets present in older unindexed logs remain in the original files.
Performance stays consistent because the index lives on local disk and queries avoid network calls. However, the tool provides no built-in encryption for the index itself. Users who need encrypted at-rest storage must handle that layer separately. Sync remains append-only, which prevents accidental overwrites but requires manual cleanup of stale entries over long periods.
---
๐ Related articles
- Agentic Coding: Una Trappola per lo Sviluppo Software?
- AI Generativa e Fisica: Come Cambia il Design di Oggetti Reali
- Building Blocks AWS per Training e Inference di Modelli AI
Need a consultation?
I help companies and startups build software, automate workflows, and integrate AI. Let's talk.
Get in touch