Join our Newsletter — 33% off our NHI Course

Why do agent retries create duplicate calendar writes?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20842
Topic starter  

TL;DR: Retries in AI agents can turn a single failed write into duplicate state when the model retries without knowing whether the first call landed, according to Scalekit. Practitioners need idempotency, failure classification, and retry caps to keep tool calls from drifting into duplicates.

Editorial analysis by NHI Mgmt Group, based on content published by Scalekit: “Retries, Rate Limits and Idempotency for AI Agent Tool Calls”.

Key questions

Q: Why do 429 errors need a different retry policy?

A: 429 errors indicate rate limiting, so retries must slow down rather than repeat immediately.

Q: How does an idempotency key stop repeated tool calls?

A: An idempotency key lets the tool backend recognise a repeated call as the same operation, even if the agent timed out and retried.

Q: How do agents avoid duplicate writes after a timeout?

A: Agents avoid duplicate writes by sending the same idempotency key with any retried request, so the receiving system can recognise the operation as a repeat and return the original result instead of creating a second record.

Practitioner guidance

  • Define retry classes for every tool Separate authorization failures, rate limits, transient errors, partial writes, and permanent failures before any retry path runs, and make the default for writes no-retry until the outcome is known.
  • Assign intent-based idempotency keys Generate one stable key from the business intent, such as candidate plus slot for a booking, so the server can collapse duplicate writes into the original operation.
  • Enforce backoff and attempt caps Use exponential backoff with jitter for 429 responses, honour Retry-After when present, and stop after a small bounded number of attempts to avoid retry storms.

Bottom line: Agent retries become risky when the system cannot distinguish a failed write from a write that already succeeded.

Glossary terms: Idempotency Key, Safe To Repeat, Retry-After, Rate Limiting

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 7 months ago
Posts: 21330
 

Agent retries convert execution uncertainty into governance risk: once a model can reissue a side-effecting tool call, the control problem is no longer whether the API is available but whether the organisation can prove the first action completed or did not complete. That shifts retry handling from reliability engineering into identity-aware authorisation of action. The practitioner conclusion is simple: treat retry eligibility as a governed property of the tool, not a model preference.

A few things that frame the scale:

A question worth separating out:

Q: What should teams do first when a tool call times out?

A: Teams should first check whether the original tool call may already have succeeded before retrying it. The next step is to use a unique idempotency key, confirm the operation is safe to repeat, and avoid blind retries on state-changing actions that could create duplicate records or duplicate external effects.

👉 Read our full editorial: Agent retries can cause duplicate actions without idempotency



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.