mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
Reinject canonical context for model-switch pre-turn compaction
This commit is contained in:
@@ -4675,7 +4675,11 @@ async fn maybe_run_previous_model_inline_compact(
|
||||
sess,
|
||||
&previous_turn_context,
|
||||
AutoCompactCallsite::PreTurnExcludingIncomingUserMessage,
|
||||
TurnContextReinjection::Skip,
|
||||
// Even though incoming turn items are excluded here, this pass can be the only
|
||||
// compaction run before submission. Reinject canonical context so unchanged
|
||||
// model-visible instructions remain present if no follow-up pre-turn compaction
|
||||
// is needed.
|
||||
TurnContextReinjection::ReinjectAboveLastRealUser,
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user