A timeout can leave a write in an uncertain state

In an original order-processing example, a timeout after submission is different from a validation failure before submission. Query the existing order or use an idempotency key before trying the submission again.

Bound retries to avoid duplicate actions

Blind retries can duplicate writes or keep spending tokens on an unrecoverable problem. Set a retry limit, record the failure type, and escalate when the system cannot establish the state.

Separate the kinds of failure

A timeout means you do not know whether the action happened. Retrying a payment, a sent email, or a delete is how you double it.

Those calls need an idempotency key and a read-back, not a blind second post. A validation error means the arguments were wrong.

Retrying the same arguments will fail again. The model may repair the arguments only if the error says what was wrong and the repair is still inside the user’s request.

A permission error is not a puzzle to solve. The agent should stop and report it.

A prompt that says “try another account” will try another account. Do not describe that as resilience.

An upstream 429 is a signal to back off, not to open fifty parallel retries.

What the transcript should show

Log the tool name, the error class, and whether a retry was allowed. A final answer that says “done” after an error is a bug in the loop, not a phrasing issue.

The loop should be unable to claim success unless a tool result said success.

Put a counter on identical calls. Three calls with the same arguments and the same error is a stuck agent.

Stop it. Show the user the error you actually got, in their language, without the stack trace and without a invented explanation of the remote system’s motives.

What to record before you rely on it

Write a table of error classes and the allowed next step: stop, repair arguments, read back, or retry with a key. Test a timeout on a side-effecting tool and confirm it does not send a second write.

Alert on repeated identical calls. Keep the model id, the date, and the inputs you used beside that note, so a later change can be compared with the same test.

When the result is a failure, store the artifact and change the design. Do not relax the check until the model happens to pass.

Name a person who owns that failure. A note with no owner and no inputs cannot be repeated, and a pass with no date cannot be compared with the next model id.

Common questions

Should the agent always try a different tool when one fails?

No. A different tool can be a different side effect. Switch tools only when the user’s goal allows it and the first tool did not already act.

Is a natural-language apology a handled error?

No. Handling is the branch your code took. An apology in the final paragraph can sit on top of a retry storm.

Read the tool log.

Sources & further reading

  1. MCP tools specification — 2025-06-18 ↗
How this story was made

Written by Kristian Kostov with AI assistance and checked against the linked sources. Company performance claims are attributed to the company. Analysis reflects AiLookout’s interpretation; we have not independently tested the products discussed. Cover photography is illustrative and does not depict the specific announcement or product.

Our editorial standards
Back to all stories