// Planning for automation failures
What should happen when an automation fails?
Design retries, approvals and manual recovery before the first workflow becomes part of everyday operations.
agentoriq · Practical guide · 3 min read
Define failure in business terms
A workflow can finish technically while leaving the work incomplete. A contact may be created without the task that tells someone to follow up. Define the intended business outcome and identify the steps required to reach it. Record progress at those steps so the owner can tell what happened, what remains and whether any action already reached an external system.
Retry temporary problems, not every problem
A brief service interruption may justify another attempt after a delay. A missing email address needs corrected data, and a rejected permission needs an access review. Give automatic retries a limit and a clear stopping point. Repeating the same invalid request indefinitely creates noise rather than progress. The final unresolved state should be visible to a person who can decide how to proceed.
Prevent a second attempt from creating a second result
If a request times out, the destination may still have completed it. Before repeating an action, the workflow needs a stable reference for the original item and a way to check what already exists. Developers call this idempotency. For the business, it means one enquiry should not create two deals and one approved instruction should not produce two external messages. Design recovery around the unfinished step.
Place approval before the consequential action
Use human review where an incorrect action would be difficult to undo. Show the reviewer the proposed action, supporting information and any uncertainty. Record approval for that specific version. If important inputs change afterwards, request a new review rather than treating an old approval as permission for a different action. A pending approval should remain clearly separate from a failed run.
Example: a document reaches only part of the workflow
Imagine an invoice-processing workflow extracts fields, receives approval and then loses connection while exporting the record. The owner should see that extraction and review succeeded, but export status is uncertain. Check the destination using the invoice reference before resending. If the record exists, reconcile its status. If it does not, retry the export. There is no reason to restart the extraction or silently create another entry.
Make alerts and manual recovery actionable
An alert should name the affected item, completed step, problem and available next action without exposing unnecessary sensitive data. Assign an owner and an escalation route for unattended issues. Provide instructions for finishing the task manually and recording that it was resolved, so automation does not repeat it later. Test a service outage, duplicate input and interrupted run before rollout, then review recurring failures for a permanent fix.