Permit Codex delivery after terminal errors - #273
Merged
Conversation
25 tasks
myobie
marked this pull request as ready for review
August 18, 2026 06:46
6 tasks
myobie
force-pushed
the
agent/issue-264-codex-error-delivery
branch
from
August 18, 2026 07:46
13a2373 to
c056cdf
Compare
Contributor
Author
|
@schickling, was this close deliberate, or was it repository tidy-up? If it was deliberate, what fix shape would you accept for #264 instead? Should I continue with the unrelated draft #276? I will follow your preference. |
myobie
force-pushed
the
agent/issue-264-codex-error-delivery
branch
from
August 23, 2026 13:07
c056cdf to
2567e7c
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
systemErrorheld until the failed turn completes.TerminalError { SystemError }.turn/startfrom that terminal diagnostic.notLoaded, review, compaction, human-wait, and conflicting-turn states blocked.Why
Codex and st2 deadlock after a terminal system error. Codex clears the error only when a new turn starts. st2 refuses to start a turn while it holds
SystemError. Each side waits for the action that only the other side can cause.#270 fixed the false
ConflictingTurnlabel. It correctly preserved the provider's reportedSystemError, but it left the delivery gate shut.The provider sends no later signal that can open that gate:
EventMsg::Errorcallsnote_system_error.note_system_errorsetshas_system_error = true.turn/completedcallsnote_turn_completed.clear_active_statedoes not clearhas_system_error.note_turn_startedclears the error.The upstream
system_error_sets_idle_flag_until_next_turntest never assertsIdle. It assertsSystemError, starts the next turn, and then assertsActive.Recorder limit
The two #263 capture files stop at
turn/completedand have the same method sequence. Their endings cannot prove that Codex omits a later idle event. The replay test pins only the st2 state at that recorder boundary. The provider source above proves that no later idle notification arrives.User impact
A failed Codex turn no longer wedges native inbox delivery. The next unread message can start the turn that clears the provider error.
Validation
cargo test -p st2 --lib codex_app_server::tests -- --nocapture: 40 passed.cargo test -p st2 --lib -- --nocapture: 327 passed.git diff --check origin/main...HEAD: passed.Fixes #264