Adding memory to Windsurf / Devin Desktop

every Cascade conversation is on disk, sealed, and a new one starts without them

A new Cascade conversation starts with your rules and whatever Cascade saved as a memory. The conversations before it are not in context: the error you fixed last week, the approach you ruled out, the command that finally worked. They are still on disk, one file each, but Cascade does not read them back, and neither can you with grep.

Where the conversations are

~/.codeium/windsurf/cascade/<cascade-id>.pb

That is macOS and Linux. On Windows the same tree is under C:\Users\<name>\.codeium\windsurf.

Windsurf now ships as Devin Desktop, and the store did not move: Devin Desktop still writes under .codeium/windsurf, so one reader covers both names. Each file is a CortexTrajectory protobuf sealed with AES-256-GCM: a 12-byte nonce, the ciphertext, a 16-byte tag, and a key the language server carries as a constant. A text search over the directory finds nothing, because there is no text in it.

deja opens the seal and checks the tag before it decodes anything. A file that fails is skipped whole and counted, so deja doctor says windsurf 3 trajectories failed authentication instead of quietly showing a shorter history. DEJA_WINDSURF_ROOT points deja at a different root.

Reading what is already there

deja index
deja last --harness windsurf
deja --harness windsurf "the thing you half-remember"

That indexes Cascade along with every other agent on the machine, including conversations from before deja was installed. What goes in is your typed prompts and the planner's replies. Thinking, tool calls, file edits, terminal state and plans are left out. The session id is the cascade_id, which is also the file name; the title is the one you renamed the conversation to, or else its first prompt.

Getting recall into Cascade

deja install windsurf

That writes four things, all under ~/.codeium/windsurf:

  • mcp_config.json gets the deja server under mcpServers, next to whatever is there. This is the file Cascade reads. devin-desktop --add-mcp writes the Code OSS-level User/mcp.json instead, which Cascade does not read.
  • memories/global_rules.md gets deja's guidance block, between markers, so the rest of the file stays yours. Cascade keeps this file in context and caps it at 6,000 characters, your own rules included. If the block would push the file past that, install leaves it alone and says so, and deja doctor repeats it.
  • skills/deja-history/SKILL.md is a skill Cascade can pick up on its own when a request matches it, or that you call as @deja-history.
  • global_workflows/deja.md is a workflow you run as /deja followed by what you are looking for. Workflows get no argument substitution, so the file tells the model to take the words after /deja as the query.

deja uninstall windsurf takes them back out, leaving the rest of your rules file and MCP servers as they were.

Why recall is something Cascade asks for

In Claude Code or Codex, deja runs as a hook and puts relevant history in front of the model on every prompt, without the model asking. Cascade has hooks too, in ~/.codeium/windsurf/hooks.json, but none of their output reaches the model. Exit code 2 only blocks the action, and show_output is shown in the UI and is not offered for pre_user_prompt (Cascade hooks docs). A hook could run deja; it could not hand the answer to Cascade. So deja install windsurf wires no hooks.

Recall in Cascade is pull: the rule and the skill tell the model the tool is there and when to use it, and the model calls it. If it does not, ask it to check deja, or type /deja and the topic. The rule, the skill and the workflow follow Cascade's docs and have not yet been run against the app.

What does not work yet

No exact-session resume. No Devin Desktop command takes a conversation id. deja resume <id> refuses with that reason, and devin-desktop --sessions opens the Sessions window, where you pick the conversation yourself. To carry a conversation into a new one, deja handoff <id> prints a packet of what it asked, decided and left open, to paste into a new Cascade chat.

Only explicit conversations are read. implicit/ holds context trajectories, brain/ holds plans and other state, and the newer ACP session store is separate again. deja reads none of them.

Which reply field wins is unverified. A turn can carry response and modified_response. deja reads response and falls back to the other when it is empty. The live file checked so far was refused by the service before the model answered, so a successful turn has not been seen. The format registry entry keeps that open rather than guessing.

The part that is not about this harness

The index covers every agent's transcripts on the machine — forty-two of them, each in its own format — so a fix found in Cascade answers a question asked in Claude Code, and the other way round. 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 · Deleting Cascade history · The Windsurf session format

Found this useful? Star deja-vu on GitHub.