Cancel a job (free)
kimi_job_cancelCancel a running background job gracefully, cleaning up its temporary worktree and marking it as cancelled. Idempotent, so retrying after a lost response is safe; free, no model call.
Instructions
Cancel a running background Kimi job.
Asks the worker to shut down gracefully so it tears down its throwaway worktree,
then force-kills it if it overstays, and marks the job cancelled (cancelled jobs
cannot be resumed). If the worktree could not be removed, cleanup_warnings
names the leftover path. Already-terminal jobs are returned unchanged, so cancel
is idempotent — a retry after a lost response is safe. Free — no model call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job_id from an *_async call or a sync call's meta.job_id; recover lost ids with kimi_job_list. | |
| workspace_root | No | Absolute path to the target repo root — pass it (or an MCP root) to target the intended repo; otherwise the call falls back to the server's own cwd and sets meta.workspace_warning. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |