AgentTeams: shutdown_request not auto-approved; teammate hangs idle

Resolved 💬 2 comments Opened Apr 21, 2026 by tylerlaprade Closed Apr 21, 2026

Repro

  1. Lead spawns teammate via Agent tool with team_name.
  2. Teammate completes work, goes idle.
  3. Lead sends SendMessage with {"type": "shutdown_request", "reason": "..."}.
  4. Teammate receives, idles, does not respond with shutdown_response.
  5. 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.

View original on GitHub ↗

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