wait_for_task
Poll a task until it reaches a terminal state or timeout, returning the final task object with elapsed time and poll count.
Instructions
Poll a task until it reaches a terminal state, or timeout.
Terminal states: completed, failed, timed_out, cancelled. Non-terminal (will keep polling): queued, in_progress, idle, waiting_for_user.
Args:
task_id: Task ID returned by create_task.
owner: Optional repo owner (preferred — faster path).
repo: Optional repo name.
timeout_seconds: Hard ceiling on total wait. Default 30 min.
poll_interval_seconds: Sleep between polls. Default 15s.
Returns:
Final task object plus _meta.elapsed_seconds and _meta.polls.
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": "wait_for_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | ||
| owner | No | ||
| task_id | Yes | ||
| timeout_seconds | No | ||
| poll_interval_seconds | No |