Subagent count shows phantom working agents and changes after restart
What version of the Codex App are you using (From “About Codex” dialog)?
26.813.12317
What subscription do you have?
PRO
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
The Environment sidebar is reporting dozens of phantom subagents as actively working, even though the live agent tree contains no child agents.
Observed timeline for the same task:
- Before restarting Codex:
- 66 working
- 27 done
- After fully quitting and restarting Codex:
- 93 working
- 0 shown as done
- Later, without spawning any new subagents:
- 72 working
- 21 done
The total remains 93, but agents move between “working” and “done” without any new multi-agent activity.
At the same time, querying the live agent tree for this task returned only:
/root— running
No child agents were exposed as active or available to stop.
There is no error dialog or console error message. The problem appears to be incorrect or stale subagent state in the Codex desktop UI, possibly after a long multi-agent task.
This is concerning because the UI suggests that dozens of agents may still be performing work or consuming usage, while the live task backend reports none.
No project code is involved, so there is no relevant code snippet.
Session/thread ID:019febb0-4665-7461-b186-0eb1e692f5c1
App version: 26.803.61601
Build: 6396
Bundle identifier: com.openai.codex
OS: macOS 26.5.1 (25F80)
Model: gpt-5.6-sol
Reasoning effort: high
Token-limit and context-window usage are not exposed in the UI or available task metadata, so I cannot provide accurate values. This is a very long-running task with extensive prior multi-agent activity; please inspect the session server-side using the session ID.
<img width="586" height="1062" alt="Image" src="https://github.com/user-attachments/assets/1b382ee5-5435-468b-9dc0-d2e3fd89e099" />
<img width="592" height="894" alt="Image" src="https://github.com/user-attachments/assets/eb86834e-cc69-42e6-9188-da17fedcc802" />
<img width="294" height="444" alt="Image" src="https://github.com/user-attachments/assets/cf36ccee-bc2a-444b-a903-dd0d3e99dcf1" />
What steps can reproduce the bug?
- Open a long-running local Codex project task using multi-agent work.
- Spawn multiple subagents across the task and allow them to complete.
- Observe the Subagents section in the Environment sidebar.
Initially, the sidebar displayed:
- 66 working
- 27 done
- Querying the live agent tree showed no active subagents.
- Fully quit and restart the Codex app.
- Reopen the same task.
After restarting, the sidebar displayed:
- 93 working
- no completed count
- Leave the task open without creating any new subagents.
The count later changed by itself to:
- 72 working
- 21 done
The total consistently remains 93, but agents move between "working" and "done" despite no new subagents being created.
The currently exposed live agent tree contains only:
/root— running
No child/subagents are currently exposed as running.
No project code is involved, so there is no code snippet that can reproduce this. This appears to be a Codex desktop task-state/UI bookkeeping issue triggered by a long multi-agent session.
What is the expected behavior?
Once every child agent has completed, the sidebar should show zero working subagents. Restarting Codex should restore the correct state and should not change completed agents back to working.
Additional information
Codex app version: 26.803.61601
Build: 6396
Bundle identifier: com.openai.codex
OS: macOS 26.5.1 (25F80)
Model: gpt-5.6-sol
Reasoning effort: high
Session/thread ID:
019febb0-4665-7461-b186-0eb1e692f5c1
Token-limit usage and context-window usage are not exposed in the app or task metadata available to me, so I cannot provide accurate values.
This is a very long-running task with extensive multi-agent activity. Please inspect the session server-side using the session ID above.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Closing this as duplicate (https://github.com/openai/codex/issues/37222)