mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
## Why Manual compaction could interrupt a running turn before discovering that the session settings prevent compaction. This can happen when a policy refresh requires auto review for the current model. ## What changed Validate the session settings before interrupting the active turn for `/compact`. If validation fails during a turn, emit a warning and leave the turn running. If the session is idle, report a bad request and set the agent status to errored. ## Testing Add a regression test that verifies the running turn completes after a compaction warning and that retrying `/compact` while idle reports an error. GitOrigin-RevId: 7e841450461b78661c026a348a610aefa24d8a77