Stop the running turn
Asks the agent to stop this session’s run, and returns immediately.
More details
More details
Authorizations
API key for authentication
Headers
Required opaque key (max 255 chars, UUIDv4 recommended) making this request idempotent for 24h: a retry with the same key and body replays the original response with Idempotent-Replayed: true. Omitting it is a 400; reusing a key with a different body is a 422; retrying while the first request is still in flight is a 409.
Path Parameters
Session whose run to stop.
Response
Stop request accepted, or reported as unnecessary when no run was live.
"665f1c2e8a1b4c0012ab34cd"
Whether a stop was forwarded to the agent.
False means there was nothing live to stop — the run had already finished. That is a normal answer, not an error: a stop always races the run it is trying to end.
true
Status of the run at the moment the stop was requested — deliberately unchanged. The run is still going; it reaches STOPPED only once the agent confirms on its own event stream.
QUEUED, RUNNING, COMPLETED, FAILED, STOPPED, STALE "RUNNING"
Job handle for the run being stopped. Null when the turn was asked in the app rather than through this API.
"sajob_9f2c1a4b7e8d4c1fa0b3"
URL of GET /v1/jobs/{job_id} — poll it until the job reports STOPPED (or the status the run reached on its own).