@vshulcz/pi-deja

deja-vu memory for pi: the coding sessions already on this machine — pi, Claude Code, Codex, Cursor and 21 more — recalled at session start and on every prompt, searchable with /deja. A local index, no LLM.

Packages

Package details

extension

Install @vshulcz/pi-deja from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@vshulcz/pi-deja
Package
@vshulcz/pi-deja
Version
0.20.0
Published
Sep 12, 2026
Downloads
164/mo · 164/wk
Author
vshulcz
License
MIT
Types
extension
Size
16.6 KB
Dependencies
1 dependency · 0 peers
Pi manifest JSON
{
  "image": "https://raw.githubusercontent.com/vshulcz/deja-vu/assets/listings/recall-card.png",
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@vshulcz/pi-deja

pi remembers its own sessions. This extension answers the other question: what was done in the twenty-four other coding agents on this machine — Claude Code, Codex, Cursor, Gemini, OpenClaw and Hermes among them — including the months before pi was installed.

It runs deja, a local Go binary that indexes the transcripts those agents already wrote to disk. No LLM, no embeddings, nothing leaves the machine.

Install

pi install npm:@vshulcz/pi-deja

The deja binary comes with the package; a deja you installed yourself (brew install deja-vu) always wins — see Which binary.

deja install pi-auto wires pi too, and is the shorter path if you have the CLI: it adds deja's MCP server and writes an extension of its own. When that extension is present this package stands down, so having both never injects twice — and the same for omp, whose extension the installer writes elsewhere.

omp loads pi.extensions manifests and emits the same before_agent_start event, so pi install's omp counterpart picks this package up as well.

What it does

  • Session start: a digest of what earlier sessions in this project decided goes to the model before your first prompt; the receipt shows in the footer.
  • Every prompt (before_agent_start): the prompt is matched against the index and, when a past session answers it, that session goes to the model with the prompt. Silence is the common case.
  • After a failed command (tool_result): the repair this machine used the last time that error came up goes in beside the error, in the same turn.
  • Before an edit (tool_result on a read): what earlier sessions decided about the file the agent just opened.
  • After a compaction (session_compact): the list of what this session was already shown is cleared, so the recall it lost can come back.
  • /deja <query>: search the history by hand.

Which binary

In order: DEJA_BIN, deja on PATH, the usual install locations, and last the copy bundled through @vshulcz/deja-vu.

Privacy

deja reads session files where the agents wrote them and builds a local index under ~/.cache/deja (or DEJA_INDEX_DIR). Keys and tokens are stripped as the index is built. Nothing is uploaded.

Part of deja-vu. MIT.