Back to blog

Agent Tool Retries: Prevent Duplicate Business Actions

3 min read
Agent Tool Retries: Prevent Duplicate Business Actions

Sources checked: . This article contains FailSafe's analysis and proposed validation workflow; linked sources support the reported facts.

A timeout can leave an agent uncertain whether a tool completed its action. Retrying may create a second ticket, message, or account update even though the user requested only one. Consider an assistant submitting an internal service request through a connector. The important question is which system knows whether the operation already happened and how a retry relates to the original authorization. This assessment follows the action’s state rather than trusting the wording of the assistant’s final answer.

Define the boundary before testing

Define a harmless mock action with an authoritative operation record and a visible counter. Map request identifiers, approval references, connector retries, worker retries, and the downstream service’s duplicate policy. Agree what happens when the response is lost after a successful write. Include manual retry through the interface and automatic retry by the worker. Use synthetic data and a nonproduction endpoint. State which fields constitute the same business operation and which changed fields require a new approval or a new operation.

Run a bounded assessment

Run a normal request and verify one completed record. Then simulate the approved ambiguous-result condition where the mock tool commits but its response is unavailable. Observe retries and final reconciliation. Repeat an identical request, an expired request, and a materially changed request using the controlled harness. The goal is to confirm each follows the documented business rule. Avoid real payments, emails, or customer updates. A mock operation counter can establish duplicate effects and authorization reuse without creating external consequences.

Keep evidence an engineer can use

Capture the user’s intended action, request identifier, approval identifier, attempts, downstream operation record, and final user-visible state. Record whether the system distinguishes pending, completed, failed, and unknown outcomes. A repeated success message does not prove duplicate execution; compare authoritative records. Likewise, a single final chat reply does not prove only one action occurred. The remediation ticket should identify the responsible state transition and the service that must own deduplication, rather than asking the model to remember never to retry.

Interpret the result and retest

Retest the ambiguity case after remediation and confirm ordinary transient failures still recover appropriately. Check that duplicate handling does not collapse two genuinely distinct authorized requests. OWASP transaction-authorization guidance provides background for replay and action integrity. A passing mock-tool test does not establish identical behavior at every downstream provider, which may have different idempotency semantics. Define connector-specific evidence and keep irreversible operations under a stricter explicit policy when reliable duplicate suppression is unavailable.

Assessment scope and next steps

This is a proposed defensive assessment workflow, not a finding about a particular product. Use a staging environment, synthetic records, approved test identities, and an agreed stop condition. Record the model, connector, policy, and application versions so a later result can be compared with the same configuration. Unavailable evidence should remain an explicit coverage gap.

Primary reference: OWASP security guidance. The scenarios and acceptance criteria here are editorial recommendations for adapting that background to an authorized assessment.

For a scoped review of these boundaries, explore FailSafe AI security testing and agentic penetration testing. Agree the specific tools, identities, evidence, and exclusions before purchasing an assessment.

Questions & answers

Questions about this topic

Direct answers to common questions about this page.

No. Define whether it is recovery of the original operation or a new operation, and enforce that state in the execution service.

Use a mock endpoint with an authoritative operation record and counter, then simulate lost responses and bounded retries.

Ready to secure your project?

Get in touch with our security team to scope an audit.

Contact Us