Title:
Kimi engine broken with kimi-code CLI 0.27.x — SDK 0.1.8 spawns removed flags (--work-dir, --wire), new ~/.kimi-code wire format unsupported
Body:
Summary
metabot's Kimi engine fails against the current Kimi Code CLI 0.27.0. The bundled @moonshot-ai/kimi-agent-sdk@0.1.8 (the latest on npm) spawns the CLI with flags that kimi-code 0.27 has renamed/removed, so every Kimi turn dies immediately. This blocks using Kimi (including the new K3 model) as a bot engine.
Environment
- metabot: 1.0.0 (pm2,
src/index.ts, tsx + Node 22)
- OS: Ubuntu 24.04, self-hosted
@moonshot-ai/kimi-agent-sdk: 0.1.8 (npm latest; also what package.json pins via ^0.1.8)
- Kimi Code CLI: 0.27.0 (installed via
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash, lives in ~/.kimi-code, logged in via kimi login)
- Engine config in bots.json:
"kimi": { "executable": "/home/agentuser/.kimi-code/bin/kimi", "model": "kimi-code/k3", "thinking": true }
Reproduction
- Install current kimi-code CLI (0.27.0) and
kimi login as the same user the bridge runs as.
- Set a bot's
engine: "kimi" (or /model kimi in a chat).
- Send any prompt.
Actual result
CLI exited with code 1: error: unknown option '--work-dir'
The SDK log shows Starting Kimi execution (multi-turn) (auth/config OK), then the spawned kimi process exits 1.
Root cause
SDK 0.1.8 spawns the CLI with: --agent-file, --json, --model, --no-thinking, --session, --skills-dir, --thinking, --wire, --work-dir, --yolo.
kimi-code 0.27 --help shows these are gone/renamed:
--work-dir → removed (now --add-dir)
--wire → removed from top-level (new acp subcommand / new ~/.kimi-code wire format)
--agent-file, --json, --no-thinking → removed
- only
--yolo, --session remain
Parallel report in another tool: ccusage#1357 ("Kimi Code (~/.kimi-code) usage not detected — new wire format unsupported").
What already works (so only the wire/flags layer is the blocker)
- Auth/config: setting
KIMI_SHARE_DIR=/home/<user>/.kimi-code makes the SDK's KimiPaths/isLoggedIn/parseConfig read the new CLI's location (creds + config.toml there). No "not logged in" error.
- Model works via the CLI directly:
kimi -m kimi-code/k3 -p "..." returns K3 output fine.
Ask
- Bump
@moonshot-ai/kimi-agent-sdk to a release that speaks kimi-code 0.27's wire format (once Moonshot publishes one), or adapt the Kimi executor to the new flags/acp transport.
- Meanwhile, could you document the last kimi-code CLI version compatible with SDK 0.1.8, so users can pin it? (K3 availability on that version would be good to note too.)
Thanks — happy to test patches on a live Moderato-plan K3 setup.
Title:
Kimi engine broken with kimi-code CLI 0.27.x — SDK 0.1.8 spawns removed flags (
--work-dir,--wire), new~/.kimi-codewire format unsupportedBody:
Summary
metabot's Kimi engine fails against the current Kimi Code CLI 0.27.0. The bundled
@moonshot-ai/kimi-agent-sdk@0.1.8(the latest on npm) spawns the CLI with flags that kimi-code 0.27 has renamed/removed, so every Kimi turn dies immediately. This blocks using Kimi (including the new K3 model) as a bot engine.Environment
src/index.ts, tsx + Node 22)@moonshot-ai/kimi-agent-sdk: 0.1.8 (npmlatest; also what package.json pins via^0.1.8)curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash, lives in~/.kimi-code, logged in viakimi login)Reproduction
kimi loginas the same user the bridge runs as.engine: "kimi"(or/model kimiin a chat).Actual result
The SDK log shows
Starting Kimi execution (multi-turn)(auth/config OK), then the spawnedkimiprocess exits 1.Root cause
SDK 0.1.8 spawns the CLI with:
--agent-file,--json,--model,--no-thinking,--session,--skills-dir,--thinking,--wire,--work-dir,--yolo.kimi-code 0.27
--helpshows these are gone/renamed:--work-dir→ removed (now--add-dir)--wire→ removed from top-level (newacpsubcommand / new~/.kimi-codewire format)--agent-file,--json,--no-thinking→ removed--yolo,--sessionremainParallel report in another tool: ccusage#1357 ("Kimi Code (~/.kimi-code) usage not detected — new wire format unsupported").
What already works (so only the wire/flags layer is the blocker)
KIMI_SHARE_DIR=/home/<user>/.kimi-codemakes the SDK'sKimiPaths/isLoggedIn/parseConfigread the new CLI's location (creds +config.tomlthere). No "not logged in" error.kimi -m kimi-code/k3 -p "..."returns K3 output fine.Ask
@moonshot-ai/kimi-agent-sdkto a release that speaks kimi-code 0.27's wire format (once Moonshot publishes one), or adapt the Kimi executor to the new flags/acptransport.Thanks — happy to test patches on a live Moderato-plan K3 setup.