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:
@@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- **Anthropic SDK retries disabled**: Set `maxRetries: 0` on Anthropic client to allow application-level retry handling. The SDK's built-in retries were interfering with coding-agent's retry logic. ([#157](https://github.com/badlogic/pi-mono/issues/157))
|
||||
|
||||
## [0.18.1] - 2025-12-10
|
||||
|
||||
### Added
|
||||
|
||||
@@ -295,6 +295,7 @@ function createClient(
|
||||
baseURL: model.baseUrl,
|
||||
defaultHeaders,
|
||||
dangerouslyAllowBrowser: true,
|
||||
maxRetries: 0, // Disable SDK retries, handled by coding-agent
|
||||
});
|
||||
|
||||
return { client, isOAuthToken: true };
|
||||
@@ -311,6 +312,7 @@ function createClient(
|
||||
baseURL: model.baseUrl,
|
||||
dangerouslyAllowBrowser: true,
|
||||
defaultHeaders,
|
||||
maxRetries: 0, // Disable SDK retries, handled by coding-agent
|
||||
});
|
||||
|
||||
return { client, isOAuthToken: false };
|
||||
|
||||
Reference in New Issue
Block a user