wait_for_tasks
Wait for multiple task IDs to settle, using any or all mode with an optional timeout. Returns compact statuses, terminal IDs, and stop reasons without canceling the observed tasks.
Instructions
Observe 1..32 unique task IDs, returning compact statuses in requested order.
mode any returns when at least one requested task is settled; all waits for every task. timeout_seconds accepts 0..3600 (default 30) and is honoured as asked, never silently clamped; out of range is INVALID_PARAMS. Zero polls immediately. until="terminal" holds until the mode is satisfied, bounded by a 6 hour server ceiling, and requires timeout_seconds to be omitted. Your MCP client's own request deadline still applies. Prefer holds <=50 seconds after remote "device did not respond" or "connection closed" errors; see docs/multi-task-waiting.md. All IDs must exist and pass caller read authorization before waiting. Existence checks and initial metadata share a two-second I/O budget; undecidable existence rejects the request. A final metadata observation can add up to two more seconds. Returns terminal_task_ids, bounded summaries and get_task_status diagnostic references; no output tails. A recovered task whose process is confirmed gone without an observed exit is listed in undecidable_task_ids (status unknown) and counts as settled in both modes, as in wait_for_task, after a short grace if its owning harflow_mcp server is still alive; an uncertain identity keeps waiting. Under until="terminal", targets that stay unobservable for 3 rounds stop the wait with stop_reason observation_unavailable. Rows carry a bounded failure_diagnostic (category, reason) when one exists. Also returns requested/effective timeout, until, timed_out, stop_reason, elapsed_seconds and polling_guidance. Progress is sent every 5 seconds. Timeout and caller cancellation never cancel or signal the observed tasks.
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_ids": "<task_ids>"
},
"name": "wait_for_tasks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | any | |
| until | No | timeout | |
| task_ids | Yes | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||