Claude Code Agent Teams Collaboration Guide
Claude Code Agent Teams enables multiple Claude instances to collaborate in parallel on complex engineering tasks. One Lead Agent coordinates, multiple Teammate Agents execute subtasks in parallel — 3-5x efficiency gain.
Agent Teams vs Subagents
Two multi-agent modes for different scenarios — understand when to choose Agent Teams vs lightweight subagents.
| Dimension | Agent Teams | Subagents |
|---|---|---|
| Collaboration Mode | Multi-session parallel, Lead coordinates | Same-session sequential invocation |
| Scale | Large projects (>1000 line changes) | Small/medium tasks, quick delegation |
| Communication | Shared task list + mailbox messages | Direct function calls |
| Model Requirement | Lead requires Opus 4.6+ | Any model |
Collaboration Architecture
Lead Agent acts as project manager for task decomposition and result aggregation; Teammate Agents execute specific subtasks in parallel.
Lead (Coordinator)
Lead Agent (Opus 4.7)
Shared Task List
All agents read/write
Mailbox
Inter-agent messaging
Teammate 1
Frontend tasks
Teammate 2
Backend tasks
Teammate 3
Testing tasks
Lead Agent
The team's 'project manager', uses Opus 4.7, responsible for understanding requirements, decomposing tasks, assigning to Teammates, and aggregating results.
Teammate Agent
Dedicated agents executing specific subtasks, can use Sonnet 4.6 for cost savings. Upon completion, writes results to the shared task list.
Shared Task List
A structured task checklist shared by all agents. Lead creates tasks, Teammates claim and update status — coordination without conflicts.
Mailbox Communication
Async messaging system between agents for passing complex context, requesting clarification, or reporting intermediate results — avoiding direct call coupling.
Enable & Configure
Declare Agent Teams working mode in CLAUDE.md and Claude Code will automatically enable multi-agent collaboration in suitable scenarios.
Prerequisites
- Claude Code v2.1.32 or higher
- Lead Agent uses claude-opus-4-7 model
- QCode.cc API Key (supports Opus 4.7)
Using via QCode.cc
QCode.cc fully supports all models needed for Agent Teams (Opus 4.7 / Sonnet 4.6), with no limits on parallel multi-session requests.
CLAUDE.md Configuration Example
# CLAUDE.md — 启用 Agent Teams 模式
# 告知 Claude 允许启动多 Agent 协作
## Agent Teams 配置
- 复杂任务自动拆解为子任务
- 最多 5 个并行 Teammate Agent
- Lead Agent 使用 claude-opus-4-7
- Teammate Agent 使用 claude-sonnet-4-6
## 任务分配原则
- 前端/后端/测试可并行执行
- 需要共享上下文时通过 mailbox 通信
- 每个 Teammate 完成后更新共享任务列表
Custom Subagents (@ mention)
Claude Code v2.1.32+ supports defining and invoking expert subagents via @ syntax, giving every task type its own dedicated AI.
What are Custom Subagents
Create Markdown files in `.claude/agents/` to define dedicated roles, capability boundaries, and behavioral guidelines. When @ invoked, the subagent handles that task type with a specialized persona for more focused, professional output.
Usage Examples
@security-auditor
Focused security vulnerability auditing
@perf-optimizer
Performance bottleneck analysis and optimization
@doc-writer
API documentation and comment generation
Define a Custom Subagent
# .claude/agents/security-auditor.md
---
name: security-auditor
description: 专职安全审计 Agent,分析代码漏洞
model: claude-opus-4-7
tools: [read_file, bash]
---
你是一名资深安全工程师,专注于:
- OWASP Top 10 漏洞检测
- SQL 注入与 XSS 防护
- 认证与授权逻辑审查
- 依赖库安全扫描
收到代码后,输出结构化的漏洞报告。
10x Engineering Efficiency with Agent Teams
Register at QCode.cc for stable Opus 4.7 API proxy and unlock Agent Teams' full collaboration capabilities.