Agent Swarms - Multi-Agent Coordination #
What
Spawn and coordinate multiple AI agents working in parallel on a project. Teams have a 1:1 correspondence with task lists (Team = Project = TaskList).
Usage
# Create a team
claude
> Use TeammateTool with operation "spawnTeam" and team_name "my-project"
# Spawn teammates via the Task tool with team_name and name parameters
> Use Task tool to spawn a teammate named "researcher" for team "my-project"
Details
- Create teams with
spawnTeam operation - Teams automatically create corresponding task list directories at
~/.claude/tasks/{team-name}/ - Team configuration stored at
~/.claude/teams/{team-name}/config.json - Teammates can communicate via
write (single recipient) or broadcast (all teammates) - Graceful shutdown workflow with
requestShutdown → approveShutdown/rejectShutdown - Plan approval workflow for teammates:
approvePlan/rejectPlan - Cleanup team resources when done with
cleanup operation
Evidence
Ds7() at line 417104 (TeammateTool prompt, contains "# TeammateTool", "spawnTeam", "requestShutdown")
What
Agents can discover and request to join existing teams, with leaders approving or rejecting requests.
Usage
# Discover available teams
> Use TeammateTool with operation "discoverTeams"
# Request to join a team
> Use TeammateTool with operation "requestJoin", team_name "my-project", proposed_name "helper"
# Leader approves the request
> Use TeammateTool with operation "approveJoin", target_agent_id "helper", request_id "join-123"
Details
discoverTeams lists teams from ~/.claude/teams/ that you can joinrequestJoin sends a join request to the team leader- Leader receives
join_request message and uses approveJoin or rejectJoin - Configurable timeout for join requests (default 60 seconds)
Evidence
rY2() (requestJoin handler), oY2() (approveJoin handler), aY2() (rejectJoin handler) with operations "requestJoin", "approveJoin", "rejectJoin"
Task Tools for Shared Task Management #
What
New set of tools for creating and managing tasks that are shared across team members.
Usage
# Create a task
> Use TaskCreate with subject "Implement API endpoint" and description "Create the /users endpoint"
# List all tasks
> Use TaskList to see available tasks
# Update task status or ownership
> Use TaskUpdate with id "1" and status "in_progress" and owner "researcher"
# Get task details
> Use TaskGet with id "1"
Details
TaskCreate: Create new tasks with subject, description, and optional metadataTaskGet: Retrieve a task by IDTaskUpdate: Update task status, owner, description, or blocked_by relationshipsTaskList: List all tasks showing ID, status, owner, and subject- Tasks support dependency tracking with
blocks and blockedBy fields - When a task is completed, blocked tasks become unblocked
Evidence
Or7 at line containing "Create a new task in the task list", Xr7 (TaskCreate prompt), DD1 (TaskGet name), Lr7 (TaskUpdate description)
Native iTerm2 Split Pane Support for Teammates #
What
Teammates appear as split panes in iTerm2 on macOS, providing visual separation for each agent.
Usage
# Setup is prompted automatically when spawning teammates in iTerm2
# Requires it2 CLI tool installation via pip/pipx/uv
pip install it2
Details
- Automatic detection of iTerm2 environment
- Guided setup flow to install
it2 CLI tool - Split panes created for each teammate with color-coded borders
- Falls back to tmux if iTerm2 setup is not completed
- Option to prefer tmux over iTerm2 with
--teammate-mode tmux
Evidence
ITermBackend class with methods createTeammatePaneInSwarmView, isAvailable, contains "[ITermBackend] Creating pane", "iTerm2 Split Pane Setup", "✓ iTerm2 split pane support is ready"
In-Process Teammate Execution #
What
Spawn teammates within the same process instead of separate tmux panes, useful for non-interactive sessions.
Usage
# Automatically used in non-interactive sessions
# Can be explicitly requested with --teammate-mode in-process
claude --teammate-mode in-process
Details
- Teammates run as async tasks within the same process
- Enabled by default in non-interactive sessions
- Each teammate has its own abort controller for graceful shutdown
- Supports all the same operations as pane-based teammates
- Resource cleanup handled automatically
Evidence
InProcessBackend class at line 6920 with type = "in-process", "[InProcessBackend] spawn() called", "[InProcessBackend] Started agent execution"
Mailbox-Based Inter-Agent Communication #
What
Filesystem-based mailbox system for asynchronous communication between team members.
Details
- Each agent has an inbox at
~/.claude/teams/{team-name}/inboxes/{agent-name}.json - Messages include timestamp, sender, and content
- Automatic delivery of messages when agent turn ends
- Queued messages for busy agents delivered after their turn completes
- Supports permission requests/responses, shutdown requests, plan approvals
Evidence
TeammateMailbox functions writeToMailbox, readMailbox, markMessagesAsRead with logging "[TeammateMailbox] Wrote message to", "[TeammateMailbox] readMailbox"
New CLI Flags for Teammate Mode #
What
New command-line flags for configuring teammate spawning behavior.
Usage
claude --teammate-mode tmux # Force tmux backend
claude --teammate-mode in-process # Force in-process backend
claude --teammate-mode auto # Auto-select based on environment
# Used internally when spawning teammates:
claude --agent-id <id> --agent-name <name> --team-name <name>
claude --agent-color <color>
claude --plan-mode-required
claude --parent-session-id <id>
Details
--teammate-mode: Choose how teammates are spawned (tmux, in-process, auto)--agent-id, --agent-name, --team-name: Identity flags for teammate sessions--agent-color: Assign a color for the teammate's UI--plan-mode-required: Require plan approval before implementation--parent-session-id: Link to parent session for analytics
Evidence
CLI flag construction at lines 5617-5622, 7145-7193 with flags "--agent-id", "--agent-name", "--team-name", "--agent-color", "--plan-mode-required"
Git Worktree Support for Teammates #
What
Each teammate can work in their own git worktree for isolated file modifications.
Details
- Worktrees created automatically for teammates when needed
- Cleaned up via
git worktree remove or manual removal on cleanup - Supports parallel work on the same repository without conflicts
Evidence
removeWorktree() function with git worktree remove --force, "[TeammateTool] Removed worktree via git", worktreePath field in teammate objects
Enhanced Backend Registry for Pane Management #
The backend registry now intelligently selects the appropriate pane backend:
- Detects iTerm2 and checks for it2 CLI availability
- Prefers iTerm2 native split panes when available
- Falls back to tmux with informative messaging
- Supports user preference for tmux over iTerm2
Evidence
[BackendRegistry] Selected: iterm2 (native iTerm2 with it2 CLI), [BackendRegistry] Selected: tmux (fallback in iTerm2, it2 setup recommended)
New UI for viewing teammate status and activity:
- Shows teammate name, status (running/idle/awaiting approval), and progress
- Color-coded teammate indicators
- Idle time tracking
- Interactive controls: kill, shutdown, cycle mode, prune idle
Evidence
hs7() function (teammate preview component), "shift+↑/↓ to select teammate", "select · Enter view · k kill · s shutdown · p prune idle"
Slack MCP Tool Recognition #
Added recognition for Slack MCP tools to enable better integration with authenticated Slack access.
Evidence
"mcp__claude_ai_Slack__slack_send_message", "mcp__claude_ai_Slack__slack_read_thread", "mcp__slack__send_message", "mcp__slack__read_thread"
Remote IDE Server Path Handling #
Improved path handling for remote IDE server directories (.vscode-server, .cursor-server, .windsurf-server).
Evidence
Path checking includes ".vscode-server", ".cursor-server", ".windsurf-server" at line 1669-1674
First Render Timing Logging #
Added startup performance logging to track first ink render time.
Evidence
"[render] first ink render: ${Math.round(process.uptime() * 1000)}ms since process start"