Wait until a subagent needs attention
waitPause a subagent session until it needs your input, then receive the outcome. Resolves on completion, pending permission requests, checkpoints, or timeouts, returning the current state so you can decide the next action.
Instructions
Block until the subagent needs you, then return what happened. Wakes on: turn drained to idle (wake='done'), a pending permission request (wake='permission' — answer via the permission tool), a report() checkpoint from the subagent (wake='report' — a report is delivered once, even if it arrived before this call), terminal states (wake='stopped'/'dead'), or timeout (wake='timeout', snapshot shows live state). Already-attention states return immediately, so it doubles as 'is it done?'. On hosts supporting MCP tasks this runs as a background task; elsewhere it blocks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Subagent handle returned by spawn, e.g. 'coder-auth' | |
| timeout_ms | No | Block up to this many ms for attention (default 600000, max 3600000) |