[BUG] Teammate agents with model: inherit become permanently unrecoverable zombies after parent session ends
Impact: Unkillable zombie agents that persist indefinitely
Teammate agents spawned with model: "inherit" become permanently stuck and unrecoverable when the parent session that spawned them ends. The agent cannot process any API calls — including shutdown requests — because inherit no longer resolves to a concrete model. The only fix is manually killing the process and deleting team config files from disk.
This is not a cosmetic UI issue. The zombie agent:
- Cannot be shut down via
SendMessageshutdown_request (model resolution fails before the message is processed) - Cannot switch models via
/model(same resolution failure) - Blocks new team creation ("Already leading team X" / "Cannot cleanup team with 1 active member(s)")
- Persists across session restarts — survives
/clear, new conversations, and Claude Code restarts - Requires manual filesystem surgery (
rm -rf ~/.claude/teams/<team-name>) to recover
In our case, a planner agent spawned 17+ hours ago was still showing in the UI with no way to dismiss it. The error message displayed: There's an issue with the selected model (inherit). It may not exist or you may not have access to it.
Root Cause
When a teammate is spawned via the Task tool without an explicit model parameter, the team config records "model": "inherit". This works while the parent session is alive — inherit resolves to the parent's model. When the parent session ends, inherit becomes an unresolvable string. The agent enters a state where:
- It cannot make API calls (model resolution fails)
- It cannot receive and process messages (processing requires an API call)
- It cannot be gracefully shut down (shutdown_response requires an API call)
TeamDeleterefuses to run ("active member(s) still present")- The agent is effectively bricked
Steps to Reproduce
- Start a Claude Code session
- Create a team:
TeamCreate - Spawn a teammate via
Taskwithteam_nameset but no explicitmodelparameter (config records"model": "inherit") - Let the teammate do some work (confirms
inheritresolves while parent is alive) - End the parent session (close terminal,
/clear, or let it time out) - Start a new session
- Observe: the teammate is still visible in the UI, stuck, showing model resolution error
- Attempt
SendMessageshutdown_request to the zombie → fails (cannot process) - Attempt
TeamDelete→ fails ("Cannot cleanup team with 1 active member(s)") - The agent is now permanently stuck. Only
rm -rf ~/.claude/teams/<team-name>recovers.
Expected Behavior
At minimum, one of these should work:
TeamDeleteshould force-cleanup teams with unresponsive members (with a warning, not silently)- Agents with unresolvable models should be automatically marked as dead and cleaned up
inheritshould be resolved to a concrete model string at spawn time and stored in the config, not deferred
Actual Behavior
The agent is permanently bricked. No Claude Code command can recover it. The user must know about ~/.claude/teams/ and manually delete files.
Environment
- Claude Code (CLI, macOS)
- macOS Darwin 25.3.0
- The zombie agent had
"model": "inherit"and"agentType": "Plan"in the team config - Parent session used Claude Opus 4.6
Workaround
rm -rf ~/.claude/teams/<team-name> ~/.claude/tasks/<team-name>
Then restart the Claude Code session. Obviously not discoverable by normal users.
Suggested Severity
This is a data-loss-adjacent reliability issue. In our session, the zombie agent from a previous cook (17 hours earlier) blocked team creation for a new session. The workaround required filesystem knowledge that most users won't have. Users who hit this without knowing the workaround are permanently locked out of the teams feature until they reinstall or find a forum post explaining the fix.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗