Adding memory to Kiro
two clients, two formats, one root — and a new session starts empty
Kiro ships two clients and they do not write the same file. The CLI keeps a pair per session under ~/.kiro/sessions/cli — a header naming the session id and the directory it ran in, and a transcript whose lines are the conversation. The IDE, a VS Code fork, keeps a directory per session under the workspace: session.json beside messages.jsonl. Both are history, and both are read.
Reading what is already there
deja index
That walks both layouts, plus the store of every other agent on the machine. deja doctor names what it found — for Kiro it says how many CLI files and how many IDE files, because a CLI user and an IDE user have nothing in common but the directory.
The reply that arrives in pieces
One detail matters for text rather than for tokens. Several AssistantMessage records can share one data.message_id: the CLI appends the answer as it streams, and each record carries the next piece rather than the whole answer so far. Read one message per record and a recall quotes a third of a sentence — so deja joins a run under one id and the answer comes back whole. Reading Kiro's store with anything that does not is where half-sentences come from.
What is not read yet, and why that is written down
kiro-cli chat --no-interactive writes neither tree: each headless conversation is a row of kiro-cli/data.sqlite3, table conversations_v2, and deja reads it through the sqlite3 CLI. The IDE also mirrors chats into its globalStorage. No sample of that is in hand, so deja does not read it: a reader built against a guessed shape is one that drops history without saying so. The format registry entry records it as a gap rather than leaving the question open.
Getting recall into Kiro itself
deja install kiro
That writes the MCP server into ~/.kiro/settings/mcp.json, which the CLI and the IDE both read — the same file kiro-cli mcp add --scope global writes — and a four-line steering file at ~/.kiro/steering/deja.md that tells the model the tool is there. Steering is loaded in front of every turn, which is why it names the tool and stops. A custom agent in ~/.kiro/agents/*.json reads the global servers only when it sets "includeMcpJson": true; the install note says so. deja search "the thing you half-remember" works from any terminal too.
Recall at the start of a kiro-cli chat
deja install kiro-auto
Everything above, plus an agent of deja's own at ~/.kiro/agents/deja.json: all tools, the global MCP file, and two hooks. agentSpawn runs deja hook-context --plain, and kiro-cli keeps what it prints in front of the model for the whole conversation; userPromptSubmit runs deja hook-prompt --plain for recall on each prompt. Start a chat in it with kiro-cli chat --agent deja, or make it the default with kiro-cli agent set-default deja. deja does not switch the default for you: the built-in agent takes no hooks from a file, and swapping it out is your call. Kiro does not hand the model what a preToolUse hook prints, so there is no line before an edit.
The part that is not about this harness
The index covers every agent's transcripts on the machine — forty-three of them, each in its own format — so a fix found in Kiro 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 · Switching between agents · The Kiro session format
Found this useful? Star deja-vu on GitHub.