Team agents fail to resolve 'inherit' model — stuck with invalid model ID

Resolved 💬 5 comments Opened Mar 5, 2026 by ors667 Closed Apr 13, 2026

Description

When spawning team agents via the Agent tool with a team_name parameter, the spawned agents get "model": "inherit" written into the team config (~/.claude/teams/<team-name>/config.json). The agents then try to use "inherit" as a literal model ID, which fails with:

There's an issue with the selected model (inherit). It may not exist or you may not have access to it. Run /model to pick a different model.

The team lead correctly gets the resolved model (e.g., claude-opus-4-6), but spawned agents never resolve inherit to the lead's model.

Reproduction

  1. Enable teams: "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" in ~/.claude/settings.json
  2. From a session running claude-opus-4-6, create a team and spawn an agent:

``
TeamCreate → team_name: "test-team"
Agent → team_name: "test-team", name: "worker", subagent_type: "Plan", prompt: "Hello"
``

  1. The spawned agent's tmux pane shows the model error immediately
  2. The team config confirms the issue:

``json
{
"members": [
{ "name": "team-lead", "model": "claude-opus-4-6" },
{ "name": "worker", "model": "inherit" }
]
}
``

Attempted Workarounds (none worked)

  • Setting "model": "claude-opus-4-6" in ~/.claude/settings.json — agents still get "inherit" from team config
  • Patching the team config JSON to replace "inherit" with "claude-opus-4-6" after spawn — agents read the config at startup, so the patch arrives too late
  • Sending /model claude-opus-4-6 via tmux — the agent is stuck in the error state and doesn't process slash commands
  • Using run_in_background: true — still spawns as a team agent with "inherit" when team_name is provided

Expected Behavior

Spawned team agents should resolve "inherit" to the team lead's model at startup, or the team config should be written with the resolved model ID instead of the literal string "inherit".

Environment

  • Claude Code v2.1.69
  • macOS Darwin 25.3.0
  • Model: claude-opus-4-6
  • Claude Max subscription

🤖 Generated with Claude Code

View original on GitHub ↗

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