Problem Statement
Current retry behavior treats all failures as retriable. There is no ability to define specific exceptions or criteria for when to retry versus when to fail immediately. This leads to wasted retries on non-recoverable errors and delayed failure reporting.
Proposed Solution
Provide configurable retry strategies:
- Exception allowlist/denylist for retriable errors
- Custom retry predicates (e.g., should_retry(exception) -> bool)
- Per-tool or per-model retry configuration
- Configurable backoff strategies
Use Case
In production workloads:
- Retry on transient network errors (ConnectionError, Timeout)
- Do not retry on authentication failures (403, 401)
- Do not retry on validation errors (400)
- Custom retry logic for domain-specific exceptions
Alternatives Solutions
We implement retry logic in our hooks, but native support would be cleaner and more consistent.
Additional Context
No response
Problem Statement
Current retry behavior treats all failures as retriable. There is no ability to define specific exceptions or criteria for when to retry versus when to fail immediately. This leads to wasted retries on non-recoverable errors and delayed failure reporting.
Proposed Solution
Provide configurable retry strategies:
Use Case
In production workloads:
Alternatives Solutions
We implement retry logic in our hooks, but native support would be cleaner and more consistent.
Additional Context
No response