Skip to content
PERMISSION/PROTOCOL

Execution guide

Approval Timeouts, Retries, and Changed AI Agent Actions

Permission Protocol6 min readSources checked

The takeaway

Decide when an expired or changed agent action needs fresh approval, when to retry with the same operation ID, and how to reconcile an uncertain result.

In this article

A timeout tells you where to look

An agent proposes a $125 refund. A human approves it, the worker sends it, and the connection drops before a response arrives. The refund could already exist. Retrying with a new operation ID could pay a second refund. Look up the original operation before deciding whether to send anything again.

A reviewer timeout happens before the worker can send the action. While the request is waiting for an answer, it stays pending. Once the review deadline passes, record it as expired. If the action is still needed, issue a fresh request under current policy. Keep expiry and rejection as separate decisions in the record.

Use separate deadlines for the review, permission to start execution, and the worker's wait for a response. A worker lease can expire while an external action is still running. Lease expiry can hand off reconciliation without granting permission to execute again.

Choose the next action from the recorded state

On a narrow screen, scroll the table to see the evidence to retain.

What happenedWhat to doWhat to retain
Nobody answers by the review deadline.Mark the request expired. Start a fresh review if the action is still needed.Original request, deadline and expiry event.
Approval arrives after the review deadline.Reject the late decision and keep the request expired.Arrival time and reason the decision could not apply.
An approved action passes its execution deadline before dispatch.Stop dispatch. Re-evaluate policy and request fresh approval if needed.Original approval and dispatch denial.
The amount, recipient, target, environment or artifact changes.Bind fresh approval to the new version. Reconcile any prior attempt that may have executed first.Both versions, changed fields and the prior outcome.
A queue redelivers the action or two workers pick it up.Claim the operation durably. Return the known result or point the duplicate to the in-flight record.Operation ID, claim, duplicate event and any known result.
A worker dies or its provider request times out after a send may have started.Mark the result unknown. Check the original operation and escalate if you cannot establish a safe retry.Provider key or reference, exact parameters, timestamps and reconciliation result.
The provider confirms success.Record the outcome and resume the workflow from that result.Provider reference, completion time and original decision reference.

Before automatically repeating a non-idempotent operation, establish that the retry has the same intended effect or that the original request was never applied. A connection error can leave the receiver's outcome unknown. HTTP Semantics, idempotent methods

Bind the approval to the parameters that will execute

For the sample refund, the reviewer sees the tenant, order, destination, currency and amount. The server stores the approved parameters under an action version. If an agent changes the amount from $125 to $250, show the difference and request a new decision. Keep the original approval attached to the $125 action.

An approval record needs the action version or canonical digest, authenticated reviewer, decision, decision time, policy version and execution deadline. Generate the action representation on the server from validated fields, including units and environment. Render the review from that stored version and check that the proposed dispatch matches it. A browser-supplied ID is only a lookup key.

This example illustrates a single execution claim. Use one atomic conditional update or transaction over a durable operation record with a unique operation ID. Evaluate trusted time at the claim. If the action can wait after the claim, recheck the deadline and policy at the final dispatch boundary.

Load the approved action version and its operation record.
Check current policy, reviewer authority, exact parameters and deadline.
Atomically claim the ready operation while those conditions hold.
If the claim loses, return the existing operation state.
If it wins, enforce the deadline at dispatch and send the stored parameters
with the saved provider key.
Record the result or mark it unknown for reconciliation.

Persist the provider key before dispatch. The claim and the provider call happen in different systems. A worker can stop between them or after the provider applies the operation. Leave the claim durable so a recovery worker can inspect the operation and check what the provider recorded.

Retry with the same operation ID and parameters

Keep a stable operation ID for the approved effect and a separate attempt ID for each network call. If the provider's documented rules allow a retry, reuse the original provider key with identical parameters. Confirm that the key is still within the provider's supported window and that current approval and policy permit another attempt.

After authorization expires, keep reconciling by read-only lookup. Get fresh authorization before a send that could initiate an effect. If you cannot find out whether the earlier attempt succeeded, route the uncertainty to a person before taking another action.

Stripe API v1, for example, compares parameters on repeated requests with the same idempotency key. It can prune keys once they are at least 24 hours old. Reusing a pruned key can create a new request. Check the retention and replay rules for the provider you use. The refund in this guide is synthetic. Stripe idempotent requests

Keep the approval record and the execution outcome

A LangGraph node starts again from its beginning on resume. Put consequential writes after the approval check and plan for retries at the tool boundary. In the OpenAI Agents JavaScript SDK, restore pending run state from application-controlled storage and authorize the reviewer against the stored run and action. Keep the newest completed state separate from any old snapshot retained for troubleshooting. LangGraph interrupts | OpenAI Agents SDK human-in-the-loop

In our local lab, both example applications denied the changed refund and a dispatch at the exact expiry boundary. A second dispatch could not reuse a consumed approval. A fresh process restored the persisted state, and one of two competing processes won the claim. The mock effect was a SQLite row. Network timeouts, provider lookup and crash recovery around an external commit still need production tests. LangGraph runnable example | OpenAI Agents SDK runnable example

For each attempt, keep the operation ID, decision reference, timestamps, provider reference, and what the provider confirmed. Link any later reconciliation to that same operation. The approval record identifies who authorized which action. The execution record tells the operator whether it ran. Preserve an unknown outcome until there is evidence to resolve it. Approval evidence checklist

Test your recovery path before going live

  1. Change a consequential field after approving a synthetic action and verify the changed action stays blocked.
  2. Dispatch at the deadline and one tick before it. Record the result and which clock governs the cutoff.
  3. Redeliver a queued operation and check that a second worker cannot claim a new execution.
  4. Simulate a provider accepting the send while the worker times out. Test successful lookup, unavailable lookup and an expired provider key.
  5. Stop a worker after it claims the operation and before it sends. Restart with the same record and verify it resolves or escalates uncertainty before dispatch.

Pick one consequential action and write down its expiry, retry policy and reconciliation owner. Use the human approval guide to decide where you will enforce approval.

Put it into practice

Map your approval and recovery rules

Use the checklist to define which action is covered, when approval expires, and who investigates an uncertain result.

Keep reading