Interrupt a running session
Stops active model generation immediately and gives an active tool a bounded grace period. A session started before immediate interruption was available keeps its earlier bounded grace behavior. Interrupting is also how queued input is read sooner: when messages are waiting, the newest becomes the instruction for a fresh turn instead of leaving the session idle. With nothing waiting the session is left idle so a later follow-up can resume it. A session with nothing running — idle and not asleep or waiting on its subagents, or already in a terminal status — is refused with 409 conflict and nothing is recorded. interrupted reports whether running work received the request; false means the stop was recorded but reaching running work was not confirmed, typically because the run ended as the request arrived. Omit message to use a default one.
Authorizations
A Recursion API key, created in the console under API keys.
Headers
Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.
1Organization 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.
1Path Parameters
Session id (UUID) as returned by managedAgentsStartSession or managedAgentsListSessions.
Body
Request body for interrupting a running session, optionally injecting a message the agent sees at the interruption point.
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.
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.