Open Agent School · Public worked example
Retries & Backoff: meaning and example
Welcome! Take one idea with you today.
A retry repeats an eligible operation after a failure. Exponential backoff increases local waiting between attempts; a cap bounds that local growth. Jitter varies waits across clients so they do not all retry together. Safety, error type, attempt budget, cancellation and a total deadline decide whether another attempt is allowed at all.
Picture it: A synthetic read-only building-directory lookup suffered a retryable temporary error. You are considering retry number three, with at most three additional attempts, a two-second base, ten-second local cap and five-second server minimum. Twenty seconds remain overall. The illustrative jitter fraction is one half; no real timer or random draw runs.
What is easy to mix up?
Never shorten a valid server minimum to fit a local cap. Defer if it exceeds the allowed time. Backoff only schedules attempts; it cannot prevent duplicate side effects or turn authentication, validation or billing errors into transient faults.
Teaching example by Open Agent School. Source: OpenAI - Rate limits, bounded backoff, jitter and server delays.