Kimi
Kimi Code and historical Kimi CLI save different session journals. Hansard imports them as two source IDs. Kimi CLI 1.52.0 redirects its public entry point to the Kimi Code installer. Installing it does not create historical Kimi CLI sessions.
Source IDs
Section titled “Source IDs”| Source | Use it for |
|---|---|
kimi-code |
Kimi Code sessions and agent journals in ~/.kimi-code/sessions. |
kimi-cli |
Kimi CLI wire journals, context history, state, and subagent records in ~/.kimi/sessions. |
How the import works
Section titled “How the import works”Hansard reads Kimi Code and Kimi CLI from their own folders and checks each file’s format before importing it. For Kimi Code, it supports wire journal protocol versions 1.0 through 1.5, plus an older version 1.4 layout without a header. For Kimi CLI, it supports context journals, an older version 1.1 layout without a header, and wire protocol versions 1.1 through 1.10. Hansard decides the format from the file itself, not from the Kimi release that wrote it.
Every record in a session either becomes part of the conversation, is summarized in the session’s details, or is left out for a recorded reason. A session with an unknown record type, a damaged tool call, or input that would turn into nothing is not imported, rather than imported with gaps. When a Kimi CLI session has a damaged context file next to a valid wire journal, Hansard keeps the damaged file but does not use it.
Agent journals and subagent folders become their own conversations, linked to the parent, instead of being inserted into it. Because the two Kimi agents use different formats, Hansard never merges their sessions only because the content looks alike. A Kimi CLI parent session may have no model name even when a subagent records one, and Hansard shows that difference as it is.
Import and keep current
Section titled “Import and keep current”hansard import --sources kimi-code,kimi-cli --since allhansard index rebuildWith Automatic source selection, the watcher already includes both sources. With a Custom list, enable them. The watcher picks them up within 30 seconds:
hansard config sources enable kimi-code,kimi-cliReview the import in the app
Section titled “Review the import in the app”- When the import finishes, open Sessions and selectFilter & sort.
- Set Source to Kimi Code or Kimi CLI and setTime to the window you imported. UseFolder to narrow the list when you use this harness in several projects.
- Select a conversation to check its messages, tool calls, files, commits, model, and token usage.
To keep archiving new sessions from a local harness, openSettings → Imports. Automaticfollows every supported harness installed on this computer.Custom lets you turn individual harnesses on or off. Cloud sources turn on separately under Cloud agents, and ChatGPT, Claude.ai, Gemini, and Gemini Notebook / NotebookLM exports import withImport export…. Each also has its own import command. If a conversation you expect is missing after you reset the filters, run the import command on this page again with --explain-skips where the source supports it.
What Hansard preserves
Section titled “What Hansard preserves”- Reasoning, tool calls and results, input and output tokens, turn boundaries, and the wire protocol version.
- Kimi Code agent journals and child sessions as linked conversations.
- Kimi CLI subagent folders as linked conversations, without adding their messages or tokens to the parent.
- Exact copies of the Kimi Code wire and state files, the shared session index,
workspace list, and referenced
blobrefattachment bytes. A session is rejected when a referenced attachment is missing or changed. - Exact copies of the Kimi CLI wire, context, state, working directory list, and subagent files. The wire journal is the conversation; the context file is used only when no wire journal exists.
- The working directory, when its hash matches an entry in Kimi’s configuration.
Known limitations
Section titled “Known limitations”- Kimi Code 2.1.1 adds records within protocol 1.5. Scheduled tasks, plugin context, mirrored subagent events, context estimates, retry diagnostics, and checkpoint references remain raw-only with explicit accounting.
- External file-history and checkpoint bytes are not acquired. Mirrored child usage and context estimates never increase the parent’s billed token totals.
- Kimi CLI records a model only when it starts a subagent, so ordinary turns may have no model.
- A session whose working directory hash no longer matches Kimi’s configuration has no project.
- A newer journal format or record type is not imported until Hansard adds support for it.
Refresh an existing archive
Section titled “Refresh an existing archive”To reread stale Kimi Code sessions from available provider files:
hansard rebuild --stale-parsers --source-type kimi-code-historyTo replay preserved Kimi Code files without reading the provider’s store:
hansard rebuild --from-raw --source-type kimi-code-history --since allNeither command requires a complete archive reimport or a separate index rebuild.
Use hansard import --source kimi-cli --since all for historical Kimi CLI files.
Kimi CLI 1.52.0 redirects to the Kimi Code installer. That installer does not
create historical CLI sessions, but retained kimi-cli stores remain importable.