Adding memory to DeepSeek Harness
session-query answers about dsh; this is about everything else
dsh can already answer questions about its own conversations — that is what the built-in session-query subsystem is for. This page is about the other question: what you did in Claude Code, Codex, Cursor, opencode or Zed, on the same machine, before dsh existed on it.
What dsh already has
Sessions live under $DSH_HOME (~/.dsh by default) as zstd-framed JSONL, one file per session, and session-query searches them. Two limits: it is dsh's own history only, and a fresh session does not consult it unless you ask.
Adding recall
dsh plugin --profile web add dsh-deja
The plugin runs the deja binary, which does the indexing. npm installs a copy with the package, a deja already on your PATH wins over it, and DEJA_BIN overrides both — so your own deja update or brew upgrade is what decides the version, not whatever a plugin release froze.
With the CLI instead:
deja install dsh-auto
That writes the MCP server and the /deja command into the profile patch layer, and adds the plugin that puts recall in front of the model. deja install --auto does the same for every other agent on the machine in one pass.
Both at once is fine: the package looks for what the installer wrote in $DSH_HOME/plugins/deja/ and contributes only what is missing, so you never get two /deja commands or the same recall twice.
What arrives
Six tools the model can call — search past sessions, read one in full, see a file's history, ask what fixed an error, ask how a command is really run here, store a decision — a /deja command for asking directly, and recall that arrives on its own: before each assembly the plugin asks whether this machine's history answers the prompt, and adds it when it does. Silence is the common case.
One implementation note worth knowing if you write dsh plugins: recall goes through ctx.systemPrompt.context, not through a middleware on agent/pre-step. The obvious alternative loads fine, completes the turn, and never reaches the model — a later listener in that waterfall rebuilds its answer from the payload and the spliced message is dropped with nothing reported. That was settled by reading the requests dsh actually sent.
The part that is not about this harness
The index covers every agent's transcripts on the machine — twenty of them today, each in its own format — so a fix found in one tool answers a question asked in another, including sessions from before any of this was installed. That is the reason to index rather than to capture.
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). An injection is capped at 1,536 bytes per prompt and about 4 KB per tool call — what memory costs has the measured comparison.
Getting started · Switching between agents · The plugin source