From b0b5842e957ae2309f2b84302ba231ea0ee2d413 Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Tue, 10 Feb 2026 19:57:49 -0800 Subject: [PATCH] fix --- codex-rs/core/src/codex.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index 087d1c0812..f2b81fba33 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -4131,9 +4131,10 @@ async fn run_pre_sampling_compact( total_usage_tokens, &previous_turn_context, turn_context.as_ref(), - ) { - run_auto_compact(sess, &previous_turn_context).await?; - } + ) + { + run_auto_compact(sess, &previous_turn_context).await?; + } // Compact if the total usage tokens are greater than the auto compact limit if total_usage_tokens >= auto_compact_limit { run_auto_compact(sess, turn_context).await?;