Lightweight coding agent that runs in your terminal
Rust
chore: fix merge race (auto-compaction feature access) (#29393)
sayan-oai98845e484070
diff --git a/codex-rs/core/src/session/turn.rs b/codex-rs/core/src/session/turn.rsindex 2630ba1cc9..041da729ea 100644--- a/codex-rs/core/src/session/turn.rs+++ b/codex-rs/core/src/session/turn.rs@@ -334,7 +334,10 @@ pub(crate) async fn run_turn(}// as long as compaction works well in getting us way below the token limit, we shouldn't worry about being in an infinite loop.- if turn_context.features.enabled(Feature::AutoCompaction)+ if turn_context+ .config+ .features+ .enabled(Feature::AutoCompaction)&& token_limit_reached&& needs_follow_up{@@ -848,7 +851,11 @@ async fn run_pre_sampling_compact(turn_context: &Arc<TurnContext>,client_session: &mut ModelClientSession,) -> CodexResult<()> {- if !turn_context.features.enabled(Feature::AutoCompaction) {+ if !turn_context+ .config+ .features+ .enabled(Feature::AutoCompaction)+ {return Ok(());}