kimi
Start a coding task in an isolated CLI agent that edits files and runs shell commands, then returns the final result with a session ID for later continuation.
Instructions
Start a NEW task in the local Kimi Code agent — a separate CLI coding agent with its own file/shell tools and its own context window. Blocks until kimi settles, then returns only its final result plus stats, prefixed [session: ]; continue that session later with kimi_reply.
Good for: a second opinion from a different model, work kept out of this context, or parallel investigation.
Caution: with approval_mode 'yolo' (the server default, ACP) kimi edits files and runs shell commands as your user inside cwd without asking. Print mode also executes tools without confirmation (and forbids combining -p with -y).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Usually omit to use this server's cwd. If set, must be an absolute path (relative is rejected). kimi works and edits here, and reads AGENTS.md / project rules from here. | |
| model | No | Model alias as configured in kimi, e.g. 'kimi-code/k3' or 'stepfun-high/step-3.7-flash'. Defaults to kimi's own default_model. kimi_models lists what this install has configured. | |
| prompt | Yes | The complete task. kimi cannot see this conversation, so include everything it needs: file paths, goal, constraints, expected output format. | |
| add_dirs | No | Comma-separated extra workspace directories passed as kimi --add-dir (print) or ACP additionalDirectories (acp). Each path must be absolute. | |
| thinking | No | ACP thinking config (`session/set_config_option` id=thinking). Print transport has no thinking flag — kimi has no CLI --effort; pick a model alias instead. | |
| transport | No | Usually omit. The default 'acp' keeps kimi up (`kimi acp`) so a running turn can be steered or aborted with kimi_send. 'print' is kimi -p --output-format stream-json: one process per turn that cannot be reached while it works. -p is last (greedy). | |
| timeout_ms | No | Usually omit — the server default is generous. Override only when the task's real size demands it. A run killed at the deadline is not lost: it still returns its session id and is resumable with kimi_reply. | |
| approval_mode | No | ACP session mode: 'yolo' (auto-approve everything), 'auto' (auto-approve safe ops), 'default' (ask — unusable headless), 'plan' (read-only). Server default is yolo. Print transport cannot take -y/--auto/--plan with -p (the CLI rejects that); prompt mode already executes tools without confirmation, and 'plan' is rejected on print. |