diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index 6ab4b87311..9b1e4afb41 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -2404,13 +2404,6 @@ impl Session { history.raw_items().to_vec() } - pub(crate) async fn process_compacted_history( - &self, - compacted_history: Vec, - ) -> Vec { - compact::process_compacted_history(compacted_history) - } - /// Append ResponseItems to the in-memory conversation history only. pub(crate) async fn record_into_history( &self, diff --git a/codex-rs/core/src/compact_remote.rs b/codex-rs/core/src/compact_remote.rs index c0a289288a..589ebf7cbb 100644 --- a/codex-rs/core/src/compact_remote.rs +++ b/codex-rs/core/src/compact_remote.rs @@ -6,6 +6,7 @@ use crate::codex::TurnContext; use crate::compact::AutoCompactCallsite; use crate::compact::extract_latest_model_switch_update_from_items; use crate::compact::extract_trailing_model_switch_update_for_compaction_request; +use crate::compact::process_compacted_history; use crate::compact::should_keep_compacted_history_item; use crate::context_manager::ContextManager; use crate::context_manager::TotalTokenUsageBreakdown; @@ -165,7 +166,7 @@ async fn run_remote_compact_task_inner_impl( Err(err) }) .await?; - new_history = sess.process_compacted_history(new_history).await; + new_history = process_compacted_history(new_history); if let Some(incoming_items) = incoming_items.as_ref() { let incoming_history_items: Vec = incoming_items .iter()