Claude Code Subagents vs Agent Teams vs Dynamic Workflows: Which Parallel Approach to Use
Claude Code runs parallel work five ways. Use subagents for side tasks inside one session, agent view to dispatch background sessions, agent teams when workers must talk to each other, dynamic workflows for dozens to hundreds of cross-checked agents, and Projects for cloud work spanning days.
Pick by who should hold the plan. If Claude should delegate side tasks and fold the results back into your conversation, use subagents. If you want to hand off independent tasks and check back later, use agent view. If the workers need to argue with each other and share a task list, use agent teams. If the job needs dozens or hundreds of agents checking each other's work, use a dynamic workflow. If the work runs for days and should keep going while your laptop is closed, use Projects. (Run agents in parallel)
This guide compares the five on coordination, location, status, limits, and cost, using Anthropic's current Claude Code documentation. For how to write subagent definition files, see our Claude Code subagent patterns guide; for why delegation saves context in the first place, see Claude Code context management.
Key Takeaways
- Five approaches, one question: who coordinates? Claude (subagents), you (agent view), a lead agent (agent teams), a script (dynamic workflows), or one ongoing cloud conversation (Projects).
- Subagents are the default tool. The built-in ones work with no setup, run inside your session, and return a summary; the depth limit is three layers and the concurrency limit is 20.
- Agent view is a research preview that runs background sessions on your machine, each moved into its own git worktree before it edits files.
- Agent teams are experimental and off by default. They are the only approach where workers message each other as a team, and they do not isolate teammates in worktrees.
- Dynamic workflows move the plan into code, scale to dozens or hundreds of agents per run, and are available on every paid plan.
- Projects is a public beta on Pro and Max that starts parallel threads in the cloud from one conversation.
- Every approach multiplies token use. Run the smallest one that fits the job.
The Short Answer
The approaches differ in who decides what runs next and where the workers live. Anthropic's own comparison frames the choice around three questions: who coordinates the work, whether the workers need to talk, and whether they edit the same files. (Run agents in parallel)
| Approach | Who coordinates | Where it runs | Status and plan | Use it when |
|---|---|---|---|---|
| Subagents | Claude, turn by turn, inside your session | Inside your current session | Built-in types registered by default in interactive sessions | A side task would flood your conversation with logs or file contents |
Agent view (claude agents) | You dispatch; each session works alone | Background sessions on your machine | Research preview | You have several independent tasks to hand off and check later |
| Agent teams | A lead session that assigns and supervises | Your terminal, in-process or in split panes | Experimental, disabled by default | Workers must share findings, challenge each other, and self-coordinate |
| Dynamic workflows | A JavaScript script Claude writes | In the background of your session | All paid plans; on Pro, turn on in /config | A job needs dozens to hundreds of agents or cross-checked results |
| Projects | Claude, from one ongoing conversation | The cloud, or your computer through Remote Control | Public beta on Pro and Max | Work spans days or weeks and should run while your machine is off |
The verdict: start with subagents. Move to agent view when you want to step away from the work, to a workflow when the agent count or the need for verification outgrows a single turn, and to agent teams only when the workers genuinely need to talk to each other. Projects is the choice when the work should not depend on your machine at all.
Subagents: Delegated Workers Inside One Session
A subagent is a worker Claude spawns inside your session. It does a side task in its own context window and returns only a summary, so search results and logs never enter your main conversation. (Run agents in parallel)
The limits that matter when you lean on them for parallel work:
- Nesting: by default a subagent can spawn its own subagents, up to three layers below the main conversation.
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTHchanges that, and1turns nesting off. (Create custom subagents) - Concurrency: when 20 subagents are running, spawning another fails with
Concurrent subagent limit reached.CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTSraises or lowers the limit on Claude Code v2.1.217 or later. (Create custom subagents) - No total cap: nothing limits how many subagents Claude spawns over a whole session. (Create custom subagents)
- Background by default: fork mode is on by default in interactive sessions on v2.1.232 or later, and where it is on, Claude Code runs the subagents Claude spawns in the background. (Create custom subagents)
- Isolation on request:
isolation: worktreein a subagent's frontmatter gives it a temporary git worktree branched from your default branch, cleaned up automatically if it changes nothing. (Create custom subagents)
Subagents return their results to the conversation that spawned them. Subagents that Claude named when it spawned them can message each other, but no lead or shared task list coordinates them the way a team has; the main conversation manages all of their work. That keeps your context clean and caps how far they coordinate on their own. For frontmatter fields, tool allowlists, and ten ready-made definitions, the subagent patterns guide goes deeper.
Forks: /subtask vs /fork
A fork is a subagent that inherits your entire conversation instead of starting fresh. Start one with /subtask; Claude also spawns forks itself where fork mode is on. The similarly named /fork does something else: it copies the whole session into a new background session that runs alongside yours. (Run agents in parallel)
| Command | What it starts | Result comes back |
|---|---|---|
/subtask <task> | A forked subagent with your full conversation history | As one message in your conversation |
/fork | A full copy of the session as a new background session | Nowhere automatically; it is a separate session |
/subtask requires Claude Code v2.1.212 or later; on v2.1.161 through v2.1.211 the fork command was /fork. With agent view turned off, /fork still starts the forked subagent and /subtask is not available. (Create custom subagents)
Forks are cheaper than a fresh subagent for tasks that need the same context, because a fork's first request reuses the parent's prompt cache. A fork cannot spawn further forks. (Create custom subagents)
Agent View: Background Sessions You Dispatch
Agent view, opened with claude agents, is one screen for every background session: what is running, what needs your input, and what is done. Each prompt you type there starts its own full Claude Code session that keeps running without a terminal attached. Agent view is a research preview. (Agent view)
You can also send a task straight to the background from your shell with claude --bg "<task>", and combine it with --agent to run one of your subagent definitions as the session's main agent. (Agent view)
What to know before you dispatch ten of them:
- Edits are isolated automatically. Before a dispatched session edits files, Claude moves it into its own git worktree under
.claude/worktrees/. (Agent view) - Quota scales with the session count. Running ten agents in parallel uses quota roughly ten times as fast as running one. (Agent view)
- Sessions are local. They survive sleep but stop if the machine shuts down. (Agent view)
- Sessions report only to you. Agent view sessions do not report to each other; use cross-session messaging if they need to pass findings. (Run agents in parallel)
To switch the feature off, set disableAgentView to true or set CLAUDE_CODE_DISABLE_AGENT_VIEW. (Agent view) Our Claude Code 2.1.142 coverage tracks the dispatch flags claude agents accepts.
Agent Teams: A Lead and Teammates That Talk
An agent team is a group of Claude Code instances: your session acts as the lead, assigns work, and synthesizes results, while teammates work in their own context windows and message each other directly. It is the only approach built around workers coordinating among themselves. (Agent teams)
Teams are experimental and disabled by default. Turn them on by setting CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 1 in your environment or in the env block of settings.json. Spawning teammates requires an interactive session; in -p mode and Agent SDK sessions, Claude does not spawn teammates. (Agent teams)
Turning teams on changes ordinary delegation too. While they are enabled, a subagent that Claude names launches as a teammate instead, so a team can form when you did not ask for one. Set the variable to 0 to make named subagents launch as subagents again. (Agent teams)
| Constraint | What it means for you |
|---|---|
| No worktree isolation | Partition the work so each teammate owns a different set of files (Run agents in parallel) |
| One team per session | You cannot create a second named team or share one across sessions |
| No nested teams | Teammates cannot spawn their own teammates; only the lead manages the team |
| Lead is fixed | The main session stays the lead for its lifetime |
| Resume gap | /resume and /rewind do not restore in-process teammates |
| Display modes | In-process works in any terminal; split panes need tmux or iTerm2 |
All rows except the first are from Anthropic's agent teams limitations. Anthropic's advice is to start a team on research and review work, such as a PR review or a bug investigation, before trying parallel implementation. (Agent teams)
Dynamic Workflows: A Script Holds the Plan
A dynamic workflow is a JavaScript script that orchestrates many subagents. Claude writes the script for your task and a runtime executes it in the background, so Claude's context holds only the final answer rather than every intermediate result. Anthropic sizes workflows at dozens to hundreds of agents per run. (Dynamic workflows)
Workflows are available on every paid plan, with Anthropic API access, and on Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry. On Pro, you turn them on from the Dynamic workflows row in /config. (Dynamic workflows)
Three ways to start one:
- Run the bundled one.
/deep-research <question>fans out web searches, cross-checks the sources, and returns a cited report. - Ask for one. Say "use a workflow" or include the keyword
ultracodein a single prompt. - Let Claude decide.
/effort ultracodehas Claude plan a workflow for every substantive task in the session.
The runtime limits: up to 16 agents run concurrently by default, set with CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS, and a single run can spawn 1,000 agents in total. Claude Code shows a Large workflow warning when a run schedules more than 25 agents or its projected token total passes 1.5 million. A stopped or paused run can be resumed in the same session, with completed agents returning their saved results. (Dynamic workflows)
Choose a workflow over subagents when the plan itself should be repeatable, or when you want agents to review each other's findings adversarially before you see them. /workflows lists running and finished runs and lets you save a run's script as your own command. (Dynamic workflows)
Projects: One Conversation, Parallel Cloud Threads
Projects is a single ongoing conversation at claude.ai/code or in the desktop app. Claude starts parallel sessions called threads, in the cloud or on your computer through Remote Control, gives each one the project's instructions, and shows you which ones need you. It is a public beta on Pro and Max. (Run agents in parallel)
Pick Projects when the work spans many tasks over days or weeks, should keep running while your machine is off, and you would rather describe it once than dispatch and track each session yourself. (Run agents in parallel) Our Projects launch coverage covers rollout, limits, and how threads reach your machine.
Do Your Workers Need to Talk to Each Other?
Only agent teams are designed for workers that talk to each other. Subagents report back to the conversation that spawned them, and agent view sessions report results only to you. For sessions you run yourself, including ones dispatched from agent view, cross-session messaging lets Claude pass findings between them. (Run agents in parallel)
| Approach | Results go to | Peer messaging |
|---|---|---|
| Subagents | The conversation that spawned them | Subagents Claude named when it spawned them can message each other |
| Agent view | You | Through cross-session messaging |
| Agent teams | The lead and each other | Built in, plus a shared task list for agents with the Task tools |
| Sessions you run yourself | You | Through cross-session messaging |
Cross-session messaging needs Claude Code v2.1.224 or later on macOS and Linux and v2.1.234 or later on native Windows, and is on with nothing to enable once a session meets those requirements. A message is plain text that one Claude writes to another, never the sender's history or files. (Cross-session messaging) Our cross-session messaging guide covers inbound controls and cross-machine delivery.
Do the Tasks Touch the Same Files?
If two workers edit the same files, isolate them with git worktrees. Subagents and sessions you run yourself can each use a separate worktree; agent view moves dispatched sessions into worktrees on its own; agent teams do not isolate teammates, so you partition the files instead. (Run agents in parallel)
| Approach | How edits are isolated |
|---|---|
| Your own sessions | claude --worktree <name> creates .claude/worktrees/<name>/ on a new branch named worktree-<name> (Worktrees) |
| Subagents | isolation: worktree in frontmatter (Create custom subagents) |
| Agent view | Automatic before the first edit (Agent view) |
| Agent teams | None; assign each teammate its own files (Run agents in parallel) |
For one large mechanical change, /batch packages this for you: it has Claude split the change into 5 to 30 worktree-isolated subagents. It is a packaged use of subagents and worktrees, not a separate coordination style. (Run agents in parallel) For non-git version control, a WorktreeCreate hook replaces the git logic; our Claude Code hooks guide covers hook events, including SubagentStart, SubagentStop, and TeammateIdle.
How to Check on Running Work
Each approach has its own status command, and two of them share a confusing name. (Run agents in parallel)
| Command | Where you run it | What it shows |
|---|---|---|
claude agents | Your shell | Agent view: every background session, its state, and which need your input |
/tasks | Inside a session | Everything running in the background of this session, including finished subagents; check on, attach to, or stop each |
/workflows | Inside a session | Running and completed workflow runs, the phase each is in, and how many agents have finished |
/agents | Inside a session | Only a notice pointing to the subagent file locations |
/agents and claude agents are separate features despite the name. (Run agents in parallel) On Claude Code v2.1.242 or later, /tasks also names the model each subagent is running on. (Create custom subagents)
What It Costs
Every approach multiplies token usage, because every worker is a Claude session sending its own requests. (Run agents in parallel) The approaches differ in how fast they multiply:
- Subagents cost less than agent teams, since only summaries return to your context; a fork costs less than a fresh subagent for tasks that need the same context, because it reuses the parent's prompt cache. (Agent teams; Create custom subagents)
- Agent view uses quota roughly in proportion to the number of sessions you run. (Agent view)
- Agent teams cost more than subagents because each teammate is a separate Claude instance. (Agent teams)
- Workflows can use meaningfully more tokens than doing the same task in conversation; try one on a small slice first. (Dynamic workflows)
To cap the model cost of subagents, teammates, and workflow agents, set CLAUDE_CODE_SUBAGENT_MODEL to a smaller model and CLAUDE_CODE_SUBAGENT_MODEL_FORCE to 1. Together they apply one model to every subagent, teammate, and workflow agent, on Claude Code v2.1.257 or later. Forks still run on the main conversation's model. (Create custom subagents) Agent view sessions are full sessions outside this setting: each new one uses the model shown in the agent view header. (Agent view)
Which One Should You Use?
Match the approach to the shape of the job, and step up only when the smaller tool runs out:
- Choose subagents for research, test triage, and reviews that should return a summary to the conversation you are in.
- Choose a fork with
/subtaskwhen the side task needs everything you have already discussed. - Choose agent view for a handful of independent tasks you want to hand off and check on between other work.
- Choose agent teams for competing-hypothesis debugging or a review where teammates should challenge each other, and only after you enable the experimental flag and split the files.
- Choose a dynamic workflow for a codebase-wide audit, a large migration, or research whose claims must be cross-checked.
- Choose Projects for a body of cloud work that runs over days without your machine.
Whatever you pick, the workers are always Claude sessions; to bring in another tool, expose it to Claude as an MCP server. (Run agents in parallel)
Sources
All pages checked October 9, 2026:
- Claude Code docs, "Run agents in parallel" (the five approaches, worktrees, cross-session messaging,
/batch, forks, status commands, token note): https://code.claude.com/docs/en/agents - Claude Code docs, "Create custom subagents" (depth and concurrency limits, fork mode,
/subtask,isolation, forced subagent model,/tasks): https://code.claude.com/docs/en/sub-agents - Claude Code docs, "Manage multiple agents with agent view" (
claude agents,claude --bg, worktree isolation, limitations, turning it off): https://code.claude.com/docs/en/agent-view - Claude Code docs, "Orchestrate teams of Claude Code sessions" (enabling teams, comparison with subagents, limitations): https://code.claude.com/docs/en/agent-teams
- Claude Code docs, "Orchestrate subagents at scale with dynamic workflows" (availability, ultracode,
/deep-research, runtime limits, cost): https://code.claude.com/docs/en/workflows - Claude Code docs, "Message your other Claude Code sessions" (version requirements, message content): https://code.claude.com/docs/en/cross-session-messaging
- Claude Code docs, "Run parallel sessions with worktrees" (
--worktree): https://code.claude.com/docs/en/worktrees
Read next
Related comparisons and guides- Claude Code
Claude Code Subagent Patterns: 10 Reusable Agent Definitions
A Claude Code subagent is a delegated worker with its own context window, defined as a markdown file with YAML frontmatter in .claude/agents/. Subagents can edit files when you grant Edit or Write, nest three layers deep by default, and run 20 at a time. These 10 definitions cover the highest-value delegations.
- Claude Code
Claude Code Sessions Can Now Message Each Other
Claude Code lets independent sessions discover and message one another. As of September 2026, a session can start a conversation with a session on the same machine, on another of your machines, or on Claude Code on the web; same-machine messaging works on macOS, Linux, WSL 2, and native Windows and on every provider. Messaging is on with nothing to enable, and incoming messages can be accepted, held, or refused per session.
- Claude Code
Claude Code Projects Turn One Conversation Into Parallel Cloud Sessions
Anthropic's redesigned Projects beta gives Claude Code one coordinating conversation that delegates work to parallel threads. Threads are usually cloud sessions, which Anthropic's docs now list as available, no longer in research preview, on Pro, Max, and Team and for eligible Enterprise seats. A project can also run a thread on your own machine through Remote Control.
- Claude Code
Master Claude Code's 1M Context Window: Rewind, Compact, Clear, and Subagents
Claude Code's 1M token context window opens longer autonomous sessions but introduces 'context rot' -- degraded performance as the window fills. Master four turn-end tools: /rewind to drop bad branches, /compact to summarize and continue, /clear to start fresh with a distilled brief, and subagents to wall off noisy work in their own context.
Frequently Asked Questions
What is the difference between subagents and agent teams in Claude Code?
Subagents are workers inside your session that return a result to the conversation that spawned them. Agent teams are separate Claude Code instances led by your session: teammates message each other directly and can share a task list. Teams cost more tokens because every teammate is a separate Claude instance.
How do I turn on agent teams in Claude Code?
Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 1 in your shell or in the env block of settings.json. Teams are experimental and off by default, and they need an interactive session. While they are on, a subagent Claude names launches as a teammate instead; set the variable to 0 to stop that.
Is /agents the same as claude agents?
No. Running claude agents from your shell opens agent view, the screen for dispatching and monitoring background sessions. Typing /agents inside a session only prints a reminder of where subagent files live, .claude/agents/ and ~/.claude/agents/. To check background work in the current session, use /tasks.
What is the difference between /subtask and /fork in Claude Code?
/subtask starts a forked subagent that inherits your whole conversation and sends back one result; it needs Claude Code v2.1.212 or later. /fork copies the whole session into a new background session that runs alongside yours. With agent view turned off, /fork starts the forked subagent and /subtask is unavailable.
Who can use Claude Code dynamic workflows?
Every paid plan, plus Anthropic API access, Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry. On Pro you turn them on from the Dynamic workflows row in /config. A single run can spawn up to 1,000 agents and runs up to 16 at once by default.
How many subagents can Claude Code run at once?
Twenty by default: spawning another while 20 are running fails until one finishes. CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS changes it on v2.1.217 or later. Subagents can nest three layers below your main conversation, and there is no limit on the total number spawned over a session.