[Bug] Agent teams enabled but Agent tool has no `name` parameter, so teammates can't be spawned (2.1.295, macOS)
What happened
Agent teams is enabled, but the main agent can't spawn a teammate. The Agent tool schema the model receives has no name parameter (the only parameters are description, prompt, subagent_type, model, effort and isolation). No team-related tool appears in ToolSearch either. Every spawn starts a plain background subagent, which drops out of /tasks about 30 s after it finishes.
The docs (sub-agents.md "Subagent names", agent-teams.md) say a teammate is created by passing name on the Agent tool call when agent teams is enabled.
Repro
- Add to
~/.claude/settings.json:
``json``
"env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" }
- Restart Claude Code in an interactive session (fullscreen TUI).
- Confirm the flag is set:
echo $CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSprints1. - Ask Claude to spawn a teammate named
research-desk.
Expected: the Agent tool accepts name, and the agent launches as a teammate that stays in the agent panel.
Actual: the Agent tool has no name parameter, and the agent launches as an ordinary async subagent.
Environment
- Claude Code 2.1.295
- macOS (Darwin 24.6.0)
tui: "fullscreen", interactive session (not-por the SDK)- No project, local or managed settings override the flag (checked
.claude/settings*.jsonand/Library/Application Support/ClaudeCode/managed-settings.json) teammateModeis not set (default)
Also reported via /feedback.