Auto-retry on transient provider errors (overloaded, rate limit, 5xx)
- Add retry logic with exponential backoff (2s, 4s, 8s) in AgentSession - Disable Anthropic SDK built-in retries (maxRetries: 0) to allow app-level handling - TUI shows retry status with Escape to cancel - RPC mode: add set_auto_retry, abort_retry commands and auto_retry_start/end events - Configurable via settings.json: retry.enabled, retry.maxRetries, retry.baseDelayMs - Exclude context overflow errors from retry (handled by compaction) fixes #157
This commit is contained in:
@@ -524,13 +524,23 @@ See [Hooks Documentation](docs/hooks.md) for full API reference.
|
||||
"shellPath": "C:\\path\\to\\bash.exe",
|
||||
"queueMode": "one-at-a-time",
|
||||
"compaction": {
|
||||
"enabled": false,
|
||||
"enabled": true,
|
||||
"reserveTokens": 16384,
|
||||
"keepRecentTokens": 20000
|
||||
},
|
||||
"retry": {
|
||||
"enabled": true,
|
||||
"maxRetries": 3,
|
||||
"baseDelayMs": 2000
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Retry settings:**
|
||||
- `enabled`: Auto-retry on transient errors (overloaded, rate limit, 5xx). Default: `true`
|
||||
- `maxRetries`: Maximum retry attempts. Default: `3`
|
||||
- `baseDelayMs`: Base delay for exponential backoff (2s, 4s, 8s). Default: `2000`
|
||||
|
||||
---
|
||||
|
||||
## CLI Reference
|
||||
|
||||
Reference in New Issue
Block a user