[{"data":1,"prerenderedAt":54},["ShallowReactive",2],{"blog-claude-code-agent-teams":3,"blog-related-claude-code-agent-teams":36},{"slug":4,"title":5,"description":6,"category":7,"categoryId":8,"keyword":9,"date":10,"minutes":11,"body":12,"html":13,"headings":14},"claude-code-agent-teams","Claude Code agent teams: subagents, teammates, parallel sessions and hand-offs","Five ways to make several Claude Code agents work together, from subagents and the experimental agent teams to worktree sessions, scripts and agents that hand work to each other, with what each one does well and what it costs.","Agents & automation","agents-automation","claude code agent teams","2026-11-27",6,"\"Several agents working together\" covers five different setups in Claude Code, and they solve different problems. A subagent goes off, does one job and reports back. An agent team is a lead with teammates who message each other and share a task list. Parallel sessions are you running several Claudes at once, each on its own branch. Scripts chain Claude runs without anyone watching. And long-lived agents, each with a role, can hand work to each other over hours or days. This page explains each one, from Anthropic's docs as of November 27, 2026, and when to pick it.\n\n## Which approach fits which job?\n\n| | Who coordinates | Agents talk to each other | Lasts | Best for |\n| --- | --- | --- | --- | --- |\n| Subagents | The main session | No, they report back | One task | Searches, reviews, verbose work |\n| Agent teams | A lead session | Yes, by message | One session | A problem worth several angles at once |\n| Parallel sessions | You | No | Until you merge | Independent features on separate branches |\n| Scripts (`claude -p`, Agent SDK) | Your code | Through your code | One run | Pipelines, CI, batch jobs |\n| Agents that hand off | Each agent, or a manager | Yes, by handing work over | Days, weeks | Work with roles beyond one coding task |\n\n## Subagents: delegate and get a summary back\n\nA subagent is a second Claude with its own context window, its own instructions and its own tools. The main session hands it a job, it does the noisy part (forty files read, a long log), and only its summary comes back. You define one as a Markdown file in `.claude\u002Fagents\u002F`; Claude Code also has built-in ones such as Explore and Plan. Several can run at once (up to 20 by default), and each can work in its own worktree with `isolation: worktree`.\n\n**What it does well:** keeps your main conversation short, runs independent investigations in parallel, reviews code without the bias of having written it.\n\n**Where it stops:** subagents don't talk to each other or to you while they work. They see only the prompt Claude wrote them, not your conversation. If the job needs back-and-forth, it's the wrong tool.\n\nThe full guide, with an agent file to copy: [Subagents in Claude Code](\u002Fblog\u002Fclaude-code-subagents).\n\n## Agent teams: a lead and teammates who message each other\n\nAgent teams are Claude Code's own feature for this, and they're **experimental and off by default**. Turn them on with an environment variable, in your shell or in `settings.json` under `env`:\n\n```sh\nexport CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1\n```\n\nThen ask for a team in plain words (\"spin up three teammates: one on the API, one on the UI, one writing tests\"). According to the [agent teams page](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fagent-teams):\n\n- **The lead** is your session. **Teammates** are separate Claude Code instances, each with its own context.\n- **A shared task list** (in `~\u002F.claude\u002Ftasks\u002F`) holds the work, with locking so two teammates don't take the same task.\n- **Teammates message each other by name**, and you can message any of them directly. An idle teammate tells the lead.\n- **Display:** in-process by default, in any terminal; or one pane per teammate with tmux or iTerm2 (`teammateMode`).\n\n**What it does well:** problems that benefit from several angles at once and some debate: a bug with three plausible causes, a design reviewed from security, performance and API sides, a feature split cleanly by file.\n\n**Where it stops** (from the docs' own list):\n\n- Interactive sessions only: `claude -p` and the Agent SDK don't spawn teammates.\n- One team per session, no nested teams, and the lead can't change.\n- `\u002Fresume` and `\u002Frewind` don't bring in-process teammates back.\n- Teammates aren't put in worktrees, so split the work by file or they'll edit the same ones.\n- Task status can lag, and shutting a team down can be slow.\n\n**Cost:** every teammate is a full Claude Code session. Anthropic's [costs page](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcosts) says a team in plan mode uses about 7 times the tokens of a standard session, and suggests 3 to 5 teammates and Sonnet for them. On a Pro or Max plan, that's your [usage limits](\u002Fblog\u002Fclaude-code-usage-limits) going 7 times as fast.\n\n## Parallel sessions: you are the lead\n\nThe oldest way, and still the most predictable: open several Claude Code sessions, each on its own task, each in its own checkout.\n\n```sh\nclaude --worktree invoices    # its own branch and folder under .claude\u002Fworktrees\u002F\nclaude --worktree invites\n```\n\nNothing is shared but the repository, so nothing collides until you merge. Claude Code also has background sessions in research preview: `claude --bg \"task\"` starts one, and `claude agents` lists them all. For a large mechanical change, `\u002Fbatch` splits it across many subagents, each in its own worktree.\n\n**What it does well:** independent features, predictable cost (one session each), full control over what gets merged.\n\n**Where it stops:** the agents don't know about each other. Coordination is your job, and past four or five sessions the hard part is knowing which one is waiting for you. More in [running several Claude Code sessions at once](\u002Fblog\u002Frun-multiple-claude-code-sessions) and [git worktrees with Claude Code](\u002Fblog\u002Fclaude-code-git-worktrees).\n\n## Scripts: `claude -p` and the Agent SDK\n\nWhen the steps are known in advance, write them down. `claude -p \"…\"` runs one task without a conversation and prints the result (`--output-format json` for something a script can read), and `--resume \u003Cid>` continues a run. Chain them in a shell script or a CI job: one run finds the failing tests, the next fixes each, a third reviews the diff. The [Agent SDK](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fagent-sdk\u002Foverview) does the same from TypeScript or Python, with subagents.\n\n**What it does well:** repeatable pipelines, CI, overnight batches.\n\n**Where it stops:** it does exactly what you wrote. Anything unexpected ends the run or goes wrong quietly, so check the output. Note that the Agent SDK's docs ask third-party products to use an API key, not a claude.ai login. See [Claude Code headless mode](\u002Fblog\u002Fclaude-code-headless-mode).\n\n## Agents that hand work to each other\n\nThe four setups above live inside one coding task. A different kind of team lasts longer: agents with a role each (Marketing, Support, a changelog writer) that keep their memory, run on a schedule and pass work along. Claude ships a feature, the changelog agent writes the notes, Marketing drafts the post, and what only you can decide waits for you.\n\nWhat makes this work is the same as with people: one job per agent, a place to hand work over, and a rule for what needs a yes. We wrote about it in [running AI agents like a small company](\u002Fblog\u002Fai-agents-as-a-company).\n\n**What it does well:** work that spans days and goes beyond code: support mail, posts, numbers, follow-ups.\n\n**Where it stops:** it's slower than a team inside one session, and each agent's job has to be written down clearly, or they drift.\n\n## In Relais\n\nRelais covers the last three. **Parallel sessions:** every Claude Code session sits under its project, with an orange dot when one waits for you; \"Own worktree and branch\" gives a session its own checkout, merged back from its header. Subagents and background commands show in a Tasks tab with their live output and a stop button. **Agents that hand off:** you text agents like teammates, each with its role, routines and its own browser. They hand work straight into each other's conversation, a routine can start when another agent finishes, and your personal assistant routes jobs to the right agent and briefs you when your day starts. Deploys, money and anything sent out wait for your OK. See [agents](\u002Fagents) and [routines](\u002Ffeatures\u002Froutines).\n\nRelais runs Claude Code through the Agent SDK, so Claude Code's experimental agent teams don't start inside Relais sessions. Run them in a terminal.","\u003Cp>&quot;Several agents working together&quot; covers five different setups in Claude Code, and they solve different problems. A subagent goes off, does one job and reports back. An agent team is a lead with teammates who message each other and share a task list. Parallel sessions are you running several Claudes at once, each on its own branch. Scripts chain Claude runs without anyone watching. And long-lived agents, each with a role, can hand work to each other over hours or days. This page explains each one, from Anthropic&#39;s docs as of November 27, 2026, and when to pick it.\u003C\u002Fp>\n\u003Ch2 id=\"which-approach-fits-which-job\">\u003Ca class=\"anchor\" href=\"#which-approach-fits-which-job\" aria-label=\"Link to this section\">#\u003C\u002Fa>Which approach fits which job?\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>\u003C\u002Fth>\u003Cth>Who coordinates\u003C\u002Fth>\u003Cth>Agents talk to each other\u003C\u002Fth>\u003Cth>Lasts\u003C\u002Fth>\u003Cth>Best for\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Subagents\u003C\u002Ftd>\u003Ctd>The main session\u003C\u002Ftd>\u003Ctd>No, they report back\u003C\u002Ftd>\u003Ctd>One task\u003C\u002Ftd>\u003Ctd>Searches, reviews, verbose work\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Agent teams\u003C\u002Ftd>\u003Ctd>A lead session\u003C\u002Ftd>\u003Ctd>Yes, by message\u003C\u002Ftd>\u003Ctd>One session\u003C\u002Ftd>\u003Ctd>A problem worth several angles at once\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Parallel sessions\u003C\u002Ftd>\u003Ctd>You\u003C\u002Ftd>\u003Ctd>No\u003C\u002Ftd>\u003Ctd>Until you merge\u003C\u002Ftd>\u003Ctd>Independent features on separate branches\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Scripts (\u003Ccode>claude -p\u003C\u002Fcode>, Agent SDK)\u003C\u002Ftd>\u003Ctd>Your code\u003C\u002Ftd>\u003Ctd>Through your code\u003C\u002Ftd>\u003Ctd>One run\u003C\u002Ftd>\u003Ctd>Pipelines, CI, batch jobs\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Agents that hand off\u003C\u002Ftd>\u003Ctd>Each agent, or a manager\u003C\u002Ftd>\u003Ctd>Yes, by handing work over\u003C\u002Ftd>\u003Ctd>Days, weeks\u003C\u002Ftd>\u003Ctd>Work with roles beyond one coding task\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"subagents-delegate-and-get-a-summary-back\">\u003Ca class=\"anchor\" href=\"#subagents-delegate-and-get-a-summary-back\" aria-label=\"Link to this section\">#\u003C\u002Fa>Subagents: delegate and get a summary back\u003C\u002Fh2>\n\u003Cp>A subagent is a second Claude with its own context window, its own instructions and its own tools. The main session hands it a job, it does the noisy part (forty files read, a long log), and only its summary comes back. You define one as a Markdown file in \u003Ccode>.claude\u002Fagents\u002F\u003C\u002Fcode>; Claude Code also has built-in ones such as Explore and Plan. Several can run at once (up to 20 by default), and each can work in its own worktree with \u003Ccode>isolation: worktree\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>What it does well:\u003C\u002Fstrong> keeps your main conversation short, runs independent investigations in parallel, reviews code without the bias of having written it.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Where it stops:\u003C\u002Fstrong> subagents don&#39;t talk to each other or to you while they work. They see only the prompt Claude wrote them, not your conversation. If the job needs back-and-forth, it&#39;s the wrong tool.\u003C\u002Fp>\n\u003Cp>The full guide, with an agent file to copy: \u003Ca href=\"\u002Fblog\u002Fclaude-code-subagents\">Subagents in Claude Code\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"agent-teams-a-lead-and-teammates-who-message-each-other\">\u003Ca class=\"anchor\" href=\"#agent-teams-a-lead-and-teammates-who-message-each-other\" aria-label=\"Link to this section\">#\u003C\u002Fa>Agent teams: a lead and teammates who message each other\u003C\u002Fh2>\n\u003Cp>Agent teams are Claude Code&#39;s own feature for this, and they&#39;re \u003Cstrong>experimental and off by default\u003C\u002Fstrong>. Turn them on with an environment variable, in your shell or in \u003Ccode>settings.json\u003C\u002Fcode> under \u003Ccode>env\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"sh\">\u003Ccode>export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Then ask for a team in plain words (&quot;spin up three teammates: one on the API, one on the UI, one writing tests&quot;). According to the \u003Ca href=\"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fagent-teams\">agent teams page\u003C\u002Fa>:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>The lead\u003C\u002Fstrong> is your session. \u003Cstrong>Teammates\u003C\u002Fstrong> are separate Claude Code instances, each with its own context.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A shared task list\u003C\u002Fstrong> (in \u003Ccode>~\u002F.claude\u002Ftasks\u002F\u003C\u002Fcode>) holds the work, with locking so two teammates don&#39;t take the same task.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Teammates message each other by name\u003C\u002Fstrong>, and you can message any of them directly. An idle teammate tells the lead.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Display:\u003C\u002Fstrong> in-process by default, in any terminal; or one pane per teammate with tmux or iTerm2 (\u003Ccode>teammateMode\u003C\u002Fcode>).\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>What it does well:\u003C\u002Fstrong> problems that benefit from several angles at once and some debate: a bug with three plausible causes, a design reviewed from security, performance and API sides, a feature split cleanly by file.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Where it stops\u003C\u002Fstrong> (from the docs&#39; own list):\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Interactive sessions only: \u003Ccode>claude -p\u003C\u002Fcode> and the Agent SDK don&#39;t spawn teammates.\u003C\u002Fli>\n\u003Cli>One team per session, no nested teams, and the lead can&#39;t change.\u003C\u002Fli>\n\u003Cli>\u003Ccode>\u002Fresume\u003C\u002Fcode> and \u003Ccode>\u002Frewind\u003C\u002Fcode> don&#39;t bring in-process teammates back.\u003C\u002Fli>\n\u003Cli>Teammates aren&#39;t put in worktrees, so split the work by file or they&#39;ll edit the same ones.\u003C\u002Fli>\n\u003Cli>Task status can lag, and shutting a team down can be slow.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Cost:\u003C\u002Fstrong> every teammate is a full Claude Code session. Anthropic&#39;s \u003Ca href=\"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fcosts\">costs page\u003C\u002Fa> says a team in plan mode uses about 7 times the tokens of a standard session, and suggests 3 to 5 teammates and Sonnet for them. On a Pro or Max plan, that&#39;s your \u003Ca href=\"\u002Fblog\u002Fclaude-code-usage-limits\">usage limits\u003C\u002Fa> going 7 times as fast.\u003C\u002Fp>\n\u003Ch2 id=\"parallel-sessions-you-are-the-lead\">\u003Ca class=\"anchor\" href=\"#parallel-sessions-you-are-the-lead\" aria-label=\"Link to this section\">#\u003C\u002Fa>Parallel sessions: you are the lead\u003C\u002Fh2>\n\u003Cp>The oldest way, and still the most predictable: open several Claude Code sessions, each on its own task, each in its own checkout.\u003C\u002Fp>\n\u003Cpre class=\"code\" data-lang=\"sh\">\u003Ccode>claude --worktree invoices    # its own branch and folder under .claude\u002Fworktrees\u002F\nclaude --worktree invites\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Nothing is shared but the repository, so nothing collides until you merge. Claude Code also has background sessions in research preview: \u003Ccode>claude --bg &quot;task&quot;\u003C\u002Fcode> starts one, and \u003Ccode>claude agents\u003C\u002Fcode> lists them all. For a large mechanical change, \u003Ccode>\u002Fbatch\u003C\u002Fcode> splits it across many subagents, each in its own worktree.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>What it does well:\u003C\u002Fstrong> independent features, predictable cost (one session each), full control over what gets merged.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Where it stops:\u003C\u002Fstrong> the agents don&#39;t know about each other. Coordination is your job, and past four or five sessions the hard part is knowing which one is waiting for you. More in \u003Ca href=\"\u002Fblog\u002Frun-multiple-claude-code-sessions\">running several Claude Code sessions at once\u003C\u002Fa> and \u003Ca href=\"\u002Fblog\u002Fclaude-code-git-worktrees\">git worktrees with Claude Code\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"scripts-claude-p-and-the-agent-sdk\">\u003Ca class=\"anchor\" href=\"#scripts-claude-p-and-the-agent-sdk\" aria-label=\"Link to this section\">#\u003C\u002Fa>Scripts: \u003Ccode>claude -p\u003C\u002Fcode> and the Agent SDK\u003C\u002Fh2>\n\u003Cp>When the steps are known in advance, write them down. \u003Ccode>claude -p &quot;…&quot;\u003C\u002Fcode> runs one task without a conversation and prints the result (\u003Ccode>--output-format json\u003C\u002Fcode> for something a script can read), and \u003Ccode>--resume &lt;id&gt;\u003C\u002Fcode> continues a run. Chain them in a shell script or a CI job: one run finds the failing tests, the next fixes each, a third reviews the diff. The \u003Ca href=\"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fagent-sdk\u002Foverview\">Agent SDK\u003C\u002Fa> does the same from TypeScript or Python, with subagents.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>What it does well:\u003C\u002Fstrong> repeatable pipelines, CI, overnight batches.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Where it stops:\u003C\u002Fstrong> it does exactly what you wrote. Anything unexpected ends the run or goes wrong quietly, so check the output. Note that the Agent SDK&#39;s docs ask third-party products to use an API key, not a claude.ai login. See \u003Ca href=\"\u002Fblog\u002Fclaude-code-headless-mode\">Claude Code headless mode\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"agents-that-hand-work-to-each-other\">\u003Ca class=\"anchor\" href=\"#agents-that-hand-work-to-each-other\" aria-label=\"Link to this section\">#\u003C\u002Fa>Agents that hand work to each other\u003C\u002Fh2>\n\u003Cp>The four setups above live inside one coding task. A different kind of team lasts longer: agents with a role each (Marketing, Support, a changelog writer) that keep their memory, run on a schedule and pass work along. Claude ships a feature, the changelog agent writes the notes, Marketing drafts the post, and what only you can decide waits for you.\u003C\u002Fp>\n\u003Cp>What makes this work is the same as with people: one job per agent, a place to hand work over, and a rule for what needs a yes. We wrote about it in \u003Ca href=\"\u002Fblog\u002Fai-agents-as-a-company\">running AI agents like a small company\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>What it does well:\u003C\u002Fstrong> work that spans days and goes beyond code: support mail, posts, numbers, follow-ups.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Where it stops:\u003C\u002Fstrong> it&#39;s slower than a team inside one session, and each agent&#39;s job has to be written down clearly, or they drift.\u003C\u002Fp>\n\u003Ch2 id=\"in-relais\">\u003Ca class=\"anchor\" href=\"#in-relais\" aria-label=\"Link to this section\">#\u003C\u002Fa>In Relais\u003C\u002Fh2>\n\u003Cp>Relais covers the last three. \u003Cstrong>Parallel sessions:\u003C\u002Fstrong> every Claude Code session sits under its project, with an orange dot when one waits for you; &quot;Own worktree and branch&quot; gives a session its own checkout, merged back from its header. Subagents and background commands show in a Tasks tab with their live output and a stop button. \u003Cstrong>Agents that hand off:\u003C\u002Fstrong> you text agents like teammates, each with its role, routines and its own browser. They hand work straight into each other&#39;s conversation, a routine can start when another agent finishes, and your personal assistant routes jobs to the right agent and briefs you when your day starts. Deploys, money and anything sent out wait for your OK. See \u003Ca href=\"\u002Fagents\">agents\u003C\u002Fa> and \u003Ca href=\"\u002Ffeatures\u002Froutines\">routines\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>Relais runs Claude Code through the Agent SDK, so Claude Code&#39;s experimental agent teams don&#39;t start inside Relais sessions. Run them in a terminal.\u003C\u002Fp>\n",[15,18,21,24,27,30,33],{"id":16,"text":17},"which-approach-fits-which-job","Which approach fits which job?",{"id":19,"text":20},"subagents-delegate-and-get-a-summary-back","Subagents: delegate and get a summary back",{"id":22,"text":23},"agent-teams-a-lead-and-teammates-who-message-each-other","Agent teams: a lead and teammates who message each other",{"id":25,"text":26},"parallel-sessions-you-are-the-lead","Parallel sessions: you are the lead",{"id":28,"text":29},"scripts-claude-p-and-the-agent-sdk","Scripts: claude -p and the Agent SDK",{"id":31,"text":32},"agents-that-hand-work-to-each-other","Agents that hand work to each other",{"id":34,"text":35},"in-relais","In Relais",[37,43,48],{"slug":38,"title":39,"description":40,"category":7,"categoryId":8,"keyword":41,"date":42,"minutes":11},"ai-weekly-growth-report","A weekly growth report an AI agent writes for you","What a useful weekly growth report holds, where its numbers come from, how to tell a real change from noise, and how an AI agent can write it every Monday.","weekly growth report","2026-11-25",{"slug":44,"title":45,"description":46,"category":7,"categoryId":8,"keyword":47,"date":42,"minutes":11},"ai-agent-memory","AI agent memory: what to keep, where, and how much","How to give an AI agent a memory that works. The kinds of memory an agent needs, why plain files beat a vector database for most of it, what deserves a line, why a cap helps, and how it remembers further back.","ai agent memory",{"slug":49,"title":50,"description":51,"category":7,"categoryId":8,"keyword":52,"date":42,"minutes":53},"ai-agents-for-founders","AI agents for founders: hand off the other half of your product","Shipping is half of running a product. Posts, support, numbers and the inbox are the other half. Which jobs to give AI agents first, how to set them up, and what to keep.","ai agents for founders",4,1795902779163]