Wait for an Oliver run to finish or pause.
GET/api/v1/oliver-runs/{oliver_run_id}/waitoliver:run
Long-polls the run for up to wait_seconds (at most 50) and answers the run's summary, with timed_out true when the wait ran out first. Requires the conversation, run, tool history, tool request and tool result read permissions.
| Scope | oliver:run |
| Asynchronous | No |
| MCP tool | wait_oliver_run |
| Portal permissions | view_oliver_conversations, view_oliver_runs, view_oliver_tool_execution_history, view_oliver_tool_requests, view_oliver_tool_results |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
oliver_run_id | path | string | Required | |
wait_seconds | query | integer or null | Optional | Seconds to wait for the run to finish or pause, up to 50 (default 30). |
Docwize-Version | header | string (date) | Optional | |
If-None-Match | header | string | Optional | Answers 304 when the representation is unchanged (resources that publish an ETag). |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json OliverRunWait |
304 | Not modified (If-None-Match matched the ETag). | |
400 | invalid_version | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
| Code | Status |
|---|---|
invalid_version | 400 |
token_expired | 401 |
unauthenticated | 401 |
forbidden | 403 |
insufficient_scope | 403 |
token_owner_inactive | 403 |
not_found | 404 |
method_not_allowed | 405 |
not_acceptable | 406 |
wrong_region | 421 |
validation_failed | 422 |
internal_error | 500 |
tenant_unavailable | 503 |
unavailable | 503 |
timeout | 504 |
Schemas
OliverContextBreakdown
| Field | Type | Required | Description |
|---|---|---|---|
latest_user_message_percent | integer | Required | ≥ -2147483648; ≤ 2147483647 |
memory_topics_percent | integer or null | Required | The memory topics in the system instructions; null when the agent's prompt carries none. |
messages_percent | integer | Required | The conversation so far. ≥ -2147483648; ≤ 2147483647 |
system_instructions_percent | integer | Required | ≥ -2147483648; ≤ 2147483647 |
tool_definitions_percent | integer | Required | ≥ -2147483648; ≤ 2147483647 |
OliverContextWindow
| Field | Type | Required | Description |
|---|---|---|---|
breakdown | OliverContextBreakdown | Required | |
compaction_buffer_percent | integer or null | Required | Percent of the window kept free before the conversation is compacted. |
model_name | string | Required | |
used_percent | integer | Required | Percent of the model's context window the latest prompt filled. ≥ -2147483648; ≤ 2147483647 |
OliverRun
| Field | Type | Required | Description |
|---|---|---|---|
agent_name | string or null | Required | |
answer | OliverRunAnswer or null | Required | |
child_runs | array of OliverRunChild | Required | |
created_at | string (date-time) or null | Required | |
error | OliverRunError or null | Required | Why the run failed; null unless it failed. |
is_finished | boolean | Required | |
oliver_agent_id | string or null | Required | |
oliver_run_id | string | Required | |
oliver_thread_id | string | Required | |
origin | string or null | Required | |
parent_oliver_run_id | string or null | Required | The run that delegated to this one, for a sub-agent run. |
pending | OliverRunPending or null | Required | The question or approval the run waits on; null otherwise. |
permission_mode | string | Required | ask or auto. |
progressive_wait | OliverRunProgressiveWait or null | Required | A progressive run only: why it stopped and the checkpoint revision that resumes it (resume_oliver_run); null for a standard run. |
status | string | Required | planning, executing, running, waiting_for_user, waiting_for_surface_save, waiting_for_closure, paused, completed, failed or cancelled (open). |
steps | array of OliverRunStep | Required | |
updated_at | string (date-time) or null | Required | |
usage | OliverRunUsage | Required | The tokens and cost of the messages the run wrote, and the context-window breakdown of its latest call. The tool calls are listed by list_oliver_run_tool_calls. |
waiting_for | string or null | Required | What the run waits for, when it is paused on something other than an answer. |
OliverRunAnswer
| Field | Type | Required | Description |
|---|---|---|---|
from_sub_agent | boolean | Required | True when the answer is a sub-agent's reply the run delegated to. |
is_final | boolean | Required | True once the run has completed. |
oliver_message_id | string | Required | |
oliver_thread_id | string or null | Required | The sub-agent's thread, when from_sub_agent is true. |
text | string | Required |
OliverRunChild
| Field | Type | Required | Description |
|---|---|---|---|
agent_name | string or null | Required | |
oliver_run_id | string | Required | |
oliver_thread_id | string | Required | |
status | string | Required | |
usage | OliverRunUsage | Required | What the sub-agent run cost and how full its context window was. |
OliverRunError
| Field | Type | Required | Description |
|---|---|---|---|
error | string or null | Required | The error the dispatch recorded. |
step_summary | string or null | Required | The summary of the failed step. |
OliverRunPending
| Field | Type | Required | Description |
|---|---|---|---|
asked_by_sub_agent | boolean | Required | True when a sub-agent asked; the answer goes to it. |
details | object | Required | What the agent proposes, as it stated it (an approval's operation summary, risk level and so on). |
gated_tool | string or null | Required | The tool an approval holds. |
kind | string | Required | approval or clarification (open). |
multi_select | boolean | Required | |
question | string or null | Required | The question a clarification asks. |
steps | array of OliverRunQuestionStep | Required | |
suggestions | array of string | Required | |
tool_call_key | string | Required | Quote it in respond. |
OliverRunProgressiveWait
| Field | Type | Required | Description |
|---|---|---|---|
blocked_code | string or null | Required | Why no resume is accepted yet (for example ReconciliationRequired); null when one is. |
resume_reason | string or null | Required | continue when resume_oliver_run is accepted now; null when no resume is accepted yet. |
state_revision | integer | Required | The checkpoint revision the run stopped at: send it as expected_state_revision to resume_oliver_run. ≥ -2147483648; ≤ 2147483647 |
wait_code | string or null | Required | The reason code of the wait. |
wait_kind | string or null | Required | What the run waits for, as the runtime recorded it; null when it is not waiting. |
OliverRunQuestionStep
| Field | Type | Required | Description |
|---|---|---|---|
multi_select | boolean | Required | |
question | string | Required | |
step_key | string | Required | The step's key: the step_answers key. |
suggestions | array of string | Required |
OliverRunStep
| Field | Type | Required | Description |
|---|---|---|---|
capability | string or null | Required | |
created_at | string (date-time) or null | Required | |
kind | string | Required | |
output_summary | string or null | Required | |
seq | integer | Required | ≥ -2147483648; ≤ 2147483647 |
status | string | Required |
OliverRunUsage
| Field | Type | Required | Description |
|---|---|---|---|
context_window | OliverContextWindow or null | Required | How full the model's context window was at the run's latest call; null until the run has made one. |
cost | string or null | Required | What the run's model calls cost, as the Portal records it for the chat; null when none was recorded. |
reasoning_tokens | integer | Required | ≥ -2147483648; ≤ 2147483647 |
request_tokens | integer | Required | Tokens sent to the model across the messages the run wrote. ≥ -2147483648; ≤ 2147483647 |
response_tokens | integer | Required | ≥ -2147483648; ≤ 2147483647 |
OliverRunWait
| Field | Type | Required | Description |
|---|---|---|---|
run | OliverRun | Required | |
timed_out | boolean | Required | True when the wait ended before the run finished or paused. |