Repository navigation
fix(codex): move finished subagents and commands to Ended - #694
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 19, 2026
Merged
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.
Summary
In Codex chat tabs, work listed under "Running" in the side panel did not move to "Ended" when it finished.
waitresult,subAgentActivity, or athread/list/thread/readrefresh. If the parent never waited, the child's ownthread/statusChangedandturn/completedwere dropped by the other-thread filter, so the row stayed running. Known children now take their state from their own lifecycle events (active, idle, systemError, turn start/end, thread closed). A specific failure or interruption is not overwritten by a later idle. A child that keeps running after the parent's turn ends stays running.turn.itemsare applied, and remaining foreground commands of an interrupted or failed turn are stopped. Unified-exec commands (with a process ID) can outlive the turn and stay running until their own completion or until the app server exits or is replaced.The remote side panel reads the same data and gets the same result. No wire format changes. Behavior was checked against the app-server schema generated by
codex app-server generate-json-schema(codex-cli 0.170.0) in a temporaryCODEX_HOME.Tests
Three table rows in the existing Codex model test file, each failing before the fix: a child that finishes without a parent
wait, a completed long command landing in the ended list (also via the remote panel data), and a turn completion arriving while the local turn ID is stale still ends the turn. Combined with current develop and #693:bun run typecheck,bun run check:ci,bun test4,466 pass / 17 skip / 0 fail.Not yet checked in the running app: a child finishing before the parent waits, a 3 s+ command, and a terminal command that keeps running after the reply, in the local and remote panels.
🤖 Generated with Claude Code