Cancel a session
Lifecycle
Cancel a session
Stop a running session.
DELETE
Cancel a session
Cancels a session that is still active. The agent is stopped and the session transitions to
Use cancel when:
interrupted status. This is irreversible: use pause if you want to resume later.
Returns 204 No Content on success.
Path parameters
The session ID to cancel.
Examples
When to cancel vs. pause
| Action | Effect | Can resume? | Frees quota? |
|---|---|---|---|
Cancel (DELETE) | Stops the agent, terminal state | No | Yes |
Pause (POST /pause) | Halts the agent, preserves state | Yes | No |
- The task is no longer needed
- You want to free a concurrency slot immediately
- The agent is stuck or producing unhelpful output
- You want to review progress before continuing
- You need to provide input later but not right now
Errors
| Status | Cause |
|---|---|
404 | Session not found, or you don’t have access. |