Block until an opencode task finishes
opencode_waitWait for a running background task to complete and return its status, using a real exit event instead of polling. Times out after 45 seconds; call again if still running.
Instructions
Block on a running task's real exit event (or a timeout, whichever comes first) and return its status once settled. The closest analog to the built-in Agent tool's auto-resume behavior available over plain MCP request/response, without a poll loop. Capped internally at 45s so the call returns cleanly instead of hitting Claude Code's own MCP tool-call timeout; if status is still 'running' when it returns, call opencode_wait again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task id returned by opencode_dispatch. | |
| timeout_ms | No | Max milliseconds to block. Capped at 45000 regardless of what's passed. Defaults to 45000. |