<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Subagent on KnightLi Blog</title>
        <link>https://www.knightli.com/en/tags/subagent/</link>
        <description>Recent content in Subagent on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Wed, 22 Apr 2026 21:35:52 +0800</lastBuildDate><atom:link href="https://www.knightli.com/en/tags/subagent/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Claude Code Multi-Agent Collaboration: How to Choose Between Subagents and Agent Teams</title>
        <link>https://www.knightli.com/en/2026/04/22/claude-code-subagents-vs-agent-teams/</link>
        <pubDate>Wed, 22 Apr 2026 21:35:52 +0800</pubDate>
        
        <guid>https://www.knightli.com/en/2026/04/22/claude-code-subagents-vs-agent-teams/</guid>
        <description>&lt;p&gt;When people talk about multi-agent collaboration in Claude Code, the easiest two concepts to mix up are &lt;code&gt;Subagents&lt;/code&gt; and &lt;code&gt;Agent Teams&lt;/code&gt;. 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.&lt;/p&gt;
&lt;p&gt;If you have used Skills before, this framing also helps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Skill defines the workflow and rules&lt;/li&gt;
&lt;li&gt;A Subagent or Agent teammate does the actual execution&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the real question is not which one is “more advanced,” but what kind of collaboration problem you are solving.&lt;/p&gt;
&lt;h2 id=&#34;subagents-split-off-side-tasks&#34;&gt;Subagents: split off side tasks
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;Subagents&lt;/code&gt; 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.&lt;/p&gt;
&lt;p&gt;That gives Subagents a few very practical strengths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The main thread stays clean instead of being flooded by test logs, search results, or long output&lt;/li&gt;
&lt;li&gt;Independent research or execution tasks can run in parallel&lt;/li&gt;
&lt;li&gt;They work well for tasks where “just bring me the result” is enough&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The original article notes that Claude Code comes with three built-in kinds of Subagents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Explore&lt;/code&gt;: read-only, useful for quickly searching a codebase&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Plan&lt;/code&gt;: read-only, useful for gathering information in the background during plan mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;General-purpose&lt;/code&gt;: can read and write, suitable for tasks that mix exploration and editing&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;custom-subagents&#34;&gt;Custom Subagents
&lt;/h3&gt;&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.claude/agents/&lt;/code&gt;: only active in the current project&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.claude/agents/&lt;/code&gt;: active across all your projects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The file format looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;23
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;24
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;25
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;26
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;27
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;28
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;29
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;30
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;31
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;name: code-reviewer
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tools: Read, Grep, Glob, Bash
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;model: inherit
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;You are a senior code reviewer ensuring high standards of code quality and security.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;When invoked:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;1.&lt;/span&gt; Run git diff to see recent changes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;2.&lt;/span&gt; Focus on modified files
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;3.&lt;/span&gt; Begin review immediately
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Review checklist:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Code is clear and readable
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Functions and variables are well-named
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; No duplicated code
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Proper error handling
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; No exposed secrets or API keys
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Input validation implemented
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Good test coverage
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Performance considerations addressed
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Provide feedback organized by priority:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Critical issues (must fix)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Warnings (should fix)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Suggestions (consider improving)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Include specific examples of how to fix issues.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The key field here is &lt;code&gt;description&lt;/code&gt;. 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.&lt;/p&gt;
&lt;p&gt;A few other common configuration fields are also worth knowing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tools&lt;/code&gt;: limits which tools the Subagent can use&lt;/li&gt;
&lt;li&gt;&lt;code&gt;model&lt;/code&gt;: chooses between &lt;code&gt;sonnet&lt;/code&gt;, &lt;code&gt;opus&lt;/code&gt;, &lt;code&gt;haiku&lt;/code&gt;, or &lt;code&gt;inherit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;permissionMode&lt;/code&gt;: controls edit permissions and permission prompt behavior&lt;/li&gt;
&lt;li&gt;&lt;code&gt;memory&lt;/code&gt;: gives the Subagent a cross-conversation memory directory&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you only need a Subagent temporarily, you can also define it through the CLI:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;claude --agents &lt;span class=&#34;s1&#34;&gt;&amp;#39;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  &amp;#34;code-reviewer&amp;#34;: {
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    &amp;#34;description&amp;#34;: &amp;#34;Expert code reviewer. Use proactively after code changes.&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    &amp;#34;prompt&amp;#34;: &amp;#34;You are a senior code reviewer. Focus on code quality, security, and best practices.&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    &amp;#34;tools&amp;#34;: [&amp;#34;Read&amp;#34;, &amp;#34;Grep&amp;#34;, &amp;#34;Glob&amp;#34;, &amp;#34;Bash&amp;#34;],
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    &amp;#34;model&amp;#34;: &amp;#34;sonnet&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;}&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;when-subagents-fit-best&#34;&gt;When Subagents fit best
&lt;/h3&gt;&lt;p&gt;&lt;code&gt;Subagents&lt;/code&gt; are usually the best fit for tasks like these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Running tests and returning only the failure summary instead of flooding the main thread with thousands of log lines&lt;/li&gt;
&lt;li&gt;Investigating several unrelated modules in parallel&lt;/li&gt;
&lt;li&gt;Splitting “find the issue” and “fix the issue” into a simple pipeline&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Research the authentication, database, and API modules in parallel using separate subagents
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Use the code-reviewer subagent to find performance issues, then use the optimizer subagent to fix them
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id=&#34;agent-teams-multiple-independent-sessions-working-together&#34;&gt;Agent Teams: multiple independent sessions working together
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;Agent Teams&lt;/code&gt; 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.&lt;/p&gt;
&lt;p&gt;That makes an Agent Team feel more like a real small team than a simple side-task worker setup.&lt;/p&gt;
&lt;p&gt;The article notes that this is currently an experimental feature and needs to be enabled first:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Once this is added to &lt;code&gt;settings.json&lt;/code&gt;, you can ask Claude to organize a team around a specific goal. For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I&amp;#39;m designing a CLI tool that helps developers track TODO comments across
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;their codebase. Create an agent team to explore this from different angles: one
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;teammate on UX, one on technical architecture, one playing devil&amp;#39;s advocate.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;what-an-agent-team-consists-of&#34;&gt;What an Agent Team consists of
&lt;/h3&gt;&lt;p&gt;An Agent Team mainly includes three parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Team lead: the main session you are using, responsible for organizing, assigning, and summarizing&lt;/li&gt;
&lt;li&gt;Teammates: multiple independent Claude Code instances&lt;/li&gt;
&lt;li&gt;Task list and Mailbox: the shared task list and communication channel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The biggest difference from &lt;code&gt;Subagents&lt;/code&gt; is that teammates can communicate directly with one another instead of routing everything through the lead. Tasks usually move through states such as &lt;code&gt;pending&lt;/code&gt;, &lt;code&gt;in progress&lt;/code&gt;, and &lt;code&gt;completed&lt;/code&gt;, and once a teammate finishes one task, it can pick up the next one.&lt;/p&gt;
&lt;h3 id=&#34;when-agent-teams-fit-best&#34;&gt;When Agent Teams fit best
&lt;/h3&gt;&lt;p&gt;When a task needs several perspectives, active discussion, conflicting hypotheses, or parallel work across modules, &lt;code&gt;Agent Teams&lt;/code&gt; are a better fit.&lt;/p&gt;
&lt;p&gt;The article gives several representative examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Several reviewers inspect the same PR in parallel, each focusing on a different dimension&lt;/li&gt;
&lt;li&gt;Multiple agents investigate the same bug with competing explanations and challenge each other’s conclusions&lt;/li&gt;
&lt;li&gt;Frontend, backend, and testing move forward in parallel on different parts of the project&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, parallel code review:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Create an agent team to review PR &lt;span class=&#34;ni&#34;&gt;#142&lt;/span&gt;. Spawn three reviewers:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; One focused on security implications
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; One checking performance impact
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; One validating test coverage
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Have them each review and report findings.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And for debate-style debugging:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Users report the app exits after one message instead of staying connected.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Spawn 5 agent teammates to investigate different hypotheses. Have them talk to
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;each other to try to disprove each other&amp;#39;s theories, like a scientific
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;debate. Update the findings doc with whatever consensus emerges.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id=&#34;how-to-choose-between-them&#34;&gt;How to choose between them
&lt;/h2&gt;&lt;p&gt;If you want a quick rule of thumb, use this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you just need the result, use &lt;code&gt;Subagents&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If the work requires discussion and cross-validation, use &lt;code&gt;Agent Teams&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Expanded a bit further, the main differences are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Communication style: &lt;code&gt;Subagents&lt;/code&gt; mainly report results back to the main session, while &lt;code&gt;Agent Teams&lt;/code&gt; members can talk directly to one another&lt;/li&gt;
&lt;li&gt;Coordination model: &lt;code&gt;Subagents&lt;/code&gt; depend more on the main conversation to orchestrate them, while &lt;code&gt;Agent Teams&lt;/code&gt; work from a shared task list that members can claim themselves&lt;/li&gt;
&lt;li&gt;Token cost: &lt;code&gt;Subagents&lt;/code&gt; are cheaper, while &lt;code&gt;Agent Teams&lt;/code&gt; cost more because each teammate is an independent instance&lt;/li&gt;
&lt;li&gt;Best-fit tasks: &lt;code&gt;Subagents&lt;/code&gt; are better for independent, result-oriented work, while &lt;code&gt;Agent Teams&lt;/code&gt; are better for discussion-heavy and cross-check-heavy work&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;practical-cautions&#34;&gt;Practical cautions
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;Agent Teams&lt;/code&gt; are more powerful, but that does not mean every task deserves a full team. The article specifically calls out a few practical concerns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;token usage is noticeably higher&lt;/li&gt;
&lt;li&gt;if multiple teammates edit the same file at once, overwrite conflicts become very likely&lt;/li&gt;
&lt;li&gt;adding too many teammates increases coordination cost without guaranteeing better results&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A safer default is usually:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;start with 3 to 5 teammates&lt;/li&gt;
&lt;li&gt;split tasks by module or file to avoid edit conflicts&lt;/li&gt;
&lt;li&gt;if the lead starts doing teammate work too early, explicitly tell it to wait for the others first&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The current experimental version also has a few limitations, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;no support for &lt;code&gt;/resume&lt;/code&gt; and &lt;code&gt;/rewind&lt;/code&gt; for in-process teammates&lt;/li&gt;
&lt;li&gt;task status can lag and sometimes needs manual correction&lt;/li&gt;
&lt;li&gt;one lead can manage only one team at a time&lt;/li&gt;
&lt;li&gt;teammates cannot spawn child teams of their own&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;short-conclusion&#34;&gt;Short conclusion
&lt;/h2&gt;&lt;p&gt;These two features are not substitutes for one another. They solve two different collaboration problems.&lt;/p&gt;
&lt;p&gt;If your goal is “parallelize side tasks and keep the main context clean,” start with &lt;code&gt;Subagents&lt;/code&gt;. If your goal is “let several agents work like a small team, discuss, and cross-check each other,” then &lt;code&gt;Agent Teams&lt;/code&gt; are the better tool.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id=&#34;related-links&#34;&gt;Related links
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Original article: &lt;a class=&#34;link&#34; href=&#34;https://cloud.tencent.com/developer/article/2652960&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://cloud.tencent.com/developer/article/2652960&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
