TUI /agent picker shows stale closed agents after Agent closed events

Resolved 💬 2 comments Opened Feb 7, 2026 by ignatremizov Closed Feb 9, 2026

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?

  1. Start a session that spawns multiple sub-agents.
  2. Wait until one or more sub-agents emit Agent closed / status: completed in the transcript.
  3. Run /agent to open the agent picker.
  4. 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 closed events followed by /agent still 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)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗