TeamDelete fails when teammate exhausted context and can't respond to shutdown
Resolved 💬 2 comments Opened Feb 12, 2026 by jeffeharris Closed Feb 12, 2026
Bug
When a teammate runs out of context window and can't respond to shutdown_request, TeamDelete permanently fails because it still sees that member as "active". There's no way to force-remove them through the API.
Steps to Reproduce
- Create a team with
TeamCreate - Spawn a teammate via
Tasktool withteam_name - Let the teammate exhaust its context window (large implementation task)
- Send
shutdown_requestviaSendMessage— teammate can't respond (context exhausted) - Call
TeamDelete— fails with:Cannot cleanup team with 1 active member(s): <name>. Use requestShutdown to gracefully terminate teammates first. - The tmux pane is already dead (
tmux kill-panereturns exit 1) - Even manually editing
config.jsonto setisActive: falsedoesn't help —TeamDeletestill refuses
Workaround
Manual cleanup: rm -rf ~/.claude/teams/<team-name> ~/.claude/tasks/<team-name>
Expected Behavior
Either:
TeamDeleteshould have a--forceoption to clean up despite active membersshutdown_requestshould have a timeout after which the member is considered terminated- If the tmux pane is dead, the member should automatically be marked inactive
Environment
- Claude Code v2.1.39
- Linux 6.8.0-100-generic
- Team had 5 members over its lifetime, 4 shut down cleanly, 1 exhausted context
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗