TUI /agent picker shows stale closed agents after Agent closed events
What issue are you seeing?
In the TUI, /agent still lists agents that are already closed/completed.
<img width="965" height="821" alt="Image" src="https://github.com/user-attachments/assets/0b467ea6-b496-4509-a5d2-1e236013f495" />
I can see Agent closed events in the transcript, but opening /agent afterward still shows those same closed threads as selectable entries (stale list).
<img width="923" height="54" alt="Image" src="https://github.com/user-attachments/assets/6ac768a7-3a7a-42e4-8589-c6f300849aa9" />
This appears to be a stale-state bug in the agent picker data source.
What steps can reproduce the bug?
- Start a session that spawns multiple sub-agents.
- Wait until one or more sub-agents emit
Agent closed/status: completedin the transcript. - Run
/agentto open the agent picker. - Observe that closed agents are still listed in the picker.
What is the expected behavior?
Closed agents should be removed from the active /agent picker list (or clearly separated under a non-selectable “closed/completed” section), so /agent reflects currently focusable agents only.
What is the actual behavior?
/agent includes stale closed/completed agents as if they were still active/focusable.
Additional information
- Variant: TUI (CLI)
- Reproducible: yes
- See screenshot that shows
Agent closedevents followed by/agentstill listing those agent thread IDs. - I checked for existing issues/PRs and only found the related earlier feature requests, not this bug:
- #10471 (subagent monitoring UI feature)
- #9902 (persistent agents sidepanel feature)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗