Skip to main content
POST
Interrupt a running session

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

x-tenant-id
string

Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.

Minimum string length: 1
x-organization-id
string

Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.

Minimum string length: 1

Path Parameters

sessionId
string<uuid>
required

Session id (UUID) as returned by managedAgentsStartSession or managedAgentsListSessions.

Body

application/json

Request body for interrupting a running session, optionally injecting a message the agent sees at the interruption point.

message
string

Optional reason recorded when the running session reaches its cooperative stop checkpoint.

Response

Response body of POST /managed-agents/v1/sessions/{sessionId}/interrupt. An interrupt is a cooperative control, not a session cancellation: the session stays alive and keeps accepting events. Use POST /managed-agents/v1/sessions/{sessionId}/cancel to stop it.

Response body of POST /managed-agents/v1/sessions/{sessionId}/interrupt. An interrupt is a cooperative control, not a session cancellation: the session stays alive and keeps accepting events. Use POST /managed-agents/v1/sessions/{sessionId}/cancel to stop it.

interrupted
boolean
required

True when the interrupt reached the running session and its active work was told to stop. False means the request was accepted and the stop recorded, but nothing running was confirmed interrupted -- typically because the run ended as the request arrived. A session that was not running when the request arrived is refused with 409 instead.