mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
## Why Dropped lifecycle facts can leave incomplete turns retaining analytics metadata indefinitely. ## What changed - Limit retained turns to 256, evicting the oldest turn and its associated tool and review state when capacity is reached. - Forward `ThreadClosed` notifications to analytics and discard the closed thread's turn and review state, including reviews received without turn lifecycle facts. ## Testing Add regression tests covering metadata release after capacity eviction, continued reporting of new complete turns, cleanup isolated to the closed thread, and ignored approval responses after thread closure. GitOrigin-RevId: eed0a1fef013381654345d535f03de42b99e8607