Interrupt-Resumable Thought
Preserve multi-step reasoning across interrupts by supporting paused-and-resumed thought frames so a new message handles cleanly without clobbering in-flight work.
Problem
Without explicit continuation support, the agent has only two bad options when an interrupt arrives mid-chain. It can ignore the new message and look rude, finishing the previous thought as if nothing happened. Or it can answer the interrupt and quietly lose the in-flight reasoning, restarting from scratch later if at all. There is no notion of 'hold this thread, handle that one, then come back to where I was,' so any reasoning that takes longer than one turn fragments into shards every time the user speaks.
Solution
Introduce an explicit thought-frame: when starting a multi-step chain, push a frame onto a stack with the goal, the steps completed, and the next step. On interrupt: acknowledge briefly ('hold on — finishing X first' or 'switching: Y'), handle the interrupt, then look at the top frame and explicitly resume ('back to X — I was at step 3 / 6'). Cap stack depth to prevent infinite suspension. Frames older than a configurable window expire (the agent admits the resume would be reconstruction, not continuation).
When to use
- The agent supports incoming interrupts (new user messages) while it is mid-reasoning.
- Multi-step reasoning chains are common enough that losing one is a meaningful regression.
- The transport allows the agent to expose paused chains to subsequent turns.
Open the full interactive page →
Diagram, neighbourhood map, code examples, related patterns and full provenance.