mirror of
https://github.com/openai/codex.git
synced 2026-05-15 00:32:51 +00:00
Persist pre-turn updates before interrupted auto-compaction exits
This commit is contained in:
@@ -4809,15 +4809,15 @@ async fn run_pre_turn_auto_compaction_if_needed(
|
||||
.await;
|
||||
|
||||
if let Err(err) = compact_result {
|
||||
if matches!(err, CodexErr::Interrupted) {
|
||||
return Err(());
|
||||
}
|
||||
if !pre_turn_context_items.is_empty() {
|
||||
// Preserve model-visible settings updates even when pre-turn compaction fails
|
||||
// before we can persist turn input.
|
||||
sess.record_conversation_items(turn_context, pre_turn_context_items)
|
||||
.await;
|
||||
}
|
||||
if matches!(err, CodexErr::Interrupted) {
|
||||
return Err(());
|
||||
}
|
||||
let event = match err {
|
||||
CodexErr::ContextWindowExceeded => {
|
||||
error!(
|
||||
|
||||
Reference in New Issue
Block a user