mirror of
https://github.com/openai/codex.git
synced 2026-09-09 15:58:47 +00:00
## Why Selecting only the newest entries changes the retained transcript prefix whenever a new entry arrives, reducing cache stability. ## What changed - Replay non-user transcript entries through a bounded buffer and evict half of the applicable pool when an entry or token limit overflows. - Keep message and tool token budgets independent, and reject entries that cannot fit without evicting retained evidence. - Preserve user-message selection and emit retained entries in transcript order. ## Testing Added coverage for stable tool prefixes, message-budget overflow, rejected messages, and chunked entry-count eviction. GitOrigin-RevId: e6181f5a229a6de06c7ef5db21a5c74980a53e97