Lightweight coding agent that runs in your terminal
Rust
[client] Tune retries and backoff (#1956)
Dylan548466df0928
diff --git a/codex-rs/core/src/model_provider_info.rs b/codex-rs/core/src/model_provider_info.rsindex a980211199..887917f470 100644--- a/codex-rs/core/src/model_provider_info.rs+++ b/codex-rs/core/src/model_provider_info.rs@@ -15,7 +15,7 @@ use std::time::Duration;use crate::error::EnvVarError;const DEFAULT_STREAM_IDLE_TIMEOUT_MS: u64 = 300_000;-const DEFAULT_STREAM_MAX_RETRIES: u64 = 10;+const DEFAULT_STREAM_MAX_RETRIES: u64 = 5;const DEFAULT_REQUEST_MAX_RETRIES: u64 = 4;/// Wire protocol that the provider speaks. Most third-party services onlydiff --git a/codex-rs/core/src/util.rs b/codex-rs/core/src/util.rsindex 5ba1e25666..fb5f45de6f 100644--- a/codex-rs/core/src/util.rs+++ b/codex-rs/core/src/util.rs@@ -7,7 +7,7 @@ use tokio::sync::Notify;use tracing::debug;const INITIAL_DELAY_MS: u64 = 200;-const BACKOFF_FACTOR: f64 = 1.3;+const BACKOFF_FACTOR: f64 = 2.0;/// Make a CancellationToken that is fulfilled when SIGINT occurs.pub fn notify_on_sigint() -> Arc<Notify> {