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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | ||
| owner | No | ||
| task_id | Yes | ||
| timeout_seconds | No | ||
| poll_interval_seconds | No |