cancel_agent_run
Cancel a paused or approval-required agent run by run_id, ending its lifecycle as cancelled while preserving the audit-logged record.
Instructions
Cancel an agent run by run_id, ending its lifecycle at cancelled. Only a paused or requires_approval run can be cancelled — anything else fails with agent_run_invalid_state; an unknown run_id fails with agent_run_not_found. Use resume_agent_run or approve_agent_run to continue a waiting run instead. The cancellation is audit-logged and checkpointed; the run record is kept, not deleted. Returns the updated run resource.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | Run id from create_agent_run or list_agent_runs. |