Retrying a voice-agent tool call is safe only when repeated execution cannot create an unintended second effect. Classify the failure and preserve the original operation identity before trying again.
Retry safety depends on the operation
A retry repeats an attempted request after an error or missing response. Reads, writes, and externally visible notifications have different risks. Even a lookup can be expensive, while a repeated booking or message can create direct customer confusion.
For a proposed retry policy, define which errors are transient, the maximum attempts, a total time budget, and the tool’s duplicate-protection mechanism. Use increasing delays with jitter where appropriate to avoid synchronised retries during an outage. These delays should fit the caller’s waiting experience rather than silently extending the call.
HTTP Semantics describes idempotent method semantics. A business API’s specific write contract still determines whether retrying its request is safe; the assistant should not infer that guarantee from a successful-looking endpoint name.
Exercise the dangerous fictional sequence
A service-request write succeeds, then the connection closes before the response arrives. The retry must carry the same operation reference. The backend should return the existing request or reconcile its status rather than create another request and notify staff twice.
Now compare a validation error caused by a missing service address. Retrying unchanged arguments cannot repair it. The assistant should ask for the missing address and create a new confirmed revision under the tool’s documented rules.
| Failure | Retry decision |
|---|---|
| Temporary read outage | Bounded retry may be appropriate |
| Missing required field | Clarify rather than repeat |
| Write outcome unknown | Reconcile or use supported idempotency |
| Permission denied | Do not retry with broader credentials |
| Sustained outage | Stop retrying and offer the fallback |
Assert side-effect counts as well as returned values. Two responses containing the same friendly text can conceal duplicate database records or repeated notifications.
Budget retries across the whole session
Nested retries can multiply. If the agent retries, the application retries, and the SDK retries, one spoken request may generate many downstream attempts. Identify which layer owns retry policy and expose attempt counts in the operation trace.
Conservative limits can leave some transient failures unresolved. Aggressive limits can increase latency and overload an unhealthy service. Choose the tradeoff from the business’s tolerance for delay and duplicate effects, then test both outage and recovery.
This is a proposed policy. The voice integration case study covers related work, and booking idempotency explains stable operation identity in more detail.
Tool retry FAQ
Should every server error be retried?
No. Follow the operation contract and distinguish transient failures from permanent or uncertain outcomes.
Should each attempt get a fresh business identifier?
No. A retry of the same operation should preserve the identity used for duplicate protection.
When should the assistant stop waiting?
At the defined attempt or time budget, then state the known outcome and offer an approved recovery path.