mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why With only one worker slot, starting a replacement can fail while the interrupted worker is still cleaning up its turn. ## What changed Add `CodexThread::stop_worker` for V3 workers. Enable interruption at sampled item boundaries for V3 and make the stop call wait until the interrupted turn releases its execution slot. The stopped thread can still accept later messages. ## Testing Add an integration test that holds a worker during sampling and abort cleanup, checks that the stop call remains pending at both points, and starts a replacement worker in the only worker slot after stop returns. GitOrigin-RevId: da78de02d8c32a0f6e62b0487b49cf4908c01de5