An agent sends a write and the call times out. Nobody can tell whether the request landed, so the model guesses — and the guess costs money. A 2026 study graded 25,930 episodes of exactly that moment [1]. The winner was not the smartest model. It was the tool contract. When every write carried an idempotency key — a retry ticket the server knows, so a retry replays the first answer instead of doing the work again — duplicate effects fell from 28% to 4% [1]. Without keys, frontier models still copied the write 56% to 74% of the time [1]. If your agents place orders or post payments, that rate belongs to the contract you hand them, not to the prompt you wrote.

At a glance

Three 2026 measurement studies locate the exactly-once guarantee for AI agents. For systems architects deciding where to enforce it, the verdict is consistent: the tool contract carries the duplicate rate, and neither the model nor the harness moves it much.

The boundary is the guarantee

Exactly-once means the work happens once, even when a timeout hides whether it happened at all. Distributed systems solved this long before agents existed. The network delivers each message at least once, and the service holds a key that folds repeats into one effect [3]. Stripe’s request interface works the same way: the server saves the first answer under the key, and a retry returns that saved answer — even when the first try failed with a server error [4].

Agent stacks copied the tool calls but left the key behind. The model sees an error, so it does what a model does. It retries, or it quits. Limbo, a test rig with six toy services and twelve injected fault modes, split the blame three ways [1]. When the agent can read back the result right away, the model decides, and good models rarely double-write — the lost-acknowledgement duplicate rate sat at 0.5% [1]. When the request is still in flight, or the network delivered it twice, the same top models doubled the write in 56% and 74% of episodes respectively [1]. The contract, not the model, explains 81% of that spread [1].

A wrapper helps because it moves the choice out of the model’s hands. It checks whether the action already finished before it retries, and it attaches a key to every write [3]. On one task, the bare baseline doubled the write in 20%, 44% and 72% of episodes as faults got worse [3]. With the wrapper, the same ladder read 0%, 16% and 20% [3]. The model never changed. The boundary did.

I read the success column twice before I believed it. In the sandbox, agents marked their run a success in 90% of the episodes where they had copied an effect [1]. The self-report does not drop when the damage happens. A double charge looks like a clean finish in the transcript and on the dashboard.

By the numbers

  • 12 fault modes: the injections Limbo’s toy services ran, from late commits to redelivery. [1]
  • 81%: the share of the duplicate-rate spread explained by the tool contract. [1]
  • 25,930: the graded episodes behind the split, from lost replies to double delivery. [1]

Where this bites

The key alone is not enough. The tool description has to name it. RetryBench measured one model that reused a valid key in 10 of 40 decisions when the contract called it a “Candidate recovery key” [2]. The same key, labeled an “Alternative key string”, was reused in 39 of 40 [2]. Two sibling models hit the ceiling either way, so the floor sits in the contract text, not in the model family [2].

The people closest to this problem now keep the rule in their tool schemas. A key goes on every write the service offers, and the same key stays on retries of one action [1]. An irreversible action is never repeated until the first attempt is confirmed dead [1]. Stripe asks its own clients for a key shape: random values, like a UUID (universally unique identifier — a random string built so it never repeats), not values copied from the request itself [4]. The wrapper researchers put all three parts in code — result checks, verify-before-retry, and keys — and the wrapper, not the model, held the gains as faults grew [3].

What I am watching is the tool-description review. A contract can expose a key and never name it in the description, and that stack keeps the low reuse rate the phrasing study found — close to a quarter of decisions.

The catch

These numbers come from scripted fault injection, not from live incident data [1]. The wrapper study cut duplicates to 0%, 16% and 20%, which is not zero [3]. And the key is a retry guard, not a general ledger: a service can drop a key after its retention window, so a very late retry can still run twice [4]. My reading, held loosely, is that the guarantee lasts exactly as long as the window the service promises — which is why Retry Is the Bug: An Agent’s Costliest Failure Mode lands where it does.

Related reading

Sources