Agent Teams: zombie teammates cannot be force-terminated by team lead
Description
When using Agent Teams (experimental, CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1), teammate agents can enter a "zombie" state where they:
- Remain in the team config (
~/.claude/teams/{team}/config.json) - Show as "Idle" in the agent panel
- Accept keep-alive pings without error
- But do NOT process any tool calls or respond to SendMessage content
The team lead has no way to force-terminate a zombie teammate. SendMessage with shutdown_request type is delivered successfully (no error) but the agent never processes it.
Impact
- The zombie agent occupies a team slot but produces no work
- The team lead cannot recover without human intervention (Escape + manual kill in agent panel, or full session restart)
- In an autonomous/overnight scenario, this means an agent is permanently stuck until a human notices
Steps to Reproduce
- Create an Agent Team with
TeamCreate - Spawn teammates with
Agenttool (in-process backend) - Assign work to a teammate via
SendMessage - After the teammate completes work and goes idle, continue sending messages
- At some point (observed after ~30-45 min of mixed activity/idle), the teammate stops processing messages entirely
SendMessagereturns success but the teammate never respondsshutdown_requestalso returns success but the teammate never terminates
Expected Behavior
- Team lead should have a
ForceTerminatetool or similar mechanism to kill unresponsive teammates - Or: zombie detection with automatic recovery (respawn after N seconds of unresponsiveness)
- Or:
SendMessageshould return an error/warning if the target agent is in a zombie state
Environment
- Claude Code: latest (April 2026)
- macOS 26.4 (Darwin 25.4.0)
- Backend type: in-process
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1- Model: claude-opus-4-6
Workaround
Human manually kills the zombie via Escape + agent panel (Shift+Down to find it). No programmatic workaround available to the team lead.
Suggestion
A ForceTerminate or TeamKick tool that allows the team lead to remove an unresponsive teammate from the team, cleaning up their process. This would enable fully autonomous agent teams without requiring human babysitting for zombie recovery.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗