Cancel script run
Cancels a script run that has not started. A running script runs to its end or its timeout (409 run_not_cancellable).
Authorizations
API key in the format: Bearer {api_token}
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
255Path Parameters
Script run id (srun_...)
Response
The cancelled run
queued, in_progress, completed, failed, cancelled, timed_out The script's last expression, as JSON.
What the script printed: its start and end when long, with the cut marked.
Every tool call the script made, in order: {role, status, read_only, error_code, approval_id}. A 202 call did not run and names its approval.
What the script's gated calls froze, as each stands now. Approving one runs that call, never the script again.
Approvals still waiting for a decision: POST /approvals/{id}/approve or /deny.
Files the script wrote to outputDir.

