wait_for_task
Block until a task status changes or timeout expires, replacing polling loops. Optionally wait for a specific status; timeouts are normal, re-call to keep waiting.
Instructions
Block (polling, lock-free) until a task's status changes, or until timeout_seconds elapses — use instead of repeatedly calling get_task in a loop. Without until_status, returns as soon as status differs from its value at call time; with until_status, waits specifically for that status. Timing out is a normal result (timed_out: true), not an error — re-call to keep waiting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| until_status | No | Wait for this specific status. Omit to wait for any change. | |
| timeout_seconds | No | Default 30, max 55. |