TeamCreate: stuck agents cannot be terminated from lead session — user must close and restart Claude to recover

Resolved 💬 3 comments Opened May 7, 2026 by nath-maker Closed May 11, 2026

Summary

When TeamCreate agents stall mid-execution (commonly inside WebSearch), the lead has no working mechanism to terminate them. All three documented termination paths fail. The only recovery is for the user to close and restart Claude.

In our session, agents have now been stuck for over an hour. They continue consuming compute. The × button in the Tasks panel does nothing. This is a serious deficiency for a paid product — I am on Claude Max 20x, and the only way out is to kill the whole client.

Termination paths that fail

  • SendMessage with {"type": "shutdown_request"} returns success but the agent never processes its inbox while stuck in a synchronous tool call
  • TaskStop with the team agent ID name@team-name returns No task found with ID: ... — the team-agent ID space and TaskStop's ID space appear disjoint
  • TeamDelete refuses while members are active (consistent with docs, but combined with the above leaves no escape hatch)
  • The Tasks-panel × button signals stop but does not interrupt mid-tool-call. After an hour it still has not taken effect.

Result: stuck team members keep running until the user closes and restarts Claude. There is no programmatic or UI recovery from inside the session.

Separate issue, same session: TeamCreate registration race

One of five agents (akilah) was spawned via Agent but missing from ~/.claude/teams/{team-name}/config.json members[]. Inbox file existed (2135 bytes, accumulating routed messages), but no shutdown handshake was possible. The agent appeared idle/wake-looping from the lead's side and never delivered content.

The same race appears reproducible when 5 agents are spawned in a single tool-use block.

Reproduction

  1. TeamCreate a team
  2. Spawn 5 agents in one tool-use block, each prompt triggering WebSearch early
  3. Wait until at least one agent is mid-WebSearch
  4. Try any of the termination paths above
  5. Compare Agent spawn count to config.json members[] length — they may differ

Impact

  • Live multi-agent demos break visibly with no graceful recovery
  • Users must close the entire Claude client to escape stuck teams
  • Background compute continues silently for the duration of the session
  • The pattern of "agent idle without delivering content" is indistinguishable to the user from "agent finished" — there is no surface signal that the team is stuck

Workaround for one related symptom

The Working with Agents documentation pattern instructs agents to append session learnings via Bash cat >> .... In sessions where Bash is not auto-approved, this stalls agents at the permission gate. We resolved this by writing prompts that explicitly forbid Bash, file writes, and self-logs (output goes only in the agent's chat message). This avoids the Bash-permission stall but does not fix the unkillable-stuck-agent or registration-race bugs above.

Environment

  • Claude Code, in-process backend, multi-agent team via TeamCreate
  • Claude Max 20x subscription
  • macOS, Claude Opus 4.7 (1M context)
  • May 7, 2026

Happy to provide session logs, team config files, and additional reproduction details.

View original on GitHub ↗

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