From c9ea4a902b85349c871fbc0d1a56eeeddfe4ca73 Mon Sep 17 00:00:00 2001 From: Rohit Arunachalam Date: Thu, 16 Apr 2026 13:26:17 -0700 Subject: [PATCH] Box prefix compaction candidate state --- codex-rs/core/src/state/session.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codex-rs/core/src/state/session.rs b/codex-rs/core/src/state/session.rs index d205640ac2..5d8169a67c 100644 --- a/codex-rs/core/src/state/session.rs +++ b/codex-rs/core/src/state/session.rs @@ -134,7 +134,7 @@ impl SessionState { self.prefix_compact, PrefixCompactState::Running { generation } if generation == candidate.generation ) { - self.prefix_compact = PrefixCompactState::Ready(candidate); + self.prefix_compact = PrefixCompactState::Ready(Box::new(candidate)); } } @@ -165,7 +165,7 @@ impl SessionState { && current_history[..candidate.base_history.len()] == candidate.base_history; if prefix_is_current { - Some(candidate) + Some(*candidate) } else { None } @@ -307,7 +307,7 @@ enum PrefixCompactState { Running { generation: u64, }, - Ready(PrefixCompactCandidate), + Ready(Box), } #[derive(Debug, Clone)]