mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
## Why Compaction can drop active client context while deduplication prevents unchanged values from being sent again on subsequent turns. ## What changed Track additional context by history item ID and restore active items when installing complete or prefix compaction results. Preserve their history order, refresh retained items with their original bounded payloads, and leave queued updates to arrive with their input. ## Testing Add regression coverage for local compaction with message context and remote compaction with tool-output context. Verify that current context survives exactly once, stale values are absent, and restored context precedes the preserved user prompt. GitOrigin-RevId: a3114f387c6a4ae1a2d1651993d0f7a101be7dd5