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. interrupted reports whether running work received the request; false means there was nothing running to interrupt. Omit message to use a default one.
Authorizations
A Recursion API key, created in the console under API keys.
Path Parameters
Session id (UUID) as returned by startSession or listSessions.
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 /v1/sessions/{session_id}/interrupt. An interrupt is a cooperative control, not a session cancellation: the session stays alive and keeps accepting events. Use POST /v1/sessions/{session_id}/cancel to stop it.
Response body of POST /v1/sessions/{session_id}/interrupt. An interrupt is a cooperative control, not a session cancellation: the session stays alive and keeps accepting events. Use POST /v1/sessions/{session_id}/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 a session that had already finished.