Wait for a session
oc_waitWaits for a background OpenCode session to finish and returns its result; stops early when the agent needs permission or an answer.
Instructions
Wait until an OpenCode session started in the background (or unblocked) finishes, then return its result. Also stops when the agent is waiting for a permission or an answer to a question.
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": {
"session_id": "<session_id>"
},
"name": "oc_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | Start timestamp (ms) of the turn, as returned by oc_delegate/oc_send. Default: the whole history. | |
| detail | No | final = answer only; summary (default) = answer + tools + files; full = complete transcript of the turn. | |
| timeout_s | No | Max wait in seconds (default 900). Past it, the task keeps running and oc_wait picks it up. | |
| session_id | Yes |