Adding memory to Kimi Code
one /plugins install, and the sessions stop starting empty
Kimi Code starts each session empty, and the sessions it has kept are its own. The history that would answer today's question is usually spread across whatever else you were using in the months before.
What Kimi already has
Sessions are written under ~/.kimi-code/sessions as JSONL wire logs, one per agent within a session (KIMI_CODE_HOME moves the tree). They are readable and complete; nothing reads them back for you.
Adding recall
/plugins install https://github.com/vshulcz/deja-vu
Kimi installs the plugin from the repository — the manifest sits at the root, which is the only reason that file is there. It needs the deja binary, which is what indexes and searches:
brew install deja-vu # or curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh
With the CLI instead, deja install kimi-auto writes the MCP server into mcp.json and a [[hooks]] block into config.toml. Having both is fine: the plugin reads those two files and skips whatever the installer already covers.
What arrives
- The MCP server, with the six tools deja serves everywhere.
- The
deja-historyskill, so the agent knows the CLI contract when the tools are not reachable. /deja:recall <query>for asking directly.- Recall on every prompt, through a
UserPromptSubmithook — Kimi appends a hook's stdout to the turn's context, which is the whole mechanism. It stays silent when the history has no answer.
The part that is not about this harness
The index covers every agent's transcripts on the machine — twenty of them today, each in its own format — so a fix found in one tool answers a question asked in another, including sessions from before any of this was installed. That is the reason to index rather than to capture.
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). An injection is capped at 1,536 bytes per prompt and about 4 KB per tool call — what memory costs has the measured comparison.
Getting started · When the same wall comes back · The plugin source