Skip to main content
DELETE
Cancel a session
Cancels a session that is still active. The agent is stopped and the session transitions to interrupted status. Cancelling a queued session dequeues it immediately, without it ever starting, and cancelling a session that already finished is a harmless no-op. Cancellation can’t be undone: use pause if you want to resume later. Returns 204 No Content on success.

Path parameters

string
required
The session ID to cancel.

Examples


When to cancel vs. pause

Use cancel when:
  • The task is no longer needed
  • You want to free a concurrency slot immediately
  • The agent is stuck or producing unhelpful output
Use pause when:
  • You want to review progress before continuing
  • You need to provide input later but not right now

Errors