Agent recovery checkpoints

Resuming an agent is more than replaying its conversation

Conversation history explains intent. Durable operation records establish what happened. Recovery needs both, with a clear rule for uncertain side effects.

In this article

The transcript can be ahead of reality

An assistant says it is updating an order, calls a tool and then loses its connection. On restart, the conversation contains the intended action but not a reliable result. Replaying the dialogue may cause the model to repeat the update, even if the first attempt succeeded.

The opposite mismatch is possible too. A tool may commit a change before the assistant's response is saved. The conversation then looks incomplete while the business system is already correct. Neither gap can be resolved by asking the model to reason more carefully from the same missing evidence.

Persist workflow state separately from conversational text. Store the proposed operation, its identifier, execution status and recorded result. The transcript remains useful for explaining the user's task, while the operation record governs recovery.

Checkpoint around business boundaries

A checkpoint is a durable record from which work can continue. Useful boundaries include a completed read, a saved proposal, an approval decision and a resolved mutation. Not every sentence needs a checkpoint, but every consequential effect needs a recoverable identity.

Before dispatching a mutation, save its intent and operation identifier. After a confirmed result, save the outcome. If the process stops between those steps, the operation is pending or uncertain and needs reconciliation rather than automatic re-creation.

Recover the operation before continuing the dialogueA restart reads durable state and resolves uncertain effects before asking the model for the next step.
  1. Save intentPersist the approved payload and operation identifier
  2. DispatchCall the bounded tool under current authority
  3. Resolve resultRecord success, rejection or uncertainty
  4. Resume dialogueExplain the recorded outcome and remaining work

Use idempotency where the effect occurs

A local operation table cannot by itself guarantee that an external service performs a mutation only once. The downstream API needs a compatible idempotency contract, or the application needs a reliable way to reconcile the result before retrying.

If the mutation and operation record share one database, a transaction can bind them together. Across services, there is usually an uncertainty window to handle. Document it instead of calling the whole workflow exactly-once without qualification.

Also prevent two recovery workers from owning the same run at once. A lease or conditional state transition can coordinate them, but stale workers must not be allowed to commit after ownership changes. The enforcement mechanism needs to match the storage and downstream capabilities.

Revalidate the present before continuing

A paused task can outlive permissions, approvals and target eligibility. On resume, verify the authority required for the next effect. Keep already completed operations distinct from new work that is no longer permitted.

Test process termination before dispatch, after downstream commit and before local result persistence. Check the final business state and number of effects. A convincing recovery design can explain each interruption point without treating a conversational summary as proof that a mutation did or did not happen.

Primary sources

AWS Builders' Library: idempotent APIsAWS: workflow error handling

References checked 11 September 2026.