[BUG] 2.1.178: Agent tool ignores team_name parameter (regression from 2.1.177)

Resolved 💬 1 comment Opened Jun 16, 2026 by xkam Closed Jun 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When a teammate is added to a team using Agent tool, the team name is ignored and the team name is auto-generated.

{
  "ts": "2026-06-16T06:02:40.478Z",
  "session_id": "82bc5809-e448-4532-9e1e-32b510d21885",
  "transcript_path": "...",
  "cwd": "...",
  "permission_mode": "bypassPermissions",
  "effort": { "level": "high" },
  "hook_event_name": "PostToolUse",
  "tool_name": "Agent",
  "tool_input": {
    "description": "Add qa teammate",
    "prompt": "Welcome to the team! ...",
    "subagent_type": "teammate",
    "run_in_background": true,
    "name": "qa",
    "team_name": "230-attachments-cleanup-flake"
  },
  "tool_response": {
    "status": "teammate_spawned",
    "prompt": "Welcome to the team! ...",
    "teammate_id": "qa@session-82bc5809",
    "agent_id": "qa@session-82bc5809",
    "agent_type": "teammate",
    "model": "claude-opus-4-8",
    "name": "qa",
    "color": "yellow",
    "tmux_session_name": "current",
    "tmux_window_name": "current",
    "tmux_pane_id": "%3",
    "team_name": "session-82bc5809",
    "is_splitpane": true,
    "plan_mode_required": false
  },
  "tool_use_id": "toolu_01MgFX3yPbRa3ojto6gP26x5",
  "duration_ms": 366
}

actual: "team_name": "session-82bc5809",
expected: "team_name": "230-attachments-cleanup-flake"

What Should Happen?

The teammate should be added to a team with the provided name. Here is the previous version behavior (2.1.177)

{
  "ts": "2026-06-15T19:32:28.025Z",
  "session_id": "9d318100-3ec5-48c4-856d-3bdeed3edb2b",
  "transcript_path": "...",
  "cwd": "...",
  "permission_mode": "bypassPermissions",
  "effort": { "level": "xhigh" },
  "hook_event_name": "PostToolUse",
  "tool_name": "Agent",
  "tool_input": {
    "description": "QA tester teammate",
    "prompt": "Welcome to the team! ...",
    "subagent_type": "teammate",
    "name": "qa",
    "team_name": "229-cli-ui-blank-webapp"
  },
  "tool_response": {
    "status": "teammate_spawned",
    "prompt": "Welcome to the team! ...",
    "teammate_id": "qa@229-cli-ui-blank-webapp",
    "agent_id": "qa@229-cli-ui-blank-webapp",
    "agent_type": "teammate",
    "model": "claude-opus-4-8",
    "name": "qa",
    "color": "yellow",
    "tmux_session_name": "current",
    "tmux_window_name": "current",
    "tmux_pane_id": "%3",
    "team_name": "229-cli-ui-blank-webapp",
    "is_splitpane": true,
    "plan_mode_required": false
  },
  "tool_use_id": "toolu_01SRxHfMrBFt1qd936y4Q98E",
  "duration_ms": 391
}

Error Messages/Logs

Steps to Reproduce

Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 flag
Call Agent tool adding a teammate to a team

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.177

Claude Code Version

2.1.178

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Related to: https://github.com/anthropics/claude-code/issues/68721

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗