Represent progress as explicit states
Define pending, running, completed, failed, and unknown outcomes, with stable step identifiers and input summaries. A trusted executor should manage transitions in durable storage. A conversational statement that the previous step finished is not a reliable checkpoint. Long tasks need to distinguish persisted results from data held only in memory.
Separate pure computation from external side effects. A failed read may be rescheduled, while disconnection after an external submission can leave an unknown outcome. Define how to inspect results, when to escalate to a person, and which situations prohibit automatic retry.
Save evidence around submission boundaries
Persist a pending record before invoking an external tool. After a reliable response, store its identifier and outcome before advancing. If the tool has a verified idempotency mechanism, use stable identifiers according to its rules. Generating an identifier locally does not by itself make an unsupported tool idempotent.
During recovery, inspect current state and external evidence before acting. Missing a success response does not justify repeating submission, and running does not mean completed. Use leases or equivalent coordination to prevent old and recovering workers from executing the same step simultaneously. Recheck authorization as part of recovery.
Exercise real interruption points safely
Use harmless local tools and inject interruption before invocation, after submission, and before persisting the result. Verify that recovery neither skips incomplete steps nor repeats confirmed work. Send unknown outcomes to a query or human-review path rather than an unlimited retry loop.
Record the tested version, date, and interruption points. After recovery, reconcile usage and final artifacts and explain completed versus uncertain work to the user. Durable resumption does not mean endless execution. Enforce elapsed-time, call-count, and budget boundaries, stopping safely with preserved progress when those boundaries are reached.
Sources & further reading
An owned publication maintained by NexoToken. Product references reflect the publisher’s commercial interest and are not independent certification.