When people talk about multi-agent collaboration in Claude Code, the easiest two concepts to mix up are Subagents and Agent Teams. They both sound like “spin up several agents to work together,” but they are meant for different kinds of work. In short, the former is better for splitting off independent tasks, while the latter is better when several agents need to collaborate around the same problem and cross-check each other over time.
If you have used Skills before, this framing also helps:
- A Skill defines the workflow and rules
- A Subagent or Agent teammate does the actual execution
So the real question is not which one is “more advanced,” but what kind of collaboration problem you are solving.
Subagents: split off side tasks
Subagents are closer to temporary worker copies launched from the current session. Each one gets its own context window, and when it finishes, it returns only a summary of the result. The main conversation stays cleaner because it does not have to absorb all the intermediate logs and output.
That gives Subagents a few very practical strengths:
- The main thread stays clean instead of being flooded by test logs, search results, or long output
- Independent research or execution tasks can run in parallel
- They work well for tasks where “just bring me the result” is enough
The original article notes that Claude Code comes with three built-in kinds of Subagents:
Explore: read-only, useful for quickly searching a codebasePlan: read-only, useful for gathering information in the background during plan modeGeneral-purpose: can read and write, suitable for tasks that mix exploration and editing
Custom Subagents
If the built-in options are not enough, you can define your own Subagent. The mechanism is simple: write a Markdown file in one of these locations:
.claude/agents/: only active in the current project~/.claude/agents/: active across all your projects
The file format looks like this:
|
|
The key field here is description. Claude uses it to decide when this Subagent should be called, so the more precise the description is, the more reliable the trigger tends to be.
A few other common configuration fields are also worth knowing:
tools: limits which tools the Subagent can usemodel: chooses betweensonnet,opus,haiku, orinheritpermissionMode: controls edit permissions and permission prompt behaviormemory: gives the Subagent a cross-conversation memory directory
If you only need a Subagent temporarily, you can also define it through the CLI:
|
|
When Subagents fit best
Subagents are usually the best fit for tasks like these:
- Running tests and returning only the failure summary instead of flooding the main thread with thousands of log lines
- Investigating several unrelated modules in parallel
- Splitting “find the issue” and “fix the issue” into a simple pipeline
For example:
|
|
|
|
But if a task needs constant back-and-forth adjustments, shares a lot of context across stages, or concentrates changes in only one or two files, handling it directly in the main conversation is often simpler than spinning up a Subagent.
Agent Teams: multiple independent sessions working together
Agent Teams operate at a different level. Instead of launching worker copies inside one session, they start multiple fully independent Claude Code instances that collaborate around a shared task list and can also message one another directly.
That makes an Agent Team feel more like a real small team than a simple side-task worker setup.
The article notes that this is currently an experimental feature and needs to be enabled first:
|
|
Once this is added to settings.json, you can ask Claude to organize a team around a specific goal. For example:
|
|
What an Agent Team consists of
An Agent Team mainly includes three parts:
- Team lead: the main session you are using, responsible for organizing, assigning, and summarizing
- Teammates: multiple independent Claude Code instances
- Task list and Mailbox: the shared task list and communication channel
The biggest difference from Subagents is that teammates can communicate directly with one another instead of routing everything through the lead. Tasks usually move through states such as pending, in progress, and completed, and once a teammate finishes one task, it can pick up the next one.
When Agent Teams fit best
When a task needs several perspectives, active discussion, conflicting hypotheses, or parallel work across modules, Agent Teams are a better fit.
The article gives several representative examples:
- Several reviewers inspect the same PR in parallel, each focusing on a different dimension
- Multiple agents investigate the same bug with competing explanations and challenge each other’s conclusions
- Frontend, backend, and testing move forward in parallel on different parts of the project
For example, parallel code review:
|
|
And for debate-style debugging:
|
|
The common pattern here is that you do not just want one answer. You want several agents to exchange judgments, challenge assumptions, and gradually converge on a stronger conclusion.
How to choose between them
If you want a quick rule of thumb, use this:
- If you just need the result, use
Subagents - If the work requires discussion and cross-validation, use
Agent Teams
Expanded a bit further, the main differences are:
- Communication style:
Subagentsmainly report results back to the main session, whileAgent Teamsmembers can talk directly to one another - Coordination model:
Subagentsdepend more on the main conversation to orchestrate them, whileAgent Teamswork from a shared task list that members can claim themselves - Token cost:
Subagentsare cheaper, whileAgent Teamscost more because each teammate is an independent instance - Best-fit tasks:
Subagentsare better for independent, result-oriented work, whileAgent Teamsare better for discussion-heavy and cross-check-heavy work
Practical cautions
Agent Teams are more powerful, but that does not mean every task deserves a full team. The article specifically calls out a few practical concerns:
- token usage is noticeably higher
- if multiple teammates edit the same file at once, overwrite conflicts become very likely
- adding too many teammates increases coordination cost without guaranteeing better results
A safer default is usually:
- start with 3 to 5 teammates
- split tasks by module or file to avoid edit conflicts
- if the lead starts doing teammate work too early, explicitly tell it to wait for the others first
The current experimental version also has a few limitations, such as:
- no support for
/resumeand/rewindfor in-process teammates - task status can lag and sometimes needs manual correction
- one lead can manage only one team at a time
- teammates cannot spawn child teams of their own
Short conclusion
These two features are not substitutes for one another. They solve two different collaboration problems.
If your goal is “parallelize side tasks and keep the main context clean,” start with Subagents. If your goal is “let several agents work like a small team, discuss, and cross-check each other,” then Agent Teams are the better tool.
Trying both in a real task usually makes the distinction obvious very quickly: one is optimized for context isolation and result collection, and the other is optimized for multi-perspective collaboration and ongoing interaction.
Related links
- Original article: https://cloud.tencent.com/developer/article/2652960