Imagine an AI agent is asked to send a customer a confirmation message. It calls the messaging service, waits, and then times out. The agent has no confirmation, so it considers sending the message again.
That second message might be helpful—or it might be a duplicate. The timeout tells you that the agent did not receive a timely response. It does not, by itself, tell you whether the messaging service sent the first message.
The safest rule is simple: treat a timed-out action as having an unknown outcome until you check. Verify the result before retrying. If you cannot verify it and a duplicate could cause harm, pause and escalate.
Why doesn’t a timeout prove an action failed?
A tool call involves at least two things: an action in another service and a response back to the agent. Those do not necessarily arrive together. A service may complete the action, but its response may be delayed or lost. From the agent’s perspective, the call failed; in the destination system, the action may have succeeded.
That difference matters whenever a tool can change something outside the agent: send a message, create an order, update a customer record, or issue a refund. Retrying may perform the action a second time.
OpenAI’s guidance for recovering from a failed agent turn makes this point directly: a turn may already have called external tools, and a disconnected stream does not establish the turn’s final state. It advises checking for completed effects before asking the agent to repeat the work. OpenAI’s recovery guidance is about the broader agent turn, but the practical lesson applies to an individual tool call too: an error in the agent’s view is not proof of failure in the external service.
Separate “failed,” “completed,” and “unknown”
A useful recovery process distinguishes three outcomes:
- Failed: The destination system confirms that the action did not happen.
- Completed: The destination system or a reliable receipt confirms that it did.
- Unknown: There is not enough evidence to establish either result.
A timeout usually puts you in the third category, not the first. So does a missing confirmation in the agent’s conversation. The agent’s message history can show what it tried to do, but it cannot prove what another service did.
This distinction also helps avoid treating every retry the same way. Asking an AI model to produce another answer is different from asking a tool to create another order. A new model response does not necessarily repeat an external side effect; a repeated tool call may.
How can you check whether the action already happened?
Check the system that was supposed to receive the action, or a reliable receipt from that system. For the confirmation-message example, look for the message in the sending service’s activity or delivery records. For an order, check the order system. For a refund, check the payment or transaction record.
The check should identify the specific attempted operation, not just something broadly similar. Use whatever reference the workflow has available, such as an operation ID, order number, recipient, amount, or timestamp. A vague search can miss the original action—or mistake a different action for it.
A practical decision path looks like this:
| What you know | Safer next step | |---|---| | The destination confirms the action completed | Do not repeat it. Record the result and continue. | | The destination confirms the action did not happen | Retry only if the action and provider’s retry behavior make it safe. | | You cannot establish what happened | Leave the outcome marked unknown. For a consequential action, pause and send it for review. | | The tool offers a documented idempotency mechanism | Retry using the same mechanism for the same intended operation, within the provider’s rules. |
The table is a workflow guide, not a promise that every service provides a definitive status check. If a provider’s records are delayed, incomplete, or difficult to match to the attempted action, the outcome may remain unknown.
What does idempotency mean in plain English?
An operation is idempotent when repeating it has the same effect as doing it once. In practice, a service can support this by letting a workflow attach a unique key to an intended operation. If the workflow retries that same operation with the same key, the service can recognize it as a repeat rather than treating it as a brand-new request.
Stripe documents idempotency keys for supported requests, including their use when a connection error leaves the result uncertain. AWS also describes idempotency as a way to make retries safer when an operation can otherwise repeat side effects. These safeguards are useful, but they are not universal: availability, scope, and rules depend on the provider. Stripe’s documentation, for example, specifies conditions for its implementation. Use the provider’s current documentation rather than assuming a key works for every action.
The key point for a workflow designer is that a retry should represent the same intended action. Generating a fresh key for the retry may cause the service to treat it as a new operation. And a safeguard on one service call does not guarantee that an entire multi-step workflow—such as charging a customer, creating an order, and sending an email—will happen exactly once.
When is retrying relatively safe?
Retrying is relatively safe when you have evidence that the action did not occur, or when the operation is designed to tolerate repetition. A read-only lookup, for instance, does not change the destination system. A repeated update may also be safe if it sets a record to a specific value, such as changing a status to “confirmed,” rather than applying an additional effect each time. But the details matter: even an update can trigger notifications or other downstream actions.
By contrast, creating a new order, sending a message, or issuing a refund can have consequences if repeated. Do not assume that an action is safe to retry just because its description sounds simple. Check what the connected service does, whether it supports an idempotency mechanism, and what evidence it provides after a request.
What if the result stays unknown?
If you cannot confirm what happened, avoid asking the agent to “try again” without additional safeguards. Keep the operation marked unknown, stop automatic retries for that action, and route it to a person when a duplicate could affect a customer, money, or business records.
That does not mean every timeout needs a manual investigation. A workflow can make the response proportional to the risk: a read-only lookup might be retried, while an uncertain refund should usually wait for a reliable status check or human review. The important part is to make the next step explicit rather than letting the agent infer success or failure from a missing response.
For builders, a short preparation checklist can prevent an uncertain timeout from turning into a duplicate action:
- Identify which connected tools can change external systems.
- Find out how to check each action’s status or receipt.
- Confirm whether the provider supports idempotency, and understand its documented limits.
- Decide which uncertain actions can be retried automatically and which must pause.
- Test the recovery path for the case where an action may have started but its response never arrived.
A timeout is a signal to investigate, not an instruction to repeat. Check the destination first; retry only when the evidence and the service’s safeguards make repetition acceptably safe.



