Learn

Retry Logic Explained

Retry logic decides when a failed request should be attempted again, how long to wait, and when to stop.

Good retry behavior

Good retry behavior retries network errors, timeouts, 429 responses, and 5xx responses. It avoids retrying most 4xx responses because the input usually needs to change.

Backoff and jitter reduce pressure on OpenAI and prevent many clients from retrying at exactly the same moment.

How ReqRun approaches it

ReqRun records each attempt, schedules retryable failures with exponential backoff and jitter, and keeps short safe error metadata for debugging.