Kimi Code data privacy: what stays and what leaves
By Christophe Paka · Facts checked on 7 November 2026
Before you let an AI agent read your code, you ask one thing: where does it all go? On a team, someone will ask it for you, in writing.
For Kimi Code data privacy, the answer has two halves. On your machine, everything sits in one folder. Off your machine, three flows leave it. The figure below maps both halves side by side, so you can answer the question in one look. Sessions are the other half: how a session is saved.

Use this diagram on your site
Free to share in your blog post, docs, course or slides, as long as the credit link stays. Paste the code below where the figure should go.
How to read this figure
Find the home folder on the left. Everything Kimi Code writes lives under ~/.kimi-code/. The variable KIMI_CODE_HOME moves it all elsewhere, so a contractor can keep one folder per client.
Read the five boxes inside. Settings and hooks sit in config files. Keys sit in credentials/. Sessions sit in sessions/. Logs and input history have their own box. Skills, plugins and managed binaries fill the last one.
Spot the two highlighted boxes. The credentials box is owner only: only your user account can read it. Its permissions, 0700 on the folder and 0600 on its files, are the numbers that mean owner only. The sessions box holds wire.jsonl, the complete record of each session: every prompt, command and tool output. Redact it before you share it anywhere.
Follow the three arrows out. Your prompts and code context go to api.kimi.com or api.kimi.ai to generate responses. Anonymous telemetry, reports on how you use the tool, goes out too, and you can turn it off with telemetry set to false. Update and marketplace checks go out as well. Read the arrows as a map of three flows that leave your machine.
Read the last box. Past delivery, the Help Center page applies. The box says Moonshot may train on data with identifiers removed, you can opt out by email, and data is stored in China. Read that page yourself before you decide.
Key takeaways
- Redact wire.jsonl, keys and passwords from any session export before you share it.
- Turn telemetry off with telemetry = false in config.toml, or KIMI_DISABLE_TELEMETRY=1 in the environment.
- Email support@moonshot.cn to opt out of training, and ask in writing about retention if it matters.
Try this: audit your own folder in ten minutes
You can check the left side of the figure on your own machine.
- List the folder with
ls -la ~/.kimi-code/and match each name to a box in the figure. - Check the credentials folder permissions with
ls -ld ~/.kimi-code/credentials. It should be owner only. - Search the session files for secrets by typing
grep -ril password ~/.kimi-code/sessions/in a terminal. It lists the files that contain the word password, so you know which sessions to redact. - Turn telemetry off with
telemetry = falsein config.toml.
Expected result: You know what is stored, which sessions hold secrets, and that anonymous telemetry no longer goes out.
Questions readers ask
Where does Kimi Code store my data?
On your machine, in ~/.kimi-code/. It holds every setting, key, session and log. The variable KIMI_CODE_HOME moves it. Your credentials sit in credentials/, readable only by your user account. After your prompts are delivered, the Help Center data page applies.
Does Kimi Code train on my code?
The Help Center page says Moonshot may train on your inputs with identifying details removed, and you can opt out by email. The data is stored in China. The page does not state a retention period, so ask in writing if it matters.
How do I turn off Kimi Code telemetry?
Two switches work. Set telemetry = false in config.toml, or set KIMI_DISABLE_TELEMETRY=1 in the environment before you start Kimi Code. If you set both, the variable wins.
Sources: Data locations (Kimi Code docs); Data Usage and Sharing (Kimi Help Center); Config files (Kimi Code docs).
This figure is from Kimi Code Made Crystal Clear, chapter 6.
The chapter builds the idea step by step, with recipes you can follow, a Try it to check yourself, and every source.
Get the book


