TeamDelete returns success but teammate tmux pane survives
Summary
TeamDelete returns { success: true } while a teammate's tmux pane is still alive. The lead's status bar continues showing Idle · teammates running after deletion. The teammate acknowledged shutdown_request but its pane was never terminated.
Reproduction
TeamCreate("learn-mawjs")- Spawn 5 teammates via
Agenttool withteam_nameset (tmux backend, Haiku model,subagent_type: "general-purpose") - Wait for all 5 to complete their tasks + send reports
SendMessageshutdown_request to each teammate- 4 of 5 respond with
shutdown_approvedand their panes terminate - 1 teammate (
fed-protocol) shows:
- "Shutdown request from team-lead" rendered in pane
- Two
Invalid tool parameterserrors (red) — likely itsshutdown_responsereply failing validation - Then: "Approving shutdown — TASK 2 complete. … Team lead has been notified."
- Pane stays alive. Cursor active.
TeamDelete()→ returns{ success: true, message: "Cleaned up directories and worktrees..." }- Lead's footer still shows:
@main @fed-protocol · shift+↓ to expand tmux list-panesconfirms the pane exists
Expected
Either:
TeamDeleteshould fail if a teammate pane is still alive (the docs say "TeamDelete will fail if the team still has active members"), ORTeamDeleteshould kill surviving panes as part of cleanup
And: if the teammate's shutdown_response fails tool validation, the system should still terminate the pane (the intent was clearly to shut down).
Possible cause
The shutdown_response from the teammate may have included invalid parameters (the Invalid tool parameters errors in the pane suggest this). If the response validation rejects the reply, the shutdown handshake never completes — but TeamDelete doesn't check for this and reports success anyway.
Environment
- Claude Code v26.4.18
- Opus 4.7 (1M context) as lead
- Haiku 4.5 as teammates
- tmux backend (
teammateMode: "tmux") - macOS Darwin 25.4.0
Screenshots
_(Nat has screenshots showing the split-pane state; can attach if needed)_
Workaround
Manual tmux kill-pane on the orphaned pane, or bash ~/.claude/skills/team-agents/scripts/cleanup.sh.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗