AI workflow retries should repeat an action only when the integration can safely absorb a duplicate, or when reliable evidence confirms that the original action did not happen. After an ambiguous timeout, check the destination before sending another request. Keep the intended action stable, limit retry attempts and give unresolved cases an owner.
This applies when AI workflows create support tickets, assign tasks, update application records or send notifications. The model may choose the right action while the surrounding integration still mishandles recovery. A useful design question is: what happens if the destination finishes the work, but its reply never arrives?
1. Separate a failed request from an unknown outcome
Consider a proposed workflow that reads an enquiry, prepares a summary and creates a support ticket. The ticket service accepts the request, creates the ticket and then loses its connection before returning confirmation. The workflow sees a timeout. Sending the same creation request again could produce a second ticket.
Microsoft describes this exact failure mechanism in its Retry pattern guidance: a service can process a request successfully but fail to return its response. Whether repeating the operation is safe depends on its idempotency, meaning that repetition has the same intended effect as one execution.
For an operational review, distinguish three outcomes: confirmed completion, confirmed rejection and outcome unknown. Treat the last as a separate recovery state. A red error indicator alone cannot tell an operator whether to resend.
Ask the integration owner what evidence establishes completion. A destination record identifier or authoritative operation status is useful. A model-generated sentence saying that the task succeeded is insufficient. The workflow should derive its completion message from the recorded tool result.
2. Choose retry, status check or intervention
Classify each tool action separately. Reading a record, creating a task and sending a message have different consequences when repeated. The following table is a proposed review guide, subject to the destination API's documented behavior.
| Situation | Preferred recovery path | Evidence to check |
|---|---|---|
| A read request encounters a temporary service failure | Retry within a bounded policy | The endpoint has no business side effect and the error is retryable |
| A creation request times out and supports idempotency keys | Repeat the unchanged request with the original key, within the documented support window | The destination explicitly supports duplicate suppression for that operation |
| A request returns an accepted operation reference | Check that operation's status | A status endpoint or equivalent authoritative lookup is available |
| A write times out without duplicate protection or reliable lookup | Hold for reconciliation | An operator must establish whether the action happened |
| A request fails validation | Correct the input before another attempt | The destination identifies the invalid field or unsupported value |
Google Cloud Workflows provides different default policies for idempotent and non-idempotent steps. Its retry documentation also separates the decision about which errors qualify from retry counts and backoff settings. These are useful controls, but selecting a policy does not make an unsafe destination operation idempotent.
Review connector defaults before adding workflow retries. An SDK may already repeat requests underneath the orchestration layer. Agree which layer owns recovery so the effective attempt count and waiting time remain understandable.
3. Preserve the intended action across attempts
Before dispatching a consequential action, assign it a stable operation identity. Keep the destination, relevant input and operation identity together in durable workflow state. A retry should refer to that same intended action.
For the ticket example, distinguish the enquiry's overall workflow identifier from the specific ticket-creation operation. One enquiry might legitimately require several actions. Conversely, restarting its workflow should not automatically authorize another ticket.
Microsoft's Idempotent Consumer pattern explains stable deduplication identifiers, atomic recording of local effects and protection against concurrent duplicates. A separate existence check is insufficient when two workers can both pass it before either writes. Database uniqueness constraints or atomic conditional operations address that race.
External API calls require additional care because they usually cannot share your local database transaction. An in-progress entry records intent, but does not prove whether the remote action completed. Preserve the destination's response and reconcile ambiguous attempts before repeating them.
Keep model reasoning outside this recovery decision. For a retry of an already approved action, reuse the recorded payload rather than asking the model to recreate it. If the recipient, content or target record changes, treat that as a revised action and review it accordingly. The related guide to human approval in AI workflows covers where that review belongs.
4. Make pending work visible and limit recovery
Long-running work needs an explicit pending state. Microsoft's Asynchronous Request-Reply pattern describes accepting a request and exposing a status resource that the caller can poll. It also describes returning an existing status resource when a duplicate idempotency key arrives, rather than queuing another work item.
Where an integration supports this pattern, save the operation reference and follow its documented polling instructions. Acceptance means the service received work for processing. Wait for its completion result before marking the business task complete.
Set a recovery deadline that fits the task. An interactive enquiry flow and an overnight document-processing job need different waiting policies. Document the maximum attempts, delay behavior and point at which automation stops. Microsoft warns that aggressive retries can worsen an overloaded service and that nested retry layers can add delays.
Give operators enough context to resolve a stopped task: intended action, last confirmed step, attempt history, destination reference and reason for uncertainty. Prefer references to protected records over copying full customer messages into every alert. The operator's available actions should be explicit, such as checking the destination, correcting rejected input or authorizing a fresh operation.
5. Avoid recovery mistakes that hide duplicate work
A manual rerun button deserves the same review as an automatic retry. Label its scope clearly. Resuming an unresolved action and starting a new business request should be separate choices, with the original operation visible to the operator.
Another mistake is restarting the entire workflow after a late failure. If ticket creation succeeded but an internal notification failed, recovery should target the notification. Preserve confirmed results so the operator can see which work remains.
Duplicate protection also has limits. Retention periods matter: Microsoft advises retaining deduplication records long enough to cover possible redelivery, including later operator resubmissions. Verify the destination's own retention behavior before relying on an old key. Do not assume that a local record extends a provider's protection window.
Finally, avoid presenting retry success as proof of correct business behavior. A workflow can finish with two tickets or a notification sent to an outdated recipient. Review the destination state as well as the orchestration status. Use the existing AI workflow evaluation guide to place these recovery cases alongside prompt and model checks.
6. Use this checklist before enabling automatic retries
Choose one workflow with a meaningful external write. Review it with the business owner and integration engineer using the following checklist:
- List every step that creates, sends, assigns or changes something outside the workflow.
- Record each destination's documented retry, idempotency and status-lookup capabilities.
- Define what constitutes the same intended action and preserve its identity across restarts.
- Save the dispatched payload and authoritative result so recovery does not depend on regenerated model output.
- Assign retry ownership, attempt limits, waiting rules and an escalation owner.
- Test a timeout after the destination commits, a duplicate delivery and two workers attempting the same operation.
- Test a restart after an external success but before local confirmation, plus an operator rerun after normal recovery has stopped.
- Inspect destination records for duplicates and confirm that unresolved outcomes remain visible.
Use a test environment or controlled records for these exercises. Define the expected result before each test, including what the operator should see when completion cannot be established.
The next step is a short recovery specification for that single workflow: an action inventory, the evidence required for completion, the applicable decision-table row and the owner of unresolved work. Approve automatic recovery only for the operations whose behavior the team has verified.
India
UAE
KSA
USA
UK
Canada
Oman
Kuwait
Australia
Thailand