mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
## Why Paginated threads can accumulate wake turns with no user-message boundary. The reverse context scan could not use those turns as a bounded replay cutoff, even when a compaction and its resume state provided everything needed to reconstruct the latest model context. ## What changed Treat a full world-state snapshot that survives the latest compaction as a durable baseline when it is paired with a compatible turn context. This lets the scan stop at empty wake turns while still scanning further back for patches, snapshots before compaction, or missing and mismatched turn contexts. ## Testing Add coverage for repeated empty wake turns and verify that bounded replay matches full rollout reconstruction across successive compaction windows. GitOrigin-RevId: ae90c5f939c660ea539fbfc11128cc7259efaa9c