Why it matters

Retries shape agent reliability. Poor retries lead to loops or missed failures.

Advertisement

The architecture

Classify: retriable (timeout, 5xx) vs terminal (4xx, validation).

Exponential backoff.

Tool retry flowClassify errorretriable or notBackoffexponential + jitterRetry or failcap attemptsFeed error back to LLM after retries exhausted; LLM may recover
Retry patterns.
Advertisement

How it works end to end

Retriable: timeouts, 5xx, rate limit.

Terminal: 400, 401, 403, validation.

Backoff: exp + jitter.

Cap 3-5 retries.