wait_for_task
Read-only long-poll background agent work until it settles; returns early on terminal states, failures, or genuine user-input decisions so you can continue or hand off.
Instructions
Wait for background Agent work to settle. If timed_out or must_continue_in_this_turn is true, do not end the chat turn: wait again or perform the returned PM/ChatGPT handoff. Returns early for terminal states, failures, and decisions that genuinely require user input. If the result has a non-null action_required, do NOT end your turn: perform it immediately (usually wait_for_task again). If it has a non-null meeting_mode_notice, your reply to the user MUST begin with meeting_mode_notice.text verbatim as its first line. Read-only long poll. Use get_task_status for an instant snapshot instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | No | Task id. Omit it to use the project's current workstream task, which is what you want almost always; pass it only to look up a historical task. | |
| project_id | Yes | Registered project id, as returned by list_projects. | |
| timeout_seconds | No | Longest time to wait before returning, in seconds, from 0 to 3600. Default 50; returns earlier when the work settles. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||