Adding memory to Roo Code

no hooks yet, so recall arrives as a tool it can reach for

Roo keeps every task on disk — the transcript under the editor's global storage, and the same files under ~/.vscode-mock/global-storage when you drive it from the Roo CLI. A new task reads your rules and nothing else: not the task you closed on Friday, and not the Claude Code or Codex session on the same machine where the problem was already solved.

Adding recall

deja install roo

That writes four things, and only into editors Roo has actually run in:

  • The MCP server, in mcp_settings.json for each host — VS Code, Insiders, VSCodium, Cursor, Windsurf, and the CLI's own store. One tool with a mode: 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.
  • The approval: deja's own tool named in that entry's alwaysAllow. Roo asks before it runs an MCP tool otherwise — a click before every recall in the editor, and in the CLI's non-interactive mode a run that waits for an answer nobody can give.
  • The deja-history skill in ~/.agents/skills, which Roo reads along with ~/.roo/skills. It is what tells the model when to look: before re-debugging an error, when you say "didn't we fix this".
  • A /deja command in ~/.roo/commands, for asking directly.

Why there is no session-start injection

Roo has no lifecycle hooks. A Claude Code-style hooks system is in flight upstream — PR #10785 and two more — and until one of them ships there is no event deja can answer, so recall is something the model reaches for rather than something that arrives. Checked against Roo Code 3.53: nothing in the released extension runs a command at session start, before a tool, or on compaction.

What it costs

Measured against a recording endpoint on Roo Code 3.53 with the CLI: deja's tool declaration is 3.1 KB of the 26 KB of tools Roo sends with every request, and a recall that answers adds about 1.3 KB to the one turn that asked for it. A recall with no answer adds nothing.

Reopening a session

deja resume <id> prints roo --session-id <uuid> with the workspace the task was in, for tasks the Roo CLI created — it lists only tasks belonging to the directory it is standing in. Tasks from the editor reopen from Roo's own history view; deja says so rather than printing a command that would not work.

The part that is not about this harness

The index covers every agent's transcripts on the machine — twenty-five of them, each in its own format — so a fix found in Claude Code answers a question asked in Roo, including sessions from before any of this was installed. 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 Roo Code session format