claude-code - 💡(How to fix) Fix Team shutdown_request acknowledged but teammates never terminate; TeamDelete blocked until session ends [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49671Fetched 2026-04-17 08:34:37
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

SendMessage accepts type: "shutdown_request" and returns success + a request ID, but teammates never terminate. TeamDelete is then blocked for the life of the session.

Unclear from outside whether shutdown_request is a declared protocol or forwarded free-form content — the {"success": true, "request_id": "shutdown-<ts>@<name>"} response suggests first-class handling, but we can't confirm against the tool schema. Either way, there's currently no way to clean up teams from within a session.

Filed as a follow-up to the #44971 investigation (now fixed in 2.1.105).

Root Cause

If it ISN'T: TeamDelete needs a force option (or some documented path to terminate members), because there's currently no way to clean up teams within a session.

Code Example

SendMessage({
     "to": "alpha",
     "type": "shutdown_request",
     "message": {"type": "shutdown_request", "reason": "..."},
     "recipient": "alpha",
     "content": "..."
   })

---

SendMessage({
  "to": "*",
  "type": "broadcast",
  "summary": "Shutdown request",
  "message": {"type": "shutdown_request", "reason": "Investigation complete."}
})

---

SendMessage({
  "to": "alpha",
  "type": "shutdown_request",
  "message": {"type": "shutdown_request", "reason": "Investigation complete."},
  "recipient": "alpha",
  "content": "Investigation complete."
})

---

SendMessage({
  "to": "alpha",
  "summary": "Please exit",
  "message": "Your work is complete. Please respond to the pending shutdown request by approving it."
})
RAW_BUFFERClick to expand / collapse

Summary

SendMessage accepts type: "shutdown_request" and returns success + a request ID, but teammates never terminate. TeamDelete is then blocked for the life of the session.

Unclear from outside whether shutdown_request is a declared protocol or forwarded free-form content — the {"success": true, "request_id": "shutdown-<ts>@<name>"} response suggests first-class handling, but we can't confirm against the tool schema. Either way, there's currently no way to clean up teams from within a session.

Filed as a follow-up to the #44971 investigation (now fixed in 2.1.105).

Environment

  • Claude Code 2.1.105 (installed 2026-04-13)
  • macOS
  • Plugin: Coolant — consumes SubagentStart/SubagentStop hooks

Reproduction

  1. TeamCreate({name: "test-team"})
  2. Spawn 2-4 teammates via Agent({team_name: "test-team", name: "alpha", ...})
  3. Let at least one teammate complete a turn so it's idle in mailbox
  4. Send shutdown:
    SendMessage({
      "to": "alpha",
      "type": "shutdown_request",
      "message": {"type": "shutdown_request", "reason": "..."},
      "recipient": "alpha",
      "content": "..."
    })
  5. Observe response: {"success": true, "request_id": "shutdown-<ts>@alpha"}
  6. Observe teammate: wakes (SubagentStart), processes message, goes idle (SubagentStop), sends idle_notification, does NOT terminate
  7. TeamDelete({name: "test-team"}) → fails with "Cannot cleanup team with N active members"

What we tried

Three rounds of escalating shutdown attempts across all 4 teammates in a live test:

Round 1 — Broadcast:

SendMessage({
  "to": "*",
  "type": "broadcast",
  "summary": "Shutdown request",
  "message": {"type": "shutdown_request", "reason": "Investigation complete."}
})

Round 2 — Per-teammate with explicit type: "shutdown_request":

SendMessage({
  "to": "alpha",
  "type": "shutdown_request",
  "message": {"type": "shutdown_request", "reason": "Investigation complete."},
  "recipient": "alpha",
  "content": "Investigation complete."
})

Response: {"success": true, "message": "Shutdown request sent to alpha. Request ID: shutdown-1776305814048@alpha"}

Round 3 — Plain text asking teammates to approve pending request:

SendMessage({
  "to": "alpha",
  "summary": "Please exit",
  "message": "Your work is complete. Please respond to the pending shutdown request by approving it."
})

Evidence

Each teammate's inbox at ~/.claude/teams/<team>/inboxes/<name>.json shows all messages delivered and marked "read": true. Teammates received and processed the shutdown requests but did not terminate.

Repeated sequence across all rounds, for each teammate:

  1. SendMessage delivers shutdown_request → CC returns success + request ID
  2. SubagentStart fires (teammate wakes)
  3. Teammate processes message, goes idle
  4. SubagentStop fires
  5. idle_notification sent to team lead
  6. Teammate remains alive in team

Question for Anthropic

Is type: "shutdown_request" declared in SendMessage's tool schema as a recognized type, or is it free-form content that SendMessage happens to forward to the inbox? The request-ID format in the response suggests explicit handling, but we can't confirm from the outside. This determines whether the bug is "protocol exists and is ignored" or "user tried to invoke a protocol that doesn't exist."

Impact

  • TeamDelete cannot clean up teams while teammates are alive
  • No documented way to terminate teammates from inside a session
  • Users iterating on team configs must restart the whole CC session
  • Stale team state accumulates on disk under ~/.claude/teams/<name>/

Asks

If shutdown_request IS a declared protocol: teammates should honor it and terminate.

If it ISN'T: TeamDelete needs a force option (or some documented path to terminate members), because there's currently no way to clean up teams within a session.

extent analysis

TL;DR

The issue can be resolved by either confirming if shutdown_request is a declared protocol in SendMessage's tool schema and ensuring teammates honor it, or by adding a force option to TeamDelete to clean up teams with active members.

Guidance

  • Investigate if shutdown_request is a declared protocol in SendMessage's tool schema to determine the root cause of the issue.
  • If shutdown_request is a declared protocol, verify that teammates are correctly implemented to honor and terminate upon receiving this request.
  • If shutdown_request is not a declared protocol, consider adding a force option to TeamDelete to allow for cleanup of teams with active members.
  • Review the team configuration and termination process to ensure that there are no other blockers or issues preventing teammates from terminating correctly.

Example

No code snippet is provided as the issue is more related to the protocol and schema definition rather than a specific code implementation.

Notes

The solution depends on the definition of shutdown_request in SendMessage's tool schema, which is currently unclear. Clarifying this will help determine the best course of action to resolve the issue.

Recommendation

Apply a workaround by adding a force option to TeamDelete to allow for cleanup of teams with active members, as this provides a clear path forward regardless of the definition of shutdown_request.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Team shutdown_request acknowledged but teammates never terminate; TeamDelete blocked until session ends [1 comments, 2 participants]