mirror of
https://github.com/openai/codex.git
synced 2026-05-23 20:44:50 +00:00
Build compaction replacement history from persisted session history instead of the retry-local prompt buffer, so ContextWindowExceeded trimming does not drop earlier real user messages or ghost snapshots from replacement history. Add a regression test covering repeated compaction retries and verifying follow-up requests retain earlier user messages even after retry prompt trimming. Co-authored-by: Codex <noreply@openai.com>