diff --git a/codex-rs/core/src/client.rs b/codex-rs/core/src/client.rs index 7c472fed78..3e345c3c5e 100644 --- a/codex-rs/core/src/client.rs +++ b/codex-rs/core/src/client.rs @@ -261,8 +261,7 @@ async fn process_sse( stream: S, tx_event: mpsc::Sender>, idle_timeout: Duration, -) -where +) where S: Stream> + Unpin, { let mut stream = stream.eventsource(); diff --git a/codex-rs/core/tests/live_agent.rs b/codex-rs/core/tests/live_agent.rs index 9f2f2a672f..7f5d9f7411 100644 --- a/codex-rs/core/tests/live_agent.rs +++ b/codex-rs/core/tests/live_agent.rs @@ -45,18 +45,6 @@ async fn spawn_codex() -> Result { "OPENAI_API_KEY must be set for live tests" ); - // Environment tweaks to keep the tests snappy and inexpensive while still - // exercising retry/robustness logic. - // - // NOTE: Starting with the 2024 edition `std::env::set_var` is `unsafe` - // because changing the process environment races with any other threads - // that might be performing environment look-ups at the same time. - // Restrict the unsafety to this tiny block that happens at the very - // beginning of the test, before we spawn any background tasks that could - // observe the environment. - // Configure retry behaviour explicitly to avoid mutating process-wide - // environment variables. - let codex_home = TempDir::new().unwrap(); let mut config = load_default_config_for_test(&codex_home); config.openai_request_max_retries = 2;