Avoid synthetic turn ids in interrupted fork snapshots

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-23 19:05:12 -07:00
co-authored by Codex
parent a3426a1aba
commit d2f1845358
3 changed files with 97 additions and 4 deletions
@@ -111,6 +111,13 @@ impl ThreadHistoryBuilder {
self.current_turn.is_some()
}
pub fn active_turn_id_if_explicit(&self) -> Option<String> {
self.current_turn
.as_ref()
.filter(|turn| turn.opened_explicitly)
.map(|turn| turn.id.clone())
}
/// Shared reducer for persisted rollout replay and in-memory current-turn
/// tracking used by running thread resume/rejoin.
///