Principle

Decide whether to retry, repair or check the outcome

A failed response is not always a failed operation. Before another attempt, decide what failed, whether repeating the action is safe, and what makes another attempt reasonable.

About 2 min read

Before you use it

Use when
  • A tool call or action fails and the default response is to immediately repeat it.

Keep this limit in mind

  • Some failures are probabilistic even with unchanged visible state; use bounded retries informed by service behavior.

Current editorial reading

Choose the next action from the failure

Read the service error and inspect the result when possible. Correct invalid inputs before trying again. A transient network or service fault may justify a bounded retry even when no visible state has changed. Follow the service retry policy; do not treat a permanent access denial as a reason to search for a bypass. Record the error, the retry reason and the remaining attempt budget.

Resolve uncertain writes before repeating them

If a write timed out, first check whether it took effect. Use the service’s documented duplicate-prevention mechanism when available: an idempotent retry repeats the same logical request without adding another effect. For example, check for the existing export job before submitting another. If the outcome remains uncertain and safe repetition is unavailable, stop and seek a decision. Retry timing and backoff are a separate concern from this choice.

Take it with you

Choose one explicit branch: retry a recoverable operation, repair the request, verify an uncertain outcome, or stop. Changed conditions alone do not make a repeat safe.

Sources and evidence (2)

What we checked

Supports

Tool errors can provide specific input corrections instead of leaving an agent to repeat an opaque failure.

Selected full-text passages read from vendor engineering guidance published 2025-09-11. This supports actionable error handling, not a universal rule that retries require visible state change.

Writing effective tools for agents — with agents · Optimizing for token efficiency, error-response discussion

Limits

Transient failures can recover on retry, but a missing response leaves uncertainty about whether a state-changing request already succeeded.

Selected full-text passages read on the official AWS article. Publication date not established. The limit directly changes the retry decision after a timeout.

Making retries safe with idempotent APIs · Introduction; Retrying and the potential for undesirable side effects

Supports

A documented idempotent API contract can identify repeated logical requests and prevent additional side effects.

Read the client-request-identifier discussion. Identical parameters alone do not always express identical intent; the service contract determines safe reuse.

Making retries safe with idempotent APIs · Reducing client complexity with idempotent API design

Editorial sources (2)

Editorial version 1.0.0 · Evidence checked 2026-10-04

Save and practise this idea

My learning

Read. Recall. Repeat.

Save this idea and return to it on any device.

Use email
Keep exploring

Connected ideas

You are readingDecide whether to retry, repair or check the outcome

Original edition evidence and sources

These records belong to the original released edition. The current editorial reading has its own evidence above; neither set silently replaces the other.

Supports

Long-running agent guidance emphasizes bounded loops and actionable tool errors that steer agents toward corrected inputs rather than opaque repetition.

Some failures are probabilistic even with unchanged visible state; use bounded retries informed by service behavior.

Writing effective tools for AI agents—using AI agents · See source record

All sources (1)
Original edition, downloads and provenance

The reading above is editorial version 1.0.0, bound to this exact source edition. The original data and saved downloads retain that edition and the separate editorial layer. They may contain earlier wording; use the current reading above when interpreting it.

Version 0.1.0

No review details are supplied for this edition.

Read the original edition and overlay as JSON · Release details