Skip to main content
ExecutionConfig retry settings re-run retryable tool failures and guardrail validation errors with exponential backoff and jitter. For tools, max_retry_limit / retry_* are translated into the effective RetryPolicy — the single tool-retry budget shared with ToolConfig(retry_policy=...).
The user requests a report; transient tool failures retry with exponential backoff and jitter until success or the limit is reached.

Quick Start

1

Enable with defaults

Retries with backoff are automatic when you set max_retry_limit:
2

Fine-tune backoff

Use ExecutionConfig for delay, factor, and jitter:

How It Works

Total attempts = 1 + max_retry_limit. Default max_retry_limit=2 → up to 3 attempts. Delay: min(initial_delay × factor^(attempt−1), 60s) + random(0, jitter × base). The translation maps max_retry_limitmax_attempts (= limit + 1), retry_initial_delay (seconds) → initial_delay_ms, retry_backoff_factorbackoff_factor, and retry_jitter (fraction) → jitter=True + jitter_factor. The translated policy sets max_delay_ms = max(60000, initial_delay_ms), so ExecutionConfig users keep the historical 60-second delay cap (a plain RetryPolicy defaults to a 30-second cap).

Choosing Your Settings


Configuration

These fields are one spelling of the tool-retry budget. An explicit ToolConfig(retry_policy=...) (or per-tool @tool(retry_policy=...)) wins over the ExecutionConfig alias. See Tool Retry Policy.

What Gets Retried


Common Patterns

Disable retries:
Rate-limited APIs:
Low-latency tools:

Best Practices

Jitter spreads retry timing across agents and reduces thundering-herd spikes on shared APIs.
ValueError, TypeError, and AttributeError are treated as code bugs and are not retried.
Very large backoff factors cannot exceed a 60-second base delay per attempt.
Guardrail validation retries use the same ExecutionConfig backoff values. This is independent of tool retry — the fields still feed guardrail-retry backoff even when a ToolConfig(retry_policy=...) overrides the tool budget.
For tools, ExecutionConfig.retry_* is an alias translated into the effective RetryPolicy — the same budget as ToolConfig(retry_policy=...). Setting an explicit retry_policy overrides the ExecutionConfig spelling.

ExecutionConfig

Full execution configuration reference

Guardrails

Input and output validation

Loop Guardrails

Cap tool calls per turn

Structured LLM Errors

LLM-level retry and error handling