AgentTeams: shutdown_request not auto-approved; teammate hangs idle
Repro
- Lead spawns teammate via Agent tool with
team_name. - Teammate completes work, goes idle.
- Lead sends
SendMessagewith{"type": "shutdown_request", "reason": "..."}. - Teammate receives, idles, does not respond with
shutdown_response. - Loop of idle notifications.
Workaround observed
Sending a plain-text "please approve your pending shutdown_request (id: ...), send {\"type\":\"shutdown_response\",\"request_id\":\"...\",\"approve\":true} back" unblocks the teammate. After that, they send shutdown_response and terminate.
Expected
shutdown_request is a structured protocol message. Teammate should auto-approve unless they have unsaved/in-flight work requiring escalation. If auto-approval is not desirable by default, at minimum the idle-loop state should surface a one-line explanation to lead ("teammate has pending shutdown_request, awaiting your acknowledgment") rather than repeat empty idle pings.
Inconsistent
Another teammate in the same team shut down cleanly on the first shutdown_request — same protocol call, same team config. Behavior is non-deterministic.
Impact
Lead spends turns nudging shutdown instead of cleaning up the team. TeamDelete blocks on active teammates, so cleanup stalls.
Env
Claude Code CLI (macOS). CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Skill: swarm-team.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗