Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions codex-rs/core/src/session/turn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand 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(());
}

Expand Down
Loading