Claude Code memory
How Claude Code remembers between sessions with CLAUDE.md and auto memory, where it keeps transcripts, and what Dray saves for your other agents to search.
Coding agents Facts checked 27 October 2026
Kimi Code’s docs describe sessions saved on your computer and compression of long ones, but no memory it builds for itself. Dray saves each turn from Kimi Code to your Dray account, where every agent you connect can search it.
~/.kimi-code/config.toml, created on the first run. The KIMI_CODE_HOME environment variable moves the folder. Kimi Code docs: config files<project-root>/.kimi-code/local.toml. Kimi Code docs: config fileslocal.toml, AGENTS.md, skills, the MCP config and config.toml, and reloads them when they change. Kimi Code docs: config files/compact does it by hand. Kimi Code docs: sessions~/.kimi-code/sessions/, grouped by working directory. Each has a state.json for its details and an event log at agents/<agent>/wire.jsonl. Moonshot asks you not to edit these files. Kimi Code docs: sessionskimi --continue resumes the latest session in the current directory, kimi --session <id> resumes a specific one, and kimi --session alone opens a list. /sessions (also /resume) switches sessions from inside one, and /fork makes an independent copy. Kimi Code docs: sessions~/.kimi-code/plugins/managed/dray/ and registers it in ~/.kimi-code/plugins/installed.json. Its hooks run when you send a prompt, when a turn stops and when the session ends. They save what you typed and the answer the turn ended on, filed under the company whose model answered. Dray: connectdray to ~/.kimi-code/mcp.json. It runs the local bridge that the Dray CLI provides (dray mcp serve), so Kimi Code needs no sign-in of its own. Kimi Code lists the tools as mcp__dray__search_memory and so on. Dray: connectdray images is on. Dray: connect~/.kimi-code/sessions/. It reads the main agent only. Dray: connect~/.kimi-code/skills. In Kimi Code they start with /skill:, not /: /skill:link links this chat with your other chats, /skill:link CODE joins a link another chat made, /skill:unlink leaves it, and /skill:dray-status checks what Dray has saved. Dray: connectOne command sets up Kimi Code and the other agents it finds on your computer. It needs Node.js 18 or later on macOS, Linux or Windows, and no browser extension.
curl -fsSL https://api.withdray.com/cli/install.sh | shirm https://api.withdray.com/cli/install.ps1 | iexTo set up Kimi Code on its own, or add it later:
dray setup --agents kimiIf you don’t have Kimi Code yet, install it with curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash or npm i -g @moonshot-ai/kimi-code, then sign in with kimi login. Setup finds it when ~/.kimi-code/bin/kimi or ~/.kimi-code/sessions exists, or the kimi on your PATH is Kimi Code’s (not the old Python kimi-cli). Dray: connect Kimi Code docs
There are no steps by hand: the CLI connects Kimi Code through its local bridge. Dray: connect
kimi -p aren’t saved unless you run dray config scripted on, the same rule as claude -p. Dray: connectkimi-cli (the ~/.kimi folder) isn’t supported. kimi migrate moves its sessions into Kimi Code, and Dray then imports them. Dray: connectFacts checked on 27 October 2026 against these pages.