Skip to content

fix(codex): move finished subagents and commands to Ended - #694

Merged
moreih29 merged 3 commits into
developfrom
fix/codex-ended-rows
Nov 19, 2026
Merged

moreih29 merged 3 commits into
developfrom
fix/codex-ended-rows

Conversation

@moreih29

Copy link
Copy Markdown
Owner

Summary

In Codex chat tabs, work listed under "Running" in the side panel did not move to "Ended" when it finished.

  • Subagents: a child's row only changed on the parent's wait result, subAgentActivity, or a thread/list/thread/read refresh. If the parent never waited, the child's own thread/statusChanged and turn/completed were 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.
  • Commands: a command that ran longer than 3 s showed as a temporary running row derived from the tool call, then disappeared on completion because nothing recorded it as ended. Observed commands are now recorded as panel jobs with start, end and result, so they move to "Ended". On turn completion, final command items carried in turn.items are 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 temporary CODEX_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 test 4,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

moreih29 and others added 3 commits November 19, 2026 23:05
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>
@moreih29
moreih29 merged commit 1944602 into develop Nov 19, 2026
16 of 18 checks passed
@moreih29
moreih29 deleted the fix/codex-ended-rows branch November 19, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant