Agent Teams TUI: stale teammate roster after config.json changes
Resolved 💬 3 comments Opened Mar 31, 2026 by maxtongwang Closed Apr 4, 2026
Bug
The agent teams TUI caches the team roster in memory. When teammates are shut down and removed from ~/.claude/teams/{name}/config.json, the TUI still shows them as entries. Clicking on a dead teammate shows "idle" but the session is gone.
Repro
- Create a team with 3 teammates
- Shut down 2 teammates (SendMessage shutdown_request → shutdown_response)
- Edit config.json to remove the dead members (or they're marked isActive=false)
- TUI still shows all 4 teammates (lead + 3)
- Clicking dead teammate shows idle/broken state
Expected
TUI should re-read config.json periodically (or on team roster change) and prune members that are:
isActive: false- tmux pane no longer exists
- Process no longer running
Workaround
Created ~/.claude/scripts/prune-dead-teammates.sh that removes dead members from config.json. Wired as PostToolUse hook on SendMessage|TeamDelete + SubagentStop. TUI reflects changes on next full navigation (Escape → re-enter team view).
Environment
- Claude Code 2.1.88
- macOS
- tmux backend for teammates
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗