Adding memory to Senpi

it renames pi's directory on first run and still starts cold

Senpi keeps a JSONL log per session under ${SENPI_CODING_AGENT_DIR:-~/.senpi/agent}/sessions/ and offers --session <path|id>, --resume and --fork in its own help. That is resumption, not memory: a new session reads none of the others, and nothing in it knows about the Claude Code session in the same repo yesterday. This page is about adding that.

What Senpi already has

The session logs and three ways back into one — and pi's directory, which is the part to know before wiring anything: Senpi's first run moves ~/.pi/agent to ~/.senpi/agent, sessions and config and extensions together. deja reads both stores, so nothing is lost either way, but the config you edit afterwards is the one under ~/.senpi.

Adding recall

deja install senpi-auto

Three things, all reversible with deja uninstall senpi-auto:

  • The MCP server in ~/.senpi/agent/mcp.json. Senpi's palette lists it as mcp:deja:deja once it loads.
  • The extension at ~/.senpi/agent/extensions/deja.ts — pi's, unchanged, because Senpi loads it unchanged. It is both the injection point and the /deja command, and a session started with it records what deja returned as {"type":"custom_message","customType":"deja-recall"}, which is auto-recall arriving rather than a claim about it.
  • The shared skill at ~/.agents/skills/deja-history/SKILL.md, and only there: skills load from both ~/.agents/skills and <agent>/skills, and having the same one in both is a collision Senpi announces and then skips.

Senpi was read-only in the registry for a while — every capability recorded as unknown, because no package or documentation for it had been found. There is a package, and installing it answered all five at once on Senpi's own screen, which is where the details on this page come from.

What arrives

At the front of the session, a short digest of what this machine has done on the project; on a prompt your own history already answers, that answer. Silence is the common case, and an injection is capped at 1,536 bytes per prompt and about 4 KB per tool call. What memory costs has the measured comparison.

The part that is not about Senpi

The index covers every agent's transcripts on the machine — thirty-four of them, each in its own format — so a fix found in Claude Code answers a question asked in Senpi, including sessions from before any of this was installed. A transcript a client later deletes stays searchable; only deja forget drops one on purpose. Nothing here writes memories, so there is nothing to hallucinate into your history; indexing and search are local, and credentials are stripped as the index is built (privacy).

Getting started · Switching between agents · The Senpi session format

Found this useful? Star deja-vu on GitHub.