diff --git a/codex-rs/core/src/agent/control.rs b/codex-rs/core/src/agent/control.rs index 3f132cb425..2aa3a93cc8 100644 --- a/codex-rs/core/src/agent/control.rs +++ b/codex-rs/core/src/agent/control.rs @@ -691,7 +691,7 @@ impl AgentControl { let state = self.upgrade()?; let result = if let Ok(thread) = state.get_thread(agent_id).await { thread.codex.session.ensure_rollout_materialized().await; - thread.codex.session.flush_rollout().await; + let _ = thread.codex.session.flush_rollout().await; if matches!(thread.agent_status().await, AgentStatus::Shutdown) { Ok(String::new()) } else { diff --git a/codex-rs/core/src/tools/handlers/agent_jobs_tests.rs b/codex-rs/core/src/tools/handlers/agent_jobs_tests.rs index f9fa0dab98..38f948c405 100644 --- a/codex-rs/core/src/tools/handlers/agent_jobs_tests.rs +++ b/codex-rs/core/src/tools/handlers/agent_jobs_tests.rs @@ -63,8 +63,28 @@ fn ensure_unique_headers_rejects_duplicates() { #[test] fn should_wait_when_agent_limit_blocks_refill() { - assert_eq!(should_wait_for_scheduler_change(false, false), true); - assert_eq!(should_wait_for_scheduler_change(true, false), false); - assert_eq!(should_wait_for_scheduler_change(false, true), true); - assert_eq!(should_wait_for_scheduler_change(true, true), true); + assert_eq!( + should_wait_for_scheduler_change( + /*progressed*/ false, /*agent_limit_reached*/ false, + ), + true + ); + assert_eq!( + should_wait_for_scheduler_change( + /*progressed*/ true, /*agent_limit_reached*/ false, + ), + false + ); + assert_eq!( + should_wait_for_scheduler_change( + /*progressed*/ false, /*agent_limit_reached*/ true, + ), + true + ); + assert_eq!( + should_wait_for_scheduler_change( + /*progressed*/ true, /*agent_limit_reached*/ true, + ), + true + ); }