mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why Compaction could record partial output before the response completed, leaving failed summaries in conversation history and persisted rollouts. ## What changed Buffer compaction output until `response.completed` so failed or incomplete attempts leave no partial output in history. Record successful output before the response completion notification, preserving its compaction metadata. ## Testing Add regression coverage for preserving messages, tool results, and token usage after a disconnected compaction stream, including after restart. Verify incomplete compaction output is excluded from subsequent requests and successful output remains observable and persisted. GitOrigin-RevId: 8651200b2aae616000c55c1ed63283f3e2c1b8d5