TeamCreate: stuck agents cannot be terminated from lead session — user must close and restart Claude to recover
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
SendMessagewith{"type": "shutdown_request"}returns success but the agent never processes its inbox while stuck in a synchronous tool callTaskStopwith the team agent IDname@team-namereturnsNo task found with ID: ...— the team-agent ID space and TaskStop's ID space appear disjointTeamDeleterefuses 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
TeamCreatea team- Spawn 5 agents in one tool-use block, each prompt triggering
WebSearchearly - Wait until at least one agent is mid-
WebSearch - Try any of the termination paths above
- Compare
Agentspawn count toconfig.jsonmembers[]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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗