Interruptible Agent Execution
Treat pause, resume, and cancel as a first-class control surface on every long-running agent so users can halt expensive or off-track trajectories mid-task while state is preserved for resumption.
Problem
Most agent runtimes only expose 'start' and (sometimes) a brutal kill. Pause is not implemented, so the user must wait for the agent to finish or kill the process. Cancel loses any partial work and any chance to run compensating actions. Resume is impossible because nothing snapshotted state. Without an interruption surface, autonomous loops produce a binary 'let it finish or lose everything' experience that destroys user trust in long-running agents.
Solution
Build the runtime so each step boundary is a snapshot point: state is durable across pause/resume. Pause stops further model and tool calls without killing the process. Resume rehydrates from the snapshot. Cancel runs compensating actions on in-flight side effects (mark drafts as discarded, release locks, end provider sessions) before tearing down. Expose all three as visible UX, not hidden APIs. Distinct from a kill-switch, which is an operator-level emergency halt.
When to use
- Agent runs are long enough that users will form mid-run judgments.
- In-flight side effects can be compensated cleanly.
- State is small enough to snapshot at step boundaries without prohibitive cost.
Open the full interactive page →
Diagram, neighbourhood map, code examples, related patterns and full provenance.