Adding memory to CodeWhale

every session is one JSON file, and nothing reads the old ones

CodeWhale writes one pretty-printed JSON file per session under ~/.codewhale/sessions/ and can resume one. The next session starts from nothing, and nothing in it knows about the Claude Code or Cursor session in the same repo last week. This page is about making that history reachable.

What CodeWhale already has

The session files, and a way back into one. $CODEWHALE_HOME moves the whole store, and a machine that has not finished the rebrand still keeps ~/.deepseek/sessions, which CodeWhale itself migrates on first access — deja walks both roots. A session is {schema_version, metadata, messages}, and the message blocks are the Anthropic shape, so the tool calls, the files they touched and what they printed come apart with the same code the Cline and Claude readers use. Messages carry no timestamps of their own, so deja clocks them from the session's created_at, a millisecond per record, which is what keeps two identical turns in order.

This is not the DeepSeek Harness deja reads as deepseek: that one keeps zstd-framed JSONL under ~/.dsh and has its own page.

Adding recall

Nothing to install yet, and this page says so rather than printing a command that writes nothing. CodeWhale reads an MCP server map and a hook block out of its own config, and has a plugin marketplace besides; deja wires none of it in this release. Its hook events are documented — tool_call_before, tool_call_after, session_busy, session_idle, turn_end, subagent_spawn — and a session-start channel is what an -auto target needs, which is the work left.

What works today is the reading half, and it needs no configuration:

deja index
deja last 5
deja search "wasm bundle"

Any agent on this machine that does have the MCP server wired — Claude Code, Codex, Cursor, opencode and the rest — answers questions about your CodeWhale sessions, because it is one index rather than one per tool.

What arrives

Nothing on its own here: you ask. deja last is the session list, deja search the transcript search, deja show prints one in full, and deja resume prints the way back into a session for the client that wrote it. Finding a session is the longer version.

The part that is not about CodeWhale

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 CodeWhale, 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 CodeWhale session format

Found this useful? Star deja-vu on GitHub.