POST /api/v1/cloud/sessions/{session_id}/cancel
Requests cancellation of the current turn in a Session. Cancel on a running Session returns HTTP 202 Accepted and the Session transitions through canceling back to idle. Cancel on an idle Session is a safe no-op and returns HTTP 200 OK.
Path parameters
Headers
Example request
Example response
HTTP 200 OK (no-op) or HTTP 202 Accepted (cancellation applied)status field is "canceling" in both cases. After the turn aborts, the Session returns to idle.
Errors
Note: Calling cancel on an already-idle Session is a safe no-op and returns HTTP 200. The response always uses the same lightweight format regardless of whether cancellation was applied (202) or was a no-op (200).HTTP 404 Not Found
Related
Start a session
Run an agent against an environment as a stateful conversation.