# Subagents, workflows or agent teams: how to choose in Claude Code

Canonical URL: https://zero2vibecode.com/blog/subagents-workflows-agent-teams
Date: 2026-10-17
Tags: claude-code, agents, workflows

Claude Code has three ways to split work between workers: subagents, dynamic workflows and agent teams. The real difference is who holds the plan. Three questions, asked in order, tell you which one a task needs — and every step up costs more tokens.

Once you know Claude Code can hand work to other agents, it is tempting to reach for the biggest setup every time. More workers feels like more work done. In practice every extra worker is a separate context and a separate stream of requests, and the most common mistake is paying for a team when one conversation would have done.

This is the second post in a series on the [Claude Code: Pro Level](https://zero2vibecode.com/learn/claude-code-pro) course. It condenses three lessons: [choosing an orchestration pattern](https://zero2vibecode.com/learn/claude-code-pro/4-2-choosing-a-pattern), [dynamic workflows](https://zero2vibecode.com/learn/claude-code-pro/4-3-dynamic-workflows) and [agent teams](https://zero2vibecode.com/learn/claude-code-pro/4-4-agent-teams).

## Who holds the plan

All three patterns hand pieces of a task to workers. What separates them is **who holds the plan**:

| Pattern | Who holds the plan | How results come back |
|---|---|---|
| Main conversation | you and Claude, in one context | right in the conversation |
| Subagents | Claude, deciding turn by turn | each result returns to your conversation |
| Workflow | a script Claude wrote | the script keeps intermediate results; only the final one reaches the conversation |
| Agent team | a lead; teammates message each other directly | through the lead and the messages between teammates |

Agent teams are experimental and off by default. Keep that in mind before you plan around them.

## Three questions, in order

Each pattern beyond a single conversation adds cost: every subagent and every workflow agent sends its own requests, and a team uses noticeably more tokens than one session. So ask these in order and stop at the first yes:

1. **Can one conversation handle it without filling the context?** Then stay in the main conversation.
2. **Do the workers need to talk to each other?** Then an agent team.
3. **Do you need many agents, cross-checked findings or reruns?** Then a workflow. Otherwise, subagents.

## Subagents: a few independent errands

Say a newcomer needs two sentences about each of the `src`, `test` and `docs` folders. Doing it in one conversation would fill your context with files you will never need again. The three descriptions do not depend on each other, and you need them once. That is a subagent job:

```text
Explore the src, test and docs folders in parallel, with separate subagents, and give me two sentences about each.
```

In an interactive session, subagents run in the background by default and your input stays free. `/tasks` lists them with their state and model, and `Enter` on a row opens that subagent's transcript. Afterwards, `/usage` on Pro, Max, Team and Enterprise plans breaks down roughly how much went to subagents, skills, plugins and MCP servers — an estimate, not a bill.

If you want a record of who Claude actually started, the lesson shows a `SubagentStart` hook that appends each subagent's `agent_id` and `agent_type` to a log file. Hooks get their own post in this series.

## Workflows: when the plan should be code

A dynamic workflow is a JavaScript script that Claude writes for your task. The script launches the agents, keeps their results in its own variables and returns only the final answer to your conversation. The plan lives in code, not in Claude's head, which buys you three things: you can read it before it runs, have independent agents verify each other's findings, and save it to run again.

You ask for one simply by saying "workflow":

```text
use a workflow to audit every file under src/ for errors that are caught and then ignored, and adversarially verify each finding before reporting it
```

Before it runs, Claude Code shows the plan's phases and offers **Yes, run it**, **View raw script** or **No**. Choose **View raw script** or press `Ctrl+G` and actually read it: how many agents, what each does, whether any of them edit files. Inside the script, `agent()` starts one agent, `pipeline()` starts one per item in a list and `parallel()` starts a set at once.

While a run is going, `/workflows` lets you watch it: `p` pauses, `x` stops, `s` saves the script to `.claude/workflows/` (shared once you commit it) or `~/.claude/workflows/` (yours, in every project). A saved script runs as `/<name>` from the next session.

On the Pro plan, workflows stay off until you turn on the **Dynamic workflows** row in `/config`.

**Auto mode and workflows.** 
In auto mode, Claude Code asks only before the very first workflow run; that "Yes" is recorded in your user settings and later runs start without a question. Workflow agents follow your permission rules and run in the same mode as the session in accept-edits, auto and bypass. Stay in manual mode for any workflow you have not read yet, and try a new one on a small folder first.

To keep runs small, `/config workflowSizeGuideline=small` asks Claude to plan as few agents as possible. It is guidance, not a limit. Starting the session with `--model sonnet` also helps, since workflow agents use the session's model unless something else sets it.

## Agent teams: when the workers must argue

An agent team is several full Claude Code sessions. Yours is the lead; it spawns teammates, each with its own context, and they message each other directly. A teammate loads your CLAUDE.md, MCP servers and skills plus the task from the lead, but not the lead's conversation, so the task has to carry everything it needs.

The lesson recommends turning teams on per session rather than globally: a separate settings file with `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` set to `1` in `env`, started with `claude --settings`. Teammates can be built from your subagent definitions, and read-only reviewers with `tools: Read, Grep, Glob` are a good default.

Where a team earns its cost is a bug with an unknown cause: three teammates each own one hypothesis and challenge the others, and the lead records the explanation that survived. When they are done, stop them **by name** — a teammate whose row disappeared from the panel is hidden, not stopped.

**If you need parallel edits.** 
Teammates share your working folder; they are not in separate worktrees. Two teammates editing the same file will overwrite each other. If what you actually need is two sessions changing code side by side, read the previous post on [Claude Code worktrees](https://zero2vibecode.com/blog/claude-code-worktrees).

## A cheat sheet

| The task looks like | Start with |
|---|---|
| fits in one conversation | the main conversation |
| a few independent lookups, once | subagents |
| the same check across many files, verified, repeated | a workflow |
| independent views that must challenge each other | an agent team |

## Frequently asked questions

**What is the difference between a workflow and subagents?**

With subagents, Claude decides turn by turn whom to call, and every result comes back into your conversation. With a workflow, a script holds the plan, keeps the intermediate results to itself and returns only the final one. You can read, stop, save and rerun the script.

**How do I turn on agent teams?**

Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to 1. The lesson puts it in the env block of a separate settings file and starts the lead with claude --settings, so teams are on only for that session.

**Which pattern is the cheapest?**

The main conversation. Each step up the ladder adds requests: subagents and workflow agents send their own, and a team uses noticeably more tokens than a single session.

## Practice next

Each of the three lessons — [choosing a pattern](https://zero2vibecode.com/learn/claude-code-pro/4-2-choosing-a-pattern), [workflows](https://zero2vibecode.com/learn/claude-code-pro/4-3-dynamic-workflows) and [agent teams](https://zero2vibecode.com/learn/claude-code-pro/4-4-agent-teams) — has a practice terminal and a simulated session, so you can try the delegation log, a saved workflow script and a team settings file before spending real tokens on them.
