API reference

Cancel a running session explicitly.

Closing an SSE connection does not stop the server-side agent. Use cancel when the user intentionally stops work.

Request

Cancel
POST /v1/sessions/{session_id}/cancel

Product UI

  • Show cancel only while a task is running or starting.
  • Verify ownership before sending the cancel request.
  • After cancel, stop app-side progress rendering and refresh session status.