You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Closed subagents remain in sidebar until threads are archived #30903
Me: the following issue description is generated by Codex. There was UI issue and codex fixed it by digging into internal. I have the latest codex version as of July 2nd 2026.
Summary
Closed subagents stayed visible in the Codex sidebar and the subagent count kept growing (Show 148 more). close_agent succeeded for individual agents, but the sidebar still listed them.
Local findings
In ~/.codex/state_5.sqlite:
thread_spawn_edges had 154 child threads for the workspace
150 edges were already closed
4 edges were stale open entries, but close_agent reported those ids as not found
all 154 corresponding threads rows had archived = 0
So the sidebar appears to count unarchived child threads, not just live subagent workers.
Workaround used
I backed up state_5.sqlite, then archived only the affected workspace's child threads and marked stale edges closed. After that:
remaining_unarchived_children = 0
remaining_nonclosed_edges = 0
Expected behavior
When a subagent is closed/completed, it should not keep accumulating in the sidebar indefinitely. There should also be a supported bulk cleanup/archive path for completed subagents.
Activity
github-actions commentedon Jul 2, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
kennyalive commentedon Jul 2, 2026
So far it does not look like a duplicate but if it is, please check if the described workaround can be useful. It fixed the issue for me locally.