whitepaper

The request timed out. Did the AI workflow act?

I design an execution harness that separates a good answer from permission, a completed process from acceptance, and a missing response from a safe retry, so a lost response does not trigger a blind duplicate action.

The failure is a missing answer about an action

Sample scenario: a procurement-support workflow. An assistant reads an approved scope, prepares a supplier request and asks the system to submit it. The destination accepts the request, but the connection breaks before the receipt reaches the caller. A retry might create a duplicate commitment. Declaring failure might hide an action that already happened. Neither inference is justified by a timeout alone.

The useful architecture is not a larger prompt. It is a bounded execution harness around the model: explicit work, versioned inputs, current authority, durable attempt evidence and a receiving decision. This builds on the workflow design work I have done in multi-model orchestration. The scenario here is a worked example, and the checks below are the tests I set up for your own workflow.

Give planning and execution different powers

An assistant can suggest an action without being allowed to perform it. Define the task’s objective, input versions, allowed tools, audience, resource limits and acceptance evidence before execution. The final host boundary evaluates the exact action against current permissions. A reviewer’s approval of version A must not authorize version B, a different destination or an expanded amount.

Bind review to a content digest and meaningful context, not merely a task label. An independent reviewer should inspect the submitted revision and relevant assumptions, while a deterministic guard checks the fields it can actually verify. Neither a model’s claim that it reviewed itself nor a convincing explanation creates a new grant. Where a decision depends on missing facts, preserve the gap and ask the responsible owner rather than silently widening the task.

Record intent before the consequential send

Persist an attempt identity before calling the destination. The record should name the work revision, destination, payload digest, applicable authorization and intended operation. Avoid storing secrets or unnecessary payload content in a diagnostic log. A worker can then restart and discover the outstanding attempt instead of constructing a second identity that looks like fresh work.

A local transaction cannot make a remote API call atomic. If the destination offers idempotency, use its documented key scope, parameter rules and retention window. Stripe’s API documentation shows why these details matter: a provider’s replay behavior is a defined contract, not a universal promise across APIs or versions. If that support is absent, a durable local record still improves investigation, but it does not magically provide exactly-once external execution.

Follow one attempt without inventing a second

A durable action path and its recovery branch

  1. Bound work — Objective, exact revision and required receiving evidence.

    A label alone cannot identify what was reviewed.

    Alternative: For a read-only task, a simpler recorded checklist may suffice.

  2. Current permission — Check actor, destination, operation and revision.

    Earlier planning approval is not runtime authority.

    Alternative: Keep consequential execution human-operated until this boundary is reliable.

  3. Durable intent — Persist the attempt before sending.

    A restart must find the same outstanding operation.

    Alternative: An outbox can organize sends, but does not make the remote effect atomic.

  4. Destination action — Send once under the destination’s actual contract.

    Provider behavior determines the scope of replay safety.

    Alternative: Use supported idempotency where available; never invent it.

  5. Result or UNKNOWN — Preserve returned state or unresolved outcome.

    A lost response does not prove a failed action.

    Alternative: Escalate to an operator when reliable readback is absent.

  6. Reconcile + receive — Resolve actual state; assess the result against the objective.

    Execution completion and useful acceptance answer different questions.

    Alternative: Use independent human receiving for a low-volume consequential workflow.

How I build it: the state model for one attempt. Diagnostic traces accompany the path; they do not replace its durable records.

UNKNOWN goes to reconciliation, not directly back to send. Accepted learning informs a new work revision.

Make UNKNOWN an actionable state

After a lost response, hold automatic retransmission of the same consequential operation. Query the authoritative destination using the attempt or provider reference when the API supports it. Reconcile any returned object with the expected destination and payload. A later receipt can resolve uncertainty; an empty search from an eventually consistent endpoint may not prove that the action never happened.

If reconciliation is unavailable, keep the attempt unresolved and give an operator a bounded task: check the destination, record the basis for a decision and choose whether further action is appropriate. There is a cost to this restraint: a legitimate request may wait. The alternative can be an irreversible duplicate. Make the tradeoff explicit by action class; reading an immutable document and making a financial commitment do not require the same retry policy.

Suppose a destination search returns nothing and an operator is tempted to resend, just before the delayed original becomes visible. An empty result is not a release from UNKNOWN. If a named owner nevertheless authorizes a resend for this class of action, record a new attempt linked to the unresolved original and a pre-agreed compensation path for a late duplicate. Reuse the original idempotency key only where the provider’s documented scope, retention window and matching-payload rules support it. Outside that contract, retain the hold or explicitly accept the duplicate risk under the applicable policy; never label the new send a harmless retry.

Use two kinds of evidence for two different questions

A trace helps explain the path through services, latency and errors. An authoritative attempt record explains the state of a consequential operation. They should share a correlation reference, but their retention, access and delivery guarantees may differ. OpenTelemetry’s sampling documentation is relevant because a diagnostic trace can be intentionally omitted; its absence cannot settle whether an external action occurred.

Keep requested, permitted, started, responded, reconciled and accepted distinct. A process exit can establish that a worker stopped. It cannot establish that the result met the buyer’s need. A receiving step checks the deliverable and names unresolved limitations. This distinction also makes management reporting useful: count accepted outcomes, elapsed uncertainty and unresolved recovery work alongside throughput, rather than celebrating a wall of completed subprocesses.

Test decisions with adversarial but bounded scenarios

I build the harness around invariants. A changed payload invalidates its old review. A revoked permission stops a not-yet-started effect. Two workers observing one work item cannot both create a new consequential attempt. A timeout after destination acceptance does not trigger a blind retry. A restart preserves the prior attempt identity. A late result is associated with that attempt rather than a replacement task. Each invariant becomes a test case that your implementation must pass.

Use an isolated recording destination to control before-send failure, after-acceptance disconnect, delayed readback, inconsistent identity and repeated callback. Label those results simulated. A live destination proves something different: its actual contract, identity and delivery behavior under the authorized test. Do not substitute simulated transport for live acceptance, or use a live customer effect merely to test an error branch that could be exercised safely offline.

Evaluate the model and the operating system together

Version the evaluation cohort, prompts, model identifier, tool schemas, policy and configuration. Include correct proposals, unsupported requests, malicious instructions embedded in documents, changed permissions and useful refusals. A model-based judge can help classify outputs, but calibrate it against human examples and retain an independent view of consequential failures. Deterministic guards should enforce what does not require interpretation.

A bounded canary needs a baseline, a population, a duration, a decision owner and a stop rule. Netflix’s Kayenta article is a useful example of making metric comparison and diagnostic drill-down explicit. Its historical architecture is not a recommendation to copy its scale or scoring scheme. A low-volume workflow may need case-by-case receiving because its rare dangerous outcomes cannot be measured adequately by a short aggregate experiment.

OWASP’s GenAI Security Project distinguishes prompt injection from excessive agency. That vocabulary helps select tests, but the harness still needs concrete cases for its actual documents, tools and authority boundary.

Recovery is a workflow, not a retry button

When a release misbehaves, separate stopping new work, reconciling in-flight effects, restoring a permitted compatible version and repairing downstream consequences. A rollback cannot reverse a message already delivered. A compensation may itself be a new consequential operation requiring authority. Maintain the original failure and recovery lineage so a corrected result does not erase what happened.

For a buyer, this approach turns an AI pilot into an operating conversation: which effects can be automated, which uncertainty must be escalated, and what evidence makes a handoff acceptable? I can help map one such workflow, compare a simple human-assisted path with a durable orchestration design, and sequence implementation with engineering, security and business owners. For technical leaders, the differentiator is not the number of agents. It is whether the system remains understandable when an agent, network or dependency fails.

Sources

Open the interactive reader