Error Handling & Retry Mechanisms
Forge includes error handling capabilities, including limited automatic retry mechanisms with exponential backoff for specific types of errors. This documentation covers how to configure and optimize these features for improved system resilience.
Automatic Retry Mechanism
Forge currently implements automatic retries specifically for tool call parsing errors that occur during agent interactions. This ensures that temporary issues in parsing tool calls don't cause complete workflow failures.
How It Works
When a tool call parsing error occurs:
- Forge detects the parsing failure
- A retry is attempted after an initial delay
- Each subsequent retry uses an exponentially increasing delay with jitter
- After reaching the maximum retry count, the operation fails permanently
- Success at any point in the retry sequence continues normal execution
This targeted approach helps maintain conversational flow by gracefully handling errors in the agent's tool usage expressions.
Configuration Options
The retry mechanism can be configured in your forge.yaml
file:
retry:
max_attempts: 5 # Maximum number of attempts (including first try)
initial_delay_ms: 200 # Initial delay before first retry (milliseconds)
backoff_factor: 2 # Multiplier for delay between retries