Continue Agent Run

Continue an existing run

For local agents, supply the original session_id for every continuation, including completed-run follow-ups. Send the original run_id in the continuation request, then use the ID returned by the response. A completed-run follow-up automatically forks to a new run ID even without an explicit fork flag. Using the example server, set RUN_ID and SESSION_ID from its response:

curl --fail-with-body \
  "http://127.0.0.1:7777/agents/reference-agent/runs/$RUN_ID/continue" \
  -H "Authorization: Bearer $OS_SECURITY_KEY" \
  -F "session_id=$SESSION_ID" -F 'input=Explain that in more detail' -F 'stream=false'

For a paused tool confirmation, preserve the complete returned tool execution record, including tool_args and requires_confirmation, and change only confirmed to true after the user approves. Save an array containing those complete updated records to tools.json. Sending only a tool ID, name and confirmation discards fields needed to resume correctly. The tool-free example server above does not produce a confirmation; use a paused response from your confirmation-enabled agent.

curl --fail-with-body \
  "http://127.0.0.1:7777/agents/reference-agent/runs/$RUN_ID/continue" \
  -H "Authorization: Bearer $OS_SECURITY_KEY" \
  -F "session_id=$SESSION_ID" -F 'stream=false' \
  -F 'tools=<tools.json'

stream=false returns JSON; the default streams SSE. Resume Agent Run Stream reconnects to events and does not perform this continuation.

Background continuation

A qualifying paused durable-queue ticket can return 202 PENDING for background=true with stream=false. Without that ticket, the current compatibility path executes the nonstreaming continuation inline and returns its finished run output. Streaming background continuation is detached, but is durable only when queued. Remote background continuation is unsupported. Conflicting ticket or continuation state can return 409. See HITL continuations.

POST/agents/{agent_id}/runs/{run_id}/continue

Advance a persisted agent run from its current state. Dispatches on the body shape and the persisted run state.

Variants:

  • PAUSED + tools provided → apply HITL tool results, resume
  • PAUSED + resolved admin approval (empty tools) → apply resolution, resume
  • RUNNING / ERROR (no unresolved HITL requirements) → resume from last persisted state
  • COMPLETED + new tools → continue with appended messages

Tools Parameter: JSON string containing array of tool execution objects with results. Optional — only required when the persisted run has unresolved HITL requirements.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

agent_id*Agent Id
run_id*Run Id

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl --request POST 'https://example.com/agents/string/runs/string/continue'
null