Clarify newest surviving turn-context snapshot selection

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-05 20:01:21 -08:00
parent be08067aca
commit c360485a13

View File

@@ -170,6 +170,9 @@ impl Session {
active_segment.turn_id.as_deref(),
ctx.turn_id.as_deref(),
) {
// Reverse replay walks newest-to-oldest, so the first surviving
// `TurnContextItem` we see for this turn segment is the newest
// surviving context snapshot for the turn.
if active_segment.previous_turn_settings.is_none() {
active_segment.previous_turn_settings = Some(PreviousTurnSettings {
model: ctx.model.clone(),