Codex App: completed subagents remain in Active / Working after task_complete
What version of the Codex App are you using?
26.721.31836 (build 5828)
What subscription do you have?
ChatGPT subscription. The exact tier is not exposed to the agent environment.
What platform is your computer?
Darwin 25.1.0 arm64 arm
What issue are you seeing?
Completed subagents can remain indefinitely in the Codex Desktop Active list with a Working status.
The affected rollout files have already emitted a terminal task_complete event and have no later meaningful execution event. However, the corresponding spawn-edge records remain in the open state. The UI appears to use the stale edge state and continues to count and display those completed subagents as active.
In one occurrence, the panel reported 17 active subagents. Read-only inspection showed that 16 of them had already ended with task_complete; only one had a non-terminal latest event.
No project names, repository paths, prompts, or business data are included in this report.
What steps can reproduce the bug?
- Start a Codex task that delegates work to multiple subagents.
- Allow the subagents to finish normally.
- Confirm that their rollouts end with
event_msg.payload.type = "task_complete". - Open the Codex Desktop subagent activity panel.
- Observe that completed subagents remain under Active and are labeled Working.
- Refresh or revisit the task. The stale entries may remain.
The inconsistent state is:
Latest meaningful rollout event: task_complete
Spawn-edge status: open
Codex Desktop UI: Active / Working
What is the expected behavior?
After a subagent emits task_complete, failed, or cancelled:
- its spawn-edge state should transition to the corresponding terminal state;
- it should no longer be displayed as Working;
- the Active counter should include only agents that are actually executing or waiting on active work.
Completed subagents may remain available in a separate history section, but they should not be presented as active.
Additional information
This creates operational ambiguity:
- users cannot tell which subagents are actually running;
- the Active counter substantially overstates active work;
- users cannot confidently determine whether concurrency capacity is occupied;
- with shared worktrees, stale Working labels create concern that an old agent may still modify files.
Suggested fix:
- Atomically transition the spawn edge when a rollout reaches a terminal event.
- Reconcile stale
openedges during app startup and task restoration. - Derive the Active panel from the authoritative runtime/rollout terminal state, or reconcile that state with the spawn-edge record before rendering.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I’m seeing the same issue frequently in Codex Desktop for macOS.
Even after subagents finish and return their results, many remain shown as Running / Working. Across repeated multi-agent tasks, these stale entries accumulate in the Active list, so the UI substantially overstates how many subagents are actually running.
Environment:
26.803.41515(build6321)27.0(build26A5388g, arm64)This makes it difficult to tell whether work is still executing or whether concurrency is actually occupied. I can add a sanitized screenshot or Feedback session ID later if useful.
Confirmed on another macOS Codex Desktop installation. This appears to be the same stale Active/Working state.
Environment:
26.730.61639(build6234)13.5arm64Observed behavior:
This makes it look as if old agents may still consume concurrency or modify the shared worktree, even though the runtime reports that they no longer exist.
Sanitized screenshot:
<img width="346" height="500" alt="Image" src="https://github.com/user-attachments/assets/a92730b0-909b-43aa-93b4-807e717185a5" />
Reproduced at substantially larger scale on a current macOS build.
Environment
26.814.4140726.6.1arm64Observed behavior
Runtime cross-check
A live collaboration-registry lookup was performed for representative entries shown as Working. Those exact agent paths returned:
Earlier lifecycle inspection had recorded the same representative agents as terminal (
completedorinterrupted), not actively executing. The primary task was the only work still in progress.This makes the panel disagree with the runtime registry in three visible ways:
Expected behavior
Impact
At this scale the panel is not operationally trustworthy. It creates the false impression that 123 agents may still be consuming usage, occupying concurrency, or retaining the ability to modify a shared workspace. Users cannot distinguish actual execution from historical records without performing a separate runtime-registry inspection.
This appears consistent with the stale status/hydration paths discussed in #37042 and #37916. The continuously increasing timers suggest the renderer may be starting a client-side elapsed-time calculation from historical start data after incorrectly hydrating the record as active, rather than receiving ongoing execution activity.
No continuing model activity was detected for the representative entries checked. No repository names, task contents, local paths, thread identifiers, or private project information are included in this report.
Additional reproduction on the current native Windows build. I am commenting on the existing issue rather than opening a duplicate, as requested by the Codex App issue template.
Environment
26.818.5229.0Microsoft Windows NT 10.0.26200.0 x64Runtime/UI mismatch
At one point, the Subagents panel displayed:
An authoritative live-agent lookup performed at the same time contained only three live child agents: one coordinator and two current reviewers.
Representative historical entries displayed as
Workinghad already returned their final results. Explicit interrupt attempts against those displayed canonical agent paths returned:The cards nevertheless remained under Active and their elapsed timers continued increasing.
Reproduction pattern
Scope of this evidence
This report demonstrates a UI/runtime state mismatch. It does not demonstrate that the stale entries continue consuming model tokens, CPU, or concurrency capacity.
Read-only persisted-state cross-check
After the initial report, I performed a read-only audit of the local lifecycle metadata and corresponding rollout endings:
27child edges persisted for the affected coordinator are still stored asstatus = open.27/27child rollout files end withevent_msg/task_complete.5direct child edges are also still stored asopen.5/5rollouts end withevent_msg/task_complete, including the coordinator itself.This confirms a stale persisted spawn-edge state: terminal rollout evidence and the stored edge status disagree.
I did not find a persisted
watched_statusfield in the relevant state schemas or global application state. Therefore, I am not claiming thatwatched_statuswas the exact runtime input used to render this occurrence. The runtime precedence mechanism discussed in #37916 remains a plausible adjacent mechanism, while the staleopenedges are directly verified here.The additional value relative to existing reports is:
26.818.5229.0;26 displayed vs 3 livemismatch;not_foundlifecycle-control evidence.No repository names, prompts, local paths, thread identifiers, credentials, rollout files, or customer data are included. A cropped screenshot containing only the Subagents panel can be provided if maintainers request it.