Adding memory to Reasonix

it can resume one session; nothing reads the others back

Reasonix keeps every session under ~/.reasonix (%APPDATA%\reasonix on Windows; $REASONIX_STATE_HOME or $REASONIX_HOME moves it) and resumes one with --resume. 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 Reasonix already has

The session store, a way back into one session, and a plugin system: a package with a reasonix-plugin.json manifest can carry MCP servers, skills, slash commands and a runtime extension that the host starts beside the session. Its hooks run, but on 1.39.1 only what a SessionStart hook prints reaches the model; the output of the per-prompt and per-tool hooks is dropped. So recall has to go through the extension.

Adding recall

deja install reasonix-auto

This writes one plugin package, named deja, and hands it to reasonix plugin install; with no reasonix on PATH, deja writes the same layout itself. deja uninstall reasonix-auto takes it back out. The package holds:

  • The MCP server, started with the session. The model finds it through use_capability.
  • The skill at skills/deja-history/SKILL.md.
  • The slash command at commands/deja.md, listed as /deja:deja, so a question works whether or not the model decides to look.
  • The extension, deja reasonix-ext, which the host starts and talks to over stdin and stdout. deja install reasonix without the suffix installs the first three and leaves this one out.

A runtime extension runs with full trust in Reasonix, and --yes is how the install approves it; deja prints that line when it installs. reasonix plugin show deja lists what the extension intercepts. config.toml is never written.

What arrives, and where

On a session's first prompt, a short digest of what this machine has done on the project — decisions, the commands that worked, the errors that recurred. On a prompt your own history already answers, that answer. Both are appended to the user turn, not the system prompt: Reasonix is built around DeepSeek's prefix cache, and a system prompt that changes every turn would miss it every turn. Appended to the turn, the text stays byte-identical in every later request's prefix. Reasonix stores what you typed separately, and that is what deja indexes, so recall does not feed back into the index.

After a shell command or a file write, the tool result the model reads carries one line on what this machine already knows about that command or file, and when a command failed, what followed that same error here before. Reasonix gives no seam before a tool runs that can add text, so the line arrives with the result. When the conversation is compacted, deja adds its record of the folded turns — the objective, the conclusions, each command with how it went — to the summarizer's instructions. While the first index builds, the status line says so; once per session a line says how many past sessions were recalled.

Each answer has a budget under the host's own timeout. A slow or failed lookup, or one with nothing to say, leaves the turn exactly as Reasonix built it. On a test machine with a warm index, eight TUI turns took a median of 131 ms for that step, against 120 ms for deja's per-prompt hook run directly on the same prompts.

The part that is not about Reasonix

The index covers every agent's transcripts on the machine — forty-one of them, each in its own format — so a fix found in Claude Code answers a question asked in Reasonix, 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 Reasonix session format

Found this useful? Star deja-vu on GitHub.