Back to all posts
AI Agents7 min read·October 25, 2026

How Do AI Agents Resume After a Timeout or Restart?

TB
ThynkBlox AI Team
AI Engineering

How should an AI agent resume after a failure?

To resume a long-running AI agent workflow after failure, persist task state and completed actions outside the model conversation. On restart, load that record, check any uncertain outcomes against the system involved, and continue from the next permitted step. Treat expired credentials and pending external jobs as explicit waiting states. Never repeat a business action merely because its response is missing from the conversation.

The central design question is simple: what evidence must the agent check before it acts again?

What should the agent remember outside the conversation?

Use a durable task record as the source of progress. The conversation can explain the request, but it should not be the sole evidence that an order was created, an approval was granted or a report was submitted.

Keep the record focused on decisions and observable results:

RecordWhat to saveHow it supports recovery
Task definitionRequested outcome, scope and relevant input versionEstablishes what the agent is authorised to finish
Current stateReady, running, waiting, completed or needs reviewIdentifies the next recovery decision
Action historyIntended action, stable reference, status and result referenceSeparates completed actions from uncertain attempts
ApprovalApproved action, constraints and input versionAllows the workflow to check whether approval still applies
External jobJob reference, last known status and next checkAllows an existing job to be followed
Recovery ownershipCurrent worker and its right to proceedEstablishes who may continue the task

Store the facts needed to continue, rather than every intermediate thought. Keep sensitive inputs only where the workflow needs them, with appropriate access controls. The same boundaries described in what data an AI agent should be able to see should apply to saved progress.

Where should checkpoints go?

Place checkpoints around meaningful transitions: inputs validated, approval received, action prepared, action confirmed and external job submitted.

A checkpoint should state what is known and what remains unresolved. “Processing order” is too vague. “Order creation requested; outcome unconfirmed” gives recovery a specific question to answer.

For each business action, design the sequence deliberately:

  • Save the intended action and a stable action reference before sending the request.
  • Send the request using that reference where the receiving system supports it.
  • Save the confirmed result and the receiving system’s record reference.
  • Mark the step complete only when the required evidence is present.

Do not assume that saving progress locally and completing an action elsewhere happen together. Design for an interruption between them.

Also validate saved state before continuing. If the workflow’s rules or required inputs have changed, route an incompatible checkpoint for review instead of guessing how to interpret it.

How do you avoid repeating a completed business action?

Separate retrying a request from repeating its business effect.

Suppose an agent sends a request to create a customer order, then loses the connection before recording the response. Treat the outcome as unknown. The recovery path should establish whether the order exists before requesting another one.

Prefer a receiving system that accepts an idempotency key: a stable reference intended to identify repeated requests for the same action. Before relying on that feature, confirm its documented scope, retention period and behaviour when request details change.

Keep the same action reference during recovery. Create a new reference only for a genuinely new business action.

Where no such feature exists, define a reconciliation path. Search using a reliable business reference, then verify that the matching record has the expected details. A similar name or amount alone should not count as proof.

If the workflow cannot establish whether an irreversible action occurred, stop for review. A local “sent” flag is not enough evidence to declare the remote action complete.

What should happen when credentials expire?

Make access recovery a separate step from business recovery.

When credentials are expired or rejected, place the task in a waiting-for-access state. Preserve its checkpoint and action history. Renew access through the approved mechanism, or ask an authorised person to reconnect the account.

After access returns, check permissions again. Do not assume that the restored connection grants the same access as before.

Then revisit any uncertain action. Reconnecting an account is not evidence that the earlier request failed, and it is not permission to repeat it.

Save a reference to the managed connection rather than copying passwords or access tokens into task notes. If a task now requires broader permissions, send that change through approval before continuing.

How should the agent handle an external job that is still running?

When another service accepts work for later completion, save its job reference as soon as it is available. On restart, check that job instead of submitting a replacement.

Define what each returned status permits:

Observed statusRecovery decision
Queued or runningKeep waiting and schedule another check
CompletedRetrieve and validate the result before continuing
FailedInspect the failure and any partial effects before deciding on a retry
CancelledConfirm whether the task should stop or receive new approval
Missing or unclearReconcile through the agreed lookup or review path

Give waiting an owner and an escalation condition. A task should not remain silently pending forever.

If a completion notification arrives, match it to the saved job and verify its current state. Design repeated notifications to leave completed work unchanged.

If submission itself has an unknown outcome, use the same reconciliation discipline as any other business action. Missing confirmation is not permission to submit again.

What does a worked recovery example look like?

Consider an illustrative workflow that reads an approved customer request, creates an order in an ERP and asks a separate service to prepare supporting documents.

The agent saves the approved request version and an action reference before creating the order. The ERP creates it, but the agent stops before saving the response.

On recovery, the agent loads the checkpoint and sees an unconfirmed order request. It looks up the action reference, verifies the existing order against the approved request, and saves the order’s record reference. It does not create another order.

Next, it submits document preparation and saves the returned job reference. A later restart finds that job still running, so the workflow waits. Once the job completes, it validates the documents and proceeds.

If the customer changes the request during that wait, the workflow should identify which remaining actions need fresh approval. It should not silently apply the old approval to changed instructions. See where approval steps belong in an AI agent.

What common mistakes make recovery unsafe?

Restarting from the original prompt. Reload saved progress first. Ask the model to work within the next permitted step.

Treating every timeout as failure. Record an unknown outcome until reconciliation establishes what happened.

Marking an action complete before confirmation. Distinguish prepared, attempted, confirmed and uncertain actions.

Retrying everything automatically. Set recovery rules by action. Reading a record and issuing a refund deserve different controls.

Letting overlapping workers continue. Require each worker to prove it still owns the task before making another change.

Testing only a clean restart. Interrupt the workflow around approvals, external writes and job submission. Verify the resulting business records, not just the task’s final status.

When is full resume support unnecessary?

A short, read-only task may be cheaper to rerun if its inputs remain available and repeating it has an acceptable cost.

Even then, define how fresh the inputs must be. Repeating a lookup against changed records may answer a different question.

Use stronger recovery controls when a workflow spans approvals, changes business records, launches paid work or waits on another system. Scope that behaviour during the pilot, alongside the success criteria in how to run an AI pilot that ends in a decision.

Can the conversation history serve as a checkpoint?

Use it as supporting context. For recovery decisions, require structured records of actions, approvals and confirmed outcomes. A model’s statement that it completed something should not substitute for evidence from the receiving system.

Should every failure trigger an automatic retry?

No. Define which failures permit another attempt, which require reconciliation and which require a person. Set limits so repeated failures become visible rather than continuing indefinitely.

A wider AI provider outage needs its own plan; see what ERP workflows should do when an AI provider is down.

What should a person see when recovery stops?

Show the requested outcome, confirmed actions, uncertain actions and the decision needed next. Give the reviewer enough evidence to resolve that decision without reconstructing the entire conversation.


For custom AI agents, recovery behaviour belongs in the initial design: what is saved, what may be retried, and when a person must decide.

How work starts matters as much as how it resumes; see whether an AI agent should run on events or a schedule.

Ready when you are

Want to talk this through for your business?

Send us the process you are thinking about. You will hear back from an engineer, not a sales team.