Terminated agents persist in UI agent list until session end

Resolved 💬 4 comments Opened Apr 10, 2026 by hyuki0130 Closed May 22, 2026

Description

When agents are created via TeamCreate + Agent tool and later terminated (via /kill, shutdown_request, or TeamDelete), they continue to appear in the UI agent picker list above the input field. This persists for the entire session duration.

Steps to Reproduce

  1. Create a team with TeamCreate
  2. Spawn multiple agents with the Agent tool (across multiple sessions)
  3. Terminate agents via shutdown_request or /kill
  4. Observe: terminated agents still appear in the UI list above the input field

Expected Behavior

Terminated/killed agents should be removed from the UI agent list.

Actual Behavior

80+ terminated agents remain in the UI list, obscuring the input area and making it difficult to see current work progress. The list shows entries like:

* Idle
├─ team-lead · shift + ↓/↓ to select
├─ @admin-recipes-fix: Cooked for 23h 51m 54s · 26 tool uses · 38.6k tokens
├─ @architect-ai: Cooked for 2d 3h 53m · 4 tool uses · 50.1k tokens
├─ @architect-update: Cooked for 2d 1h 38m · 16 tool uses · 76.8k tokens
├─ @executor-mobile: Worked for 3d 1h 4m · 23 tool uses · 47.1k tokens
├─ @executor-worker: Baked for 1d 9h 24m · 18 tool uses · 37.8k tokens
... (80+ more entries)

All agents show "Idle" status with accumulated stats even though they were terminated.

Environment

  • Claude Code CLI v2.1.88
  • macOS 26.3.1 (Darwin 25.3.0)
  • Terminal: Ghostty
  • Apple Silicon (Mac16,7)

Impact

  • Input area is pushed down by 80+ idle agent entries
  • Active work progress is hard to see (only visible at very top of terminal)
  • /kill removes agent processes but not UI entries
  • TeamDelete cleans up team files but not UI entries
  • Must end entire session to clear the list

View original on GitHub ↗

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