mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
## Why Mid-turn auto-compaction queued `SessionStart` hooks but continued sampling before running them. This delayed hook-provided context and ignored requests to stop the continuation. ## What changed Drain pending session-start hooks immediately after successful mid-turn auto-compaction. End the turn when a hook requests a stop; otherwise include its additional context in the next sampling request. ## Testing Added coverage for repeated compactions in one turn, context delivery without leaking hooks into the next user turn, and stop requests that block sampling. GitOrigin-RevId: c57708a792fb47d98d95c38d7d91bcd9f235be84