kilo_task_wait
Waits for a background coding task to finish or time out, then returns its terminal result or a timeout status summary with progress.
Instructions
Wait until a background kilo_implement task reaches a terminal state
(completed, failed, failed_with_uncommitted_work, cancelled, error) or timeout_seconds
elapses, polling cheaply every 2 seconds and reconciling orphaned processes from their
log files via _reconcile_task_if_orphaned. Also waits through queued -> running -> terminal
for queued tasks, restarting the detached queue runner if it has died.
Accepts timeout_seconds up to at least 3600s (or more) for long runs and
returns as soon as the task ends. When terminal, returns the kilo_task_result
output (trimmed by default, or full trace with include_trace=True).
On timeout, does not raise: returns a clear status message with current progress
and elapsed seconds.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_id": "<task_id>"
},
"name": "kilo_task_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task_id returned by kilo_implement when launched with background=true (the default). | |
| include_trace | No | If True, includes the full execution trace in the terminal result. Defaults to False (returns trimmed result: status, exit code, session_id, worktree/branch when present, Final Report, and log path). | |
| timeout_seconds | No | Maximum seconds to wait before returning a status summary. Accepts up to at least 3600 seconds (or more). Defaults to None (wait up to KILO_TIMEOUT, at least 3600). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |