Conversation
maxj-oai
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CI has been intermittently failing in
suite::v2::thread_resume::thread_resume_rejoins_running_thread_even_with_override_mismatchbecause these running-thread resume tests treatedturn/startedas proof that the thread was already active.That signal is too early for this path.
turn/startedis emitted optimistically fromturn_start. Insingle_client_mode, the listener skipscurrent_turn_historytracking incodex_message_processor.rs, so running-thread resume still depends onThreadWatchManagerobserving the coreTurnStartedevent inbespoke_event_handling.rs. Ifthread/resumelands in that window, the thread can still lookIdleand the assertion flakes.What
codex-rs/app-server/tests/suite/v2/thread_resume.rsthat waits forthread/status/changedto reportActivefor the target thread.turn/started.Follow-up
This PR keeps the fix at the test layer so we can remove the flake without changing server behavior. A broader runtime fix should still be considered separately, for example:
turn/starteagerly transition the thread toActivesoturn/startedandthread/status/changedare coherentsingle_client_modeguard that skips current-turn tracking for running-thread resumeTesting
cargo test -p codex-app-server thread_resume -- --nocapturefor i in $(seq 1 10); do cargo test -p codex-app-server 'suite::v2::thread_resume::thread_resume_rejoins_running_thread_even_with_override_mismatch' -- --exact --nocapture; done