Orchestrate subagents at scale with dynamic workflows changedworkflows
Nearest release: v2.1.283, published 5 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 26 Sep 2026 00:20 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 28 Sep 2026 23:37 UTC.
Upstream edited
Recorded here
Lines+41added
Lines−41removed
From line
14
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits39to this page, all time
The whole hunk
from line 14, old and new numbered
/
from line 14
1414
1515[Subagents](/docs/en/sub-agents), [skills](/docs/en/skills), [agent teams](/docs/en/agent-teams), and workflows can all run a multi-step task. The difference is who holds the plan:
1616
17| | Subagents | Skills | Agent teams | Workflows |
18| :------------------------------ | :----------------------------- | :--------------------------- | :------------------------------------- | :----------------------------------- |
19| What it is | A worker Claude spawns | Instructions Claude follows | A lead agent supervising peer sessions | A script the runtime executes |
20| Who decides what runs next | Claude, turn by turn | Claude, following the prompt | The lead agent, turn by turn | The script |
21| Where intermediate results live | Claude's context window | Claude's context window | A shared task list | Script variables |
22| What's repeatable | The worker definition | The instructions | The team definition | The orchestration itself |
23| Scale | A few delegated tasks per turn | Same as subagents | A handful of long-running peers | Dozens to hundreds of agents per run |
24| Interruption | Restarts the turn | Restarts the turn | Teammates keep running | Resumable in the same session |
17| | Subagents | Skills | Agent teams | Workflows |
18| :- | :- | :- | :- | :- |
19| What it is | A worker Claude spawns | Instructions Claude follows | A lead agent supervising peer sessions | A script the runtime executes |
20| Who decides what runs next | Claude, turn by turn | Claude, following the prompt | The lead agent, turn by turn | The script |
21| Where intermediate results live | Claude's context window | Claude's context window | A shared task list | Script variables |
22| What's repeatable | The worker definition | The instructions | The team definition | The orchestration itself |
23| Scale | A few delegated tasks per turn | Same as subagents | A handful of long-running peers | Dozens to hundreds of agents per run |
24| Interruption | Restarts the turn | Restarts the turn | Teammates keep running | Resumable in the same session |
2525
2626A workflow moves the plan into code. With subagents, skills, and agent teams, Claude is the orchestrator: it decides turn by turn what to spawn or assign next, and every result goes into a context window. A workflow script holds the loop, the branching, and the intermediate results itself, so Claude's context holds only the final answer.
2727
from line 69
6969
7070Claude Code includes `/deep-research` as a built-in workflow:
7171
72| Command | What it does |
73| :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
72| Command | What it does |
73| :- | :- |
7474| `/deep-research <question>` | Fans out web searches on a question across several angles, fetches and cross-checks the sources it finds, votes on each claim, and returns a cited report with claims that didn't survive cross-checking filtered out. Requires the [WebSearch tool](/docs/en/tools-reference#websearch-tool-behavior) to be available |
7575
7676`/deep-research` runs only when you invoke it.
from line 83
8383
8484The progress view shows each phase with its agent counts, token totals, and elapsed time. The footer lists the key for each action:
8585
86| Key | Action |
87| :------------- | :-------------------------------------------------------------------------------------------------------------------------- |
88| `↑` / `↓` | Select a phase or agent |
89| `Enter` or `→` | Drill into the selected phase, then into an agent's detail. In the detail, `Enter` expands or collapses it |
90| `Esc` or `←` | Back out one level. In v2.1.203 through v2.1.205, `←` didn't step back out of a phase or agent; use `Esc` on those versions |
91| `j` / `k` | Scroll within the agent detail when it overflows |
92| `f` | Filter the agent list in the selected phase by status. Press again to cycle |
93| `p` | Pause or resume the run |
94| `x` | Stop the selected agent, or stop the whole workflow when focus is on the run |
95| `r` | Restart the selected running agent |
96| `s` | [Save](#save-the-workflow-for-reuse) the run's script as a command |
86| Key | Action |
87| :- | :- |
88| `↑` / `↓` | Select a phase or agent |
89| `Enter` or `→` | Drill into the selected phase, then into an agent's detail. In the detail, `Enter` expands or collapses it |
90| `Esc` or `←` | Back out one level. In v2.1.203 through v2.1.205, `←` didn't step back out of a phase or agent; use `Esc` on those versions |
91| `j` / `k` | Scroll within the agent detail when it overflows |
92| `f` | Filter the agent list in the selected phase by status. Press again to cycle |
93| `p` | Pause or resume the run |
94| `x` | Stop the selected agent, or stop the whole workflow when focus is on the run |
95| `r` | Restart the selected running agent |
96| `s` | [Save](#save-the-workflow-for-reuse) the run's script as a command |
9797
9898The agent detail lists the agent's prompt, its recent tool calls, and its result. Each call shows its state, such as still running or failed. When the agent keeps a task list of its own, the detail shows it too, with each task's status.
9999
from line 172
172172
173173Whether you see this prompt depends on your [permission mode](/docs/en/permission-modes):
174174
175| Permission mode | When you're prompted |
176| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
177| Auto | First launch only. Any **Yes** records consent in your user settings, and later launches start without prompting. Skipped entirely when ultracode is on |
178| Manual, accept edits | Every run, unless you've selected **Yes, and don't ask again** for that workflow in this project |
179| Bypass permissions | Claude Code doesn't prompt you. The run starts immediately |
180| `claude -p`, Agent SDK | Claude Code doesn't prompt you |
175| Permission mode | When you're prompted |
176| :- | :- |
177| Auto | First launch only. Any **Yes** records consent in your user settings, and later launches start without prompting. Skipped entirely when ultracode is on |
178| Manual, accept edits | Every run, unless you've selected **Yes, and don't ask again** for that workflow in this project |
179| Bypass permissions | Claude Code doesn't prompt you. The run starts immediately |
180| `claude -p`, Agent SDK | Claude Code doesn't prompt you |
181181
182182In `claude -p` and the Agent SDK, Claude Code never shows this prompt. It runs the Workflow tool call through the same [permission evaluation](/docs/en/agent-sdk/permissions#how-permissions-are-evaluated) as the rest of the session, so deny rules, ask rules, and `dontAsk` mode apply to the launch as they apply to every tool call. To let the workflow start in these runs, use one of these:
183183
from line 353
353353
354354The runtime applies the following constraints:
355355
356| Constraint | Why |
357| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
358| No mid-run user input | A run pauses on its own only for agent permission prompts and a [usage-limit wait](#when-a-run-hits-your-usage-limit). For sign-off between stages, run each stage as its own workflow |
359| No direct filesystem or shell access from the workflow itself | Agents read, write, and run commands. The script coordinates the agents |
360| No module loading: a script that contains `import()` fails before the run starts | The script body is plain JavaScript. Put work that needs a library in an agent's task |
361| Up to 16 concurrent agents by default, fewer when Claude Code has fewer CPUs available, including inside a CPU-limited container. To change the limit, set [`CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS`](/docs/en/env-vars#variables) to a value from 1 to 256, which requires Claude Code v2.1.269 or later | Bounds local resource use |
362| In a fan-out, agents that share the first agent's prompt-cache prefix start up to 5 seconds after it by default | All but the first read the [prefix the first agent cached](#prompt-caching-in-a-fan-out) instead of each processing it uncached |
363| Up to 4,096 items in a single `parallel()` or `pipeline()` call: the runtime rejects a longer list with an error | A silent cap would drop part of the workload without telling the script |
364| 1,000 agents total per run | Prevents runaway loops |
356| Constraint | Why |
357| :- | :- |
358| No mid-run user input | A run pauses on its own only for agent permission prompts and a [usage-limit wait](#when-a-run-hits-your-usage-limit). For sign-off between stages, run each stage as its own workflow |
359| No direct filesystem or shell access from the workflow itself | Agents read, write, and run commands. The script coordinates the agents |
360| No module loading: a script that contains `import()` fails before the run starts | The script body is plain JavaScript. Put work that needs a library in an agent's task |
361| Up to 16 concurrent agents by default, fewer when Claude Code has fewer CPUs available, including inside a CPU-limited container. To change the limit, set [`CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS`](/docs/en/env-vars#variables) to a value from 1 to 256, which requires Claude Code v2.1.269 or later | Bounds local resource use |
362| In a fan-out, agents that share the first agent's prompt-cache prefix start up to 5 seconds after it by default | All but the first read the [prefix the first agent cached](#prompt-caching-in-a-fan-out) instead of each processing it uncached |
363| Up to 4,096 items in a single `parallel()` or `pipeline()` call: the runtime rejects a longer list with an error | A silent cap would drop part of the workload without telling the script |
364| 1,000 agents total per run | Prevents runaway loops |
365365
366366## Manage runs
367367
from line 431
431431
432432Each value maps to an agent count:
433433
434| Value | Agent count Claude aims for |
435| :------------- | :-------------------------------------------------- |
434| Value | Agent count Claude aims for |
435| :- | :- |
436436| `unrestricted` | No guideline: Claude sizes the workflow to the task |
437| `small` | Fewer than 5 agents |
438| `medium` | Fewer than 10 agents |
439| `large` | Fewer than 50 agents |
437| `small` | Fewer than 5 agents |
438| `medium` | Fewer than 10 agents |
439| `large` | Fewer than 50 agents |
440440
441441The default is `medium`, or `small` when you're signed in on a Pro plan with Claude Code v2.1.271 or later. Until you choose a value, the `/config` row marks the value as the default, and the workflow's `Running in background` line names the size in force. Requires Claude Code v2.1.219 or later; earlier versions default to `unrestricted`.
442442
No line in this hunk matches that.