Wait for completion
opencode_waitWaits for a coding run to complete and returns the full result or progress. Supports waiting on multiple runs and returns the first to finish.
Instructions
Waits up to 'maxSeconds' for a run to finish. If it is done, the full result comes back. If it is still running, a progress report comes back — then simply call again. Never blocks indefinitely, and never shortens the run itself: the task keeps going between calls no matter how long it takes. Returns the moment opencode reports the session idle — there is no polling delay. While waiting it emits notifications/progress with the live tool activity, so a client that sets resetTimeoutOnProgress can raise maxSeconds well past its own default timeout. Pass 'runIds' instead of 'runId' to wait for whichever of several parallel runs finishes first.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "opencode_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | No | The runId returned by opencode_dispatch. | |
| runIds | No | Several runIds — returns as soon as any one of them finishes. | |
| maxSeconds | No | Maximum wait time for this call (default 55s). |