A reviewer submits the same decision twice
Detect: Resume gateway finds the state version already advanced.
Recover: Return the recorded outcome without scheduling another continuation.
Pause a durable execution at a defined boundary and resume it with validated input, current authority, and reconciled external effects.
Interruption and resumption allow an agent run to wait for a person, missing evidence, a business event, or an operational repair without occupying a worker indefinitely. A durable interrupt records why the run stopped, what input can resume it, and which execution version is waiting. Suspension is a workflow state, not a blocked thread.
Resumption must account for time. Permissions may expire, records may change, and a pending tool call may finish while the run is paused. Validate the resume token and new input, reload current policy, and reconcile outstanding operations before continuing. Do not assume that replaying a paused node is side-effect free.
A prototype can pause before a read-only step and manually supply a resume value. Test what code executes again when the runtime restarts that boundary.
Production persists interrupt metadata, authenticates responders, and defines expiry, cancellation, and stale-input behavior. Place irreversible actions after validated resume boundaries or protect them with idempotency.
At scale, waiting runs should consume storage rather than active worker slots. Build queues for expired interrupts and maintain compatibility for executions paused across several deployments.
Creates a durable waiting state with reason, required input, deadline, and execution version.
Saves accepted progress and pending operation identities at the suspension boundary.
Authenticates the responder and validates resume identity, input schema, and authority.
Checks changed business records and uncertain external operations before continuation.
Cancels or escalates abandoned waits according to explicit business policy.
sequenceDiagram
participant W as Agent worker
participant C as Checkpoint store
participant H as Review queue
participant G as Resume gateway
participant R as Replacement worker
W->>C: Persist waiting state and resume contract
W->>H: Publish review task
H->>G: Authorized decision with state version
G->>C: Validate and commit resume input
G->>R: Schedule continuation
R->>C: Load checkpoint and pending operations
R->>R: Refresh policy and reconcile effects
R->>C: Commit next execution stateflowchart LR
I["Resume submission"] --> A["Authenticate responder"]
A --> V["Match interrupt and state version"]
V --> P["Recheck current authority"]
P --> B["Recheck business assumptions"]
B --> R["Schedule continuation"]
V --> S["Stale decision record"]
P --> D["Denied resume"]
B --> N["Renewed review required"]Complete or checkpoint preceding work and identify any outstanding side effects.
Record the expected resume input and state version before releasing the worker.
Expose the pending action through a durable work queue or authenticated interface.
Reject stale, duplicate, unauthorized, or malformed resume attempts.
Recheck permissions, source versions, deadlines, and previously uncertain tool outcomes.
Claim fresh ownership and resume from the documented replay boundary with the accepted input.
Construction · Illustrative enterprise scenario, not a reported customer outcome.
A construction procurement team requests specialized equipment, but engineering certification arrives after the initial assessment.
Keeping the agent session open wastes capacity, while restarting from scratch repeats supplier checks and loses review context.
The assistant must pause with a precise evidence request and resume when the authorized engineer supplies the certificate.
A durable interrupt stores the missing certification requirement, approved supplier evidence, and the current purchase-request version.
If the purchase request changed during the wait, the old resume input is retained as evidence but affected checks run again before approval.
Measure waiting age, stale-resume rejection, resumed-run success, and repeated work to distinguish business delay from runtime inefficiency.
| Decision | Benefit | Cost |
|---|---|---|
| Durable suspension | Long waits do not occupy scarce worker capacity. | Checkpoint retention and lifecycle tooling become necessary. |
| Fresh validation | Resumption respects changed authority and business facts. | Some earlier work must be repeated after long pauses. |
| Replay-based continuation | Runtime recovery can remain simple. | Code before the interrupt may execute again and needs careful side-effect handling. |
Detect: Resume gateway finds the state version already advanced.
Recover: Return the recorded outcome without scheduling another continuation.
Detect: Loader cannot interpret the old interrupt contract.
Recover: Use a compatible worker or an explicit migration path.
Persist operation identity and reconcile the outcome before suspension.
Authenticate the actor and recheck decision authority.
Persist every value required for continuation.