Cancel a headless agent run
Agents
Cancel a headless agent run
Soft-cancel an executing run: transitions a running run to a terminal
error state (note “Run cancelled by caller”), closes any live stream,
and clears the one-run-per-agent guard. Terminal runs
(completed/error/rejected/pending_approval) return 409
(RUN_NOT_ACTIVE). Requires the agents:run scope and ownership.
DELETE
Cancel a headless agent run
Authorizations
API key or personal access token (NEX-1042). Send as
Authorization: Bearer <token>. Token format:
nex_live_…— live API key (server-to-server)nex_test_…— sandbox API keynex_pat_…— personal access token (acts as the issuing user)
Authorization is decided by the key's scopes array, not the
owning user's RBAC role. See POST /api/api-keys to mint a key.

