Cancel Agent Run
POST /agent/runs/{run_id}/cancel
POST
/agent/runs/{run_id}/cancel
Stop a run and everything it spawned.
OWNER ONLY, and that is stricter than the read routes on purpose: shared visibility lets an org SEE a teammate’s run, while stopping it is destructive and not undone by restarting. Children are signalled before the root so a freed parent cannot leave orphans behind it.
Idempotent on an already-terminal run: cancelled: false with a reason,
not an error, so a double call does not look like a failure.
Authorizations
Parameters
Path Parameters
run_id
required
Run ID
string format: uuid
Run ID
Header Parameters
Responses
200
Successful Response
object
data
required
object
cancelled
required
boolean
children_cancelled
Sub-agents signalled alongside the run.
Array<string>
detail
string
work_item_id
required
string
pagination
Any of:
null
422
Validation Error
object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string