/v2/agents/triggers/{trigger_id}/executions/{execution_id}/cancelCancelExecution ends a running execution and frees the trigger's in-flight slot.
Fails the execution and frees the trigger's in-flight slot. A fresh-mode session is destroyed outright. A reuse-mode session is only paused, not stopped - harness has no run-interrupt call, so the agent's turn may still be in flight server-side; this frees the queue, not necessarily the agent's work. A non-running execution is a no-op that still returns 200.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
A 401 is returned: Authentication failed due to invalid credentials. A 404 is returned: The resource was not found. A 409 is returned: Execution has not started a run yet (the worker's dispatch is still in flight); retry shortly, or pass force=true. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. Any other status is an error: There was an unexpected error.