Overview
Shannon uses Temporal workflows to orchestrate retries with exponential backoff. When an agent encounters a rate limit or transient error, Shannon automatically:- Waits for an initial interval
- Retries the operation
- Doubles the wait time after each failure (exponential backoff)
- Continues until success or maximum attempts reached
Retry Presets
Shannon provides two retry presets optimized for different use cases:Default Preset
The default preset is suitable for most users:- Initial interval: 1 minute
- Maximum interval: 30 minutes
- Backoff coefficient: 2× (exponential)
- Maximum attempts: 10
- Total timeout: 3 hours per agent
- Wait 1 minute → retry
- Wait 2 minutes → retry
- Wait 4 minutes → retry
- Wait 8 minutes → retry
- Wait 16 minutes → retry
- Wait 30 minutes (capped) → retry 7-10. Wait 30 minutes → retry
- You have a pay-as-you-go Anthropic API plan
- Your rate limits reset within 30 minutes
- You want faster failure detection
Subscription Preset
The subscription preset is designed for Anthropic subscription plans with rolling 5-hour rate limit windows:- Initial interval: 5 minutes
- Maximum interval: 6 hours
- Backoff coefficient: 2× (exponential)
- Maximum attempts: 100
- Total timeout: 8 hours per agent
- Wait 5 minutes → retry
- Wait 10 minutes → retry
- Wait 20 minutes → retry
- Wait 40 minutes → retry
- Wait 80 minutes (1h 20m) → retry
- Wait 160 minutes (2h 40m) → retry
- Wait 320 minutes (5h 20m) → retry
- Wait 6 hours (capped) → retry 9-100. Wait 6 hours → retry
- You have an Anthropic subscription plan (Pro, Team, or Enterprise)
- Your rate limits reset on a rolling 5-hour window
- You want Shannon to wait through rate limit windows automatically
- You’re willing to accept longer wall-clock time for higher success rates
Configuring Retry Strategy
Add thepipeline section to your configuration file:
Rate Limit Handling
Shannon handles rate limits intelligently:Anthropic Rate Limits
Pay-as-you-go plans:- Rate limits are per-minute or per-hour
- Reset relatively quickly
- Default preset is sufficient
- Rate limits use rolling 5-hour windows
- Limits don’t fully reset until 5+ hours after first request
- Subscription preset is required
Error Types
Shannon distinguishes between: Retryable errors:- HTTP 429 (Too Many Requests)
- HTTP 503 (Service Unavailable)
- Network timeouts
- Transient API errors
- HTTP 401 (Unauthorized) - Invalid API key
- HTTP 403 (Forbidden) - Insufficient permissions
- Configuration errors
- Schema validation failures
- Security violations
Testing Mode
For development and testing, you can use testing mode which has very aggressive retry settings:- Initial interval: 10 seconds
- Maximum interval: 10 seconds (no backoff)
- Maximum attempts: 3
- Total timeout: 10 minutes per agent
Combining with Concurrency Control
You can combine retry strategies with concurrency control to reduce rate limit pressure:- Extends retry windows for subscription plans
- Reduces concurrent API usage to prevent hitting rate limits
- Increases wall-clock time but improves success rate
Monitoring Retries
You can monitor retry behavior through:Worker Logs
Temporal Web UI
- Retry attempts per activity
- Wait times between retries
- Current backoff interval
- Time until next retry
Workflow Progress
- Current agent status
- Elapsed time
- Number of retries
Examples
Example 1: Default Configuration
Example 2: Subscription Plan
Example 3: Subscription with Concurrency Control
Troubleshooting
Workflow Fails with “Maximum attempts exceeded”
Problem: Using default preset with a subscription plan Solution: Switch to subscription preset:Rate limits still occurring frequently
Problem: Too many concurrent pipelines Solution: Reduce concurrency:Retries taking too long
Problem: Subscription preset used with pay-as-you-go plan Solution: Switch to default preset or omit pipeline section entirelyNext Steps
Pipeline Settings
Configure concurrency and testing mode
YAML Config Reference
Complete configuration options reference
