Operational playbook for personal AI agents

Resume an agent after a partial tool failure

Do not restart the whole run and hope for the best. Preserve the intent, classify what is known, reconcile external effects, choose the last safe checkpoint, and resume only the unfinished work.

Abstract operations console representing agent recovery
FREEZE THE RUNPRESERVE EVIDENCERECONCILE SIDE EFFECTSSELECT A CHECKPOINTRESUME WITH A NEW ATTEMPTVERIFY THE OUTCOMEFREEZE THE RUNPRESERVE EVIDENCERECONCILE SIDE EFFECTSSELECT A CHECKPOINTRESUME WITH A NEW ATTEMPTVERIFY THE OUTCOME

A partial failure is not a failed run

A partial tool failure means the agent crossed at least one boundary, received incomplete confirmation, or completed some steps before another step stopped.

The dangerous response is a full restart. A restart may resend a message, submit a form again, recreate a record, overwrite newer work, or trigger a second deployment. The correct response is recovery: determine which effects are confirmed, which are absent, and which remain unknown; then continue from a deliberately selected boundary.

This playbook applies to personal agents that combine model reasoning with API tools, browsers, text messages, files, queues, and human approvals. The exact infrastructure can vary, but the operational contract should remain stable. Every run needs an intent identity, every attempt needs a history, and every irreversible effect needs either an idempotency key or a postcondition check.

The model can help interpret evidence and propose the next step. It should not decide that an external effect “probably” did or did not happen. Facts about the world must come from provider records, durable events, database state, browser inspection, or an operator.

Classify before you retry

Use four outcome states. Collapsing “unknown” into “failed” is the most common source of duplicate side effects.

The central rule

A timeout, closed browser, worker crash, or missing response tells you that confirmation is missing. It does not establish whether the external system committed the action. Preserve that uncertainty until evidence resolves it.

Confirmed complete

The provider returned a durable operation identifier, a matching event exists, or a postcondition proves the requested effect.

Recovery: keep the result and advance.

Confirmed absent

The provider can authoritatively show that no matching effect exists and no asynchronous work remains pending.

Recovery: safely retry the step.

Confirmed failed

The tool rejected the operation and supplies evidence that it did not commit the requested effect.

Recovery: repair input or choose an alternative.

Unknown outcome

The call may have crossed the boundary, but no trustworthy evidence confirms success or absence.

Recovery: reconcile or escalate; do not guess.
01

Freeze automatic retries

Stop the affected run, its retry timer, and any competing worker lease. Capture the run ID, current attempt ID, workflow version, tool name, normalized input fingerprint, timestamps, and trace context. If the system has already scheduled another attempt, cancel or quarantine it before investigation.

  • Do not delete the failed attempt.
  • Do not mutate its recorded input or output.
  • Do not launch a fresh run under a different identity.
02

Restate the intended outcome

Write one sentence describing the user-visible result, independent of implementation. “The customer receives one appointment confirmation” is safer than “retry sendMessage.” The first statement lets the recovery process consider existing messages, alternate channels, or cancellation; the second presumes a specific action must repeat.

Confirm that the user has not changed or revoked the intent while the run was paused. A recovery after delayed approval, cancellation, or new context may need to stop rather than resume.

03

Build an evidence ledger

List every completed and attempted step in order. For each external effect, record its stable key, provider operation ID, request timestamp, response status, emitted events, observed postcondition, and current classification. Separate model-produced claims from system evidence.

The ledger should answer what is known without reading free-form logs. If two sources disagree, preserve both observations and mark the effect unknown until a stronger source resolves it.

04

Reconcile uncertain effects

Query the system that owns the effect. Search a payment provider by idempotency key, a messaging provider by message ID, a database by a unique intent column, or a deployment platform by commit and service. For browser actions, reopen the target and inspect the expected postcondition: the created item, changed status, confirmation page, or outbound event.

If the target offers no reliable lookup and the effect is costly or irreversible, route the run to a human. An honest unknown state is safer than an automatic duplicate.

05

Select the last safe checkpoint

A safe checkpoint is not merely the last serialized state. It is the newest boundary where all earlier effects are either confirmed complete or intentionally compensated, and all later work can be recomputed without violating the original intent.

  • Reuse stable outputs that remain valid.
  • Refresh observations whose freshness window expired.
  • Do not rerun completed irreversible actions.
  • Pin the workflow and prompt version or run an explicit migration.
06

Create a linked recovery attempt

Resume under a new attempt ID linked to the original run and failed attempt. Carry forward the evidence ledger, selected checkpoint, operator or policy that authorized recovery, and the reason each step will be reused, retried, skipped, or reviewed.

At every service boundary, reuse the original operation identity for the same intended effect. A new attempt identifier is useful for observability; a new side-effect key can accidentally turn the same intent into a second action.

07

Verify and close the loop

After resume, verify the user-visible outcome and every repaired postcondition. Emit a recovery receipt containing the original run, recovery attempt, failed tool, checkpoint, reconciled effects, final state, and links to traces. Notify the user only when the final state is accurate and actionable.

Finally, turn the incident into a reusable rule: add a missing idempotency key, improve a provider lookup, shorten a lease, capture a new event, or require approval for that ambiguous class. Recovery should make the next run safer.

Resume, compensate, or stop?

Resume

Continue when the original intent remains valid and earlier side effects are known.

  • The failed step is retryable.
  • Inputs remain fresh enough.
  • Completed effects can be reused.
  • The next boundary accepts the original identity.

Compensate

Reverse or neutralize earlier work before continuing when the plan is no longer internally consistent.

  • A reservation must be released.
  • A draft message must be withdrawn.
  • A staged resource must be deleted.
  • The compensation itself is tracked as a new effect.

Stop and review

Escalate when evidence cannot establish whether repeating the action is safe.

  • The effect is irreversible or costly.
  • The browser target has no stable postcondition.
  • The user’s intent may have changed.
  • Credentials, policy, or code versions changed materially.

Three applied patterns

The same procedure looks different at each tool boundary. The stable idea is to verify the effect before deciding whether to repeat it.

Text-message assistant

The agent writes a response, calls the messaging provider, then loses the connection. Preserve the original outbound message identity. Query the provider or delivery-event store before sending again. If delivered, mark the step complete; if authoritatively absent, retry with the same key.

intent: confirm-appointment-847
effect: outbound-message-01
state: unknown -> delivered
See the text-message assistant

Computer-use agent

The browser clicks “Publish” and the session closes before a confirmation appears. Reopen the target in a clean session and inspect the publication state, revision identifier, and timestamp. Do not click again solely because the screenshot is missing. Cache observations separately from actions.

intent: publish-revision-192
effect: browser-publish
state: unknown -> inspect
Explore computer-use caching

Website-building agent

Files are committed, a deploy is requested, and polling times out. Verify the repository commit and deployment service before triggering another release. Resume at health verification if the intended commit is already live; trigger a new deploy only when no matching deployment exists.

intent: release-site-311
effect: deploy-commit-a91c
state: unknown -> live
Review the website-building agent

Design the system for recovery

Stable intent and effect identities

Generate identities before crossing a boundary. Keep the same effect identity when repeating the same logical action, while giving each execution attempt a distinct attempt ID for traces and audit.

Immutable execution events

Append state transitions instead of overwriting the previous explanation. Operators should reconstruct why a step moved from pending to unknown, then to confirmed or reviewed.

Explicit freshness windows

Classify which outputs can be reused and for how long. A generated summary may remain valid while availability, price, authentication, and browser state need fresh observation.

Tool-specific reconciliation

Every side-effecting tool should expose a lookup or postcondition strategy. A generic retry policy cannot replace provider-specific evidence about messages, charges, bookings, and deployments.

Operator-grade controls

Provide freeze, inspect, skip, retry, compensate, resume, and terminate controls with reason capture. A dashboard that only shows “failed” leaves the hard decision hidden in ad hoc commands.

Pre-resume checklist

Do not unlock the run until each applicable statement is true or explicitly waived by an accountable operator.

Automatic retries and competing workers are stopped.
The original user intent is still valid and not revoked.
The run, failed attempt, workflow version, and trace are preserved.
Every attempted external effect has a classification.
Unknown effects were reconciled or routed to review.
The selected checkpoint follows all confirmed effects.
Reusable outputs remain within their freshness windows.
Completed irreversible steps are marked to skip.
Retried effects will reuse their original stable identities.
The new attempt links to the original run and failure.
Code or prompt version changes have an explicit migration decision.
Credentials and authorization are valid for the resumed work.
Kill controls and operator ownership are established.
Final postconditions and recovery receipt fields are defined.

Frequently asked questions

Should the agent simply rerun the failed tool call?

Only after the outcome is classified. A tool error may prove rejection, but a timeout or connection loss often leaves the effect unknown. First query the provider or inspect the postcondition. Retry only when the effect is confirmed absent or the boundary safely deduplicates the original operation identity.

What is the difference between a run ID and an idempotency key?

A run ID identifies the broader agent execution. An idempotency key identifies one logical side effect at a particular boundary. A single run can have many side-effect keys, and a recovery can have a new attempt ID while preserving both the original run ID and relevant effect keys.

Can the model decide which checkpoint is safe?

The model can summarize evidence and recommend a checkpoint, but the safety rule should be enforced by deterministic execution state and tool contracts. Earlier effects must be confirmed or compensated, later actions must be repeatable, and policy may require human approval for high-impact recovery.

When should cached tool output be discarded?

Discard or refresh it when its defined freshness window has expired, the underlying resource changed, authorization changed, or the recovery plan depends on current state. Keep immutable evidence of the original output even when the resumed run obtains a fresher observation.

How should a human approval survive a failure?

Store the approval as a durable event tied to the exact intent, scope, inputs, and expiry. A recovery can reuse it only if those conditions still match. Materially changed parameters require a new approval rather than silently stretching the old authorization.

What should the user be told?

Report the current state without inventing certainty. If recovery is complete, state the verified outcome. If an effect remains unknown, say that the system paused to prevent duplication and describe the next review step. Avoid sending duplicate failure notices for every internal retry.

Primary references

These specifications and official documentation sets anchor the concepts of idempotent operations, durable identity, uniqueness enforcement, and cross-service evidence.

Recovery is a product feature, not an incident trick.

Super applies personal-agent workflows to messaging, browser work, and website operations where a careful resume can prevent duplicate real-world actions.

Explore Super