Kimi Code CLI
Kimi Code CLI upstream is 2.1.1; HarnessRouter v0.29.0 separately retains the 2.0.0 adapter pin. The September integration history explains the predecessor CLI replacement, session behavior and tool policy without implying native UHP adoption.
Page reviewed 4 Oct 2026 Source and review policy
Migrate the product, then re-establish credentials
Section titled “Migrate the product, then re-establish credentials”The predecessor Kimi CLI repository is now explicitly archived and redirects users to Kimi Code CLI. Its latest 1.52.0 release short-circuits entrypoints to the new installer; it is not a later release of the 2.x product that HarnessRouter runs.
The migration documentation linked from that repository describes three separate actions: install Kimi Code CLI, import legacy data, then log in again and reauthorize MCP servers. Importing session/config history is not credential migration. The predecessor’s ~/.kimi/ data is preserved, and kimi migrate can initiate migration later.
| State | What to verify after migration |
|---|---|
| Sessions/history imported | A chosen historical session opens under the new product |
| Provider login | A new authenticated native turn can run |
| MCP server definitions imported | Server authorization and a required tool work independently |
| HarnessRouter backend selected | CE still uses its installed 2.0.0 runtime and workspace state |
The latest Kimi Code release observed remains @moonshot-ai/kimi-code@2.1.1. Its filesystem watchers are on by default; a saved config change can therefore affect a live native runtime. The older CE pin and its isolated session lifecycle need separate evidence.
Do not point a migration command at a CE data volume merely because both products use the kimi executable name. Back up the intended native data and follow the upstream migration path. Use profile isolation to scope credentials and instruction provenance to distinguish imported configuration from what a turn actually applied.
Release check — 4 October 2026
Section titled “Release check — 4 October 2026”The latest stable release observed in the upstream GitHub release API is @moonshot-ai/kimi-code@2.1.1, published 2026-09-24. This patch restores config/workspace filesystem watchers by default and rolls back some defensive changes from 2.1.0. It is a Kimi Code release; the historical HarnessRouter 2.0.0 adapter pin below is a separate coordinate.
HarnessRouter integration, checked 4 October 2026: the v0.29.0 entrypoint retains the default pin Kimi Code CLI 2.0.0. This is source-verified adapter configuration, not a fresh runtime or provider test. HarnessRouter now has 20 released backends; the earlier counts and measurements below retain their dated scope.
Evidence scope: the integration details, commands, measurements and development-head references below preserve the 18 Sep 2026 source snapshot. They are not presented as a fresh test of this newer release. For the current UHP protocol, HarnessRouter release and suite coordinates, use the release tracker and conformance guide. Adapter support does not establish upstream-native UHP adoption.
Source snapshot — 18 Sep 2026
Section titled “Source snapshot — 18 Sep 2026”HarnessRouter stable v0.18.4 retains Kimi Code CLI 2.0.0 for backend kimi. PR #206 merged on 17 September 2026 as a27df946d77eae5efb6e765fcfb1645a4875731b, replacing the earlier wiring to the predecessor Python-based Kimi CLI 1.50.0 from PR #191. PR #210, released as v0.18.2 at bf3b0c64, fixes the common local UHP file-upload path and adds X-09 conformance coverage without changing the Kimi adapter. Later v0.18.3 and v0.18.4 likewise retain the Kimi adapter unchanged.
The release boundary changed twice on 17 September. v0.18.0 points to f895f1b6 and first makes backend kimi part of stable software using Kimi CLI 1.50.0. v0.18.1 points to a27df946 and immediately supersedes it with Kimi Code CLI 2.0.0. PR #208 later fixes the publication workflow. Current v0.18.4 and checked main point to efd320b313891191967871de28ff4757528ae6a7 with the same Kimi runtime.
MoonshotAI publishes Kimi Code CLI 2.0.0 from the MoonshotAI/kimi-code repository. The upstream README also documents a native Agent Client Protocol (ACP) server through kimi acp. That is native ACP capability; it does not establish native UHP support.
Why PR #206 is more than a version bump
Section titled “Why PR #206 is more than a version bump”PR #206 explicitly replaces one upstream product with another. The v0.18.0 adapter used MoonshotAI/kimi-cli 1.50.0; the adapter introduced in v0.18.1 and retained in current v0.18.4 uses the TypeScript rewrite distributed as Kimi Code CLI 2.0.0. The backend id remains kimi, but several integration contracts change.
| Boundary | v0.18.0 predecessor | v0.18.1+ current adapter |
|---|---|---|
| Upstream product | Kimi CLI 1.50.0 | Kimi Code CLI 2.0.0 |
| Provider/model configuration | managed config file | KIMI_MODEL_* environment |
| Persistent home | KIMI_SHARE_DIR | KIMI_CODE_HOME |
| Session identity | runner-minted because stream omitted it | CLI session id on the final stream line |
| Unknown resume id | could silently start a fresh session | CLI exits non-zero; runner still verifies store presence first |
| Tool policy | internal tool paths | tool names plus an empty subagent allowlist |
| MCP state | managed config/flag | $KIMI_CODE_HOME/mcp.json |
| Step budget | --max-steps-per-turn | KIMI_LOOP_MAX_STEPS_PER_TURN |
Session and checkpoint semantics
Section titled “Session and checkpoint semantics”Kimi Code’s stream supplies its own session id on the final line. HarnessRouter therefore no longer needs the deterministic session id synthesis used for the predecessor adapter. Resume validation remains store-backed before launch, and an unknown session now fails instead of silently becoming a new conversation.
HarnessRouter places KIMI_CODE_HOME in the runner-owned workspace/checkpoint domain so Kimi Code state survives sandbox recycle without being treated as a produced artifact. The installer pins Kimi Code 2.0.0 release assets by digest and checks kimi --version, allowing an existing volume containing the predecessor binary to be upgraded in place.
MCP, skills and hard tool policy
Section titled “MCP, skills and hard tool policy”Kimi Code receives MCP configuration through $KIMI_CODE_HOME/mcp.json; HarnessRouter writes SSE transport explicitly instead of relying on URL-shape inference. One important upstream behavior is different from the predecessor: an unreachable MCP server can be skipped silently with exit code 0. HarnessRouter therefore reads the current turn’s Kimi Code log and appends a note naming an unreachable server rather than treating silence as proof that MCP started correctly.
Hard tool exclusion also changed. Kimi Code policy uses tool names, not the predecessor’s internal tool paths. Product testing found that withholding Bash alone was insufficient because a subagent could regain shell capability by delegation. The stable adapter therefore writes an empty subagent allowlist alongside the disabled-tool policy so a prohibited capability cannot be recovered indirectly through a delegated agent.
Relay normalization
Section titled “Relay normalization”Kimi Code sends request fields that are not necessarily valid for every routed provider/model: the measured 2.0.0 client supplied a very large token limit across tested model families and supplied reasoning_effort: "high" for Claude-named models. HarnessRouter registers a Kimi-specific relay route that removes the problematic generated token-limit fields and reasoning-effort field before forwarding the request.
PR #206 reports that this reduced repeated flat-400 retries and was validated across multiple model families. This is adapter/runtime normalization, not UHP protocol behavior and not a statement that every provider/model combination is universally compatible.
Evidence boundaries
Section titled “Evidence boundaries”PR #191 remains useful historical predecessor evidence: it introduced backend kimi and reported 48/48 across twelve backend bases × four Harness Plugins columns using Kimi CLI 1.50.0. That implementation became the short-lived stable v0.18.0 coordinate. PR #206 supersedes it in v0.18.1 and reports product-path testing including the four plugin columns plus a 248/250 console-scenario result across 50 model ids; its two misses were attributed in the PR to scenario wording interacting with one provider/model safety policy. v0.18.4 inherits that Kimi adapter without a new Kimi-specific measurement.
Neither number is UHP conformance. Current HarnessRouter source contains 75 checks under package metadata 2026.9.12 because PR #210 added X-09 in v0.18.2; v0.18.3 and v0.18.4 retain that check set. The latest checked-in Full result still identifies Community Edition 0.17.3 from PR #190 at 74/74 Full. That 74/74 result predates X-09 and must not be projected onto current v0.18.4; no checked-in 75/75 Full remeasurement was observed at this cutoff.
ACP and UHP boundary
Section titled “ACP and UHP boundary”Kimi Code CLI natively supports ACP through kimi acp, allowing ACP-compatible editors and IDEs to drive a Kimi Code session over stdio. HarnessRouter’s kimi backend is a different interoperability layer: a UHP client talks to HarnessRouter, which adapts the request to Kimi Code and normalizes lifecycle, persistence, MCP/tool policy and provider routing.
Native ACP path:ACP client/editor -> kimi acp -> Kimi Code CLI
HarnessRouter path:UHP client -> HarnessRouter -> Kimi Code CLI 2.0.0 -> provider/modelAt this cutoff:
- UHP:
2026-09-12Draft. - HarnessRouter stable/current
main:v0.18.4/efd320b3— twelve released backends, includingkimion Kimi Code CLI2.0.0. - HarnessRouter
v0.18.3:0fcd90b5— runtime/accounting/defaults corrections; no Kimi adapter change. - HarnessRouter
v0.18.2:bf3b0c64— local UHP file-upload fix and X-09; no Kimi adapter change. - HarnessRouter
v0.18.1:a27df946— introduced the current Kimi Code CLI2.0.0adapter. - HarnessRouter
v0.18.0:f895f1b6— first stable twelve-backend release, using predecessor Kimi CLI1.50.0. - Kimi Code CLI latest observed upstream release:
2.0.0, published 17 September 2026. - Native Kimi Code ACP: verified upstream.
- Native Kimi Code UHP adoption: not established.
- Current conformance source: 75 checks under package metadata
2026.9.12; latest checked Full evidence remains pre-X-09 CE0.17.3at 74/74 Full.
See HarnessRouter for reference-implementation state, release tracker for version boundaries, and UHP vs ACP for the protocol boundary.
Primary sources
Section titled “Primary sources”- HarnessRouter
v0.18.4 - HarnessRouter PR #213 — self-hosted BYOK navigation
- HarnessRouter
v0.18.4/ current-main commitefd320b3 - HarnessRouter
v0.18.3 - HarnessRouter
v0.18.2 - HarnessRouter PR #210 — local file upload fix and X-09
- HarnessRouter
v0.18.1 - HarnessRouter
v0.18.0 - HarnessRouter PR #206 — rewire backend
kimito Kimi Code CLI2.0.0 - HarnessRouter PR #208 — release publication correction
- HarnessRouter PR #191 — predecessor Kimi CLI
1.50.0integration - Current HarnessRouter conformance README
- Current conformance X-09 source
- Kimi Code CLI
2.0.0release - Kimi Code CLI repository and native ACP documentation
- Predecessor Kimi CLI
1.50.0release