mirror of
https://github.com/openai/codex.git
synced 2026-09-17 12:23:33 +00:00
## What changed - Add `ThreadStore::revert_thread` to retain history before a selected turn by creating a new immutable rollout and atomically switching the thread's stored rollout path. - Preserve the logical thread ID and session metadata across repeated reverts. - Track every rollout owned by a thread so archive, unarchive, and delete operations handle the complete lineage and restore moved files when metadata updates fail. - Prevent deletion when forks still reference any rollout in the thread's lineage. ## Testing - Cover repeated reverts, compressed source rollouts, lifecycle operations over reverted histories, reference-aware deletion, and cross-process unarchive locking. GitOrigin-RevId: 1c05a6db3d0036ee91b562263d7ca200c6a0ea71