Research Preview

Orchestrate Subagents
at Scale with Dynamic Workflows

Dynamic workflows orchestrate many subagents from a script Claude writes and you can rerun. Use them for codebase audits, large migrations, and cross-checked research.

Get Started with Workflows

When to Use a Workflow

Subagents, skills, agent teams, and workflows can all run a multi-step task. The difference is who holds the plan. Workflows move the plan into code.

Subagents
Skills
Agent Teams
Workflows
What it is
A worker Claude spawns
Instructions Claude follows
A lead agent supervising peers
A script the runtime executes
Who decides next
Claude, turn by turn
Claude, following the prompt
The lead agent, turn by turn
The script
Where results live
Claude's context window
Claude's context window
A shared task list
Script variables
Repeatable
The worker definition
The instructions
The team definition
The orchestration itself
Scale
A few per turn
Same as subagents
A handful of peers
Dozens to hundreds per run
Interruption
Restarts the turn
Restarts the turn
Teammates keep running
Resumable in same session

Run a Bundled Workflow

The quickest way to see a workflow in action is to run /deep-research, the built-in workflow Claude Code includes for investigating a question across many sources.

1

Run the workflow

Run /deep-research with a question you want investigated. It fans out web searches across several angles, fetches and cross-checks the sources it finds, and synthesizes a cited report.

2

Allow workflows

Claude Code asks whether to allow the workflow. Select Yes to continue. The exact prompt depends on your permission mode.

3

Watch progress

The run starts in the background. Run /workflows, use the arrow keys to select the run, and press Enter to open its progress view.

4

Read the report

When the run finishes, the report lands in your session. It cites the sources each claim came from, with claims that didn't survive cross-checking already filtered out.

Two Ways to Get a Workflow

You can have Claude write a workflow for your task in two ways, or run one you've already saved.

01

Ask for a workflow in your prompt

Include the word workflow anywhere in your prompt. Claude writes a workflow script for the task instead of working through it turn by turn. Press Option+W (macOS) or Alt+W (Windows/Linux) to dismiss the trigger for a single prompt.

02

Let Claude decide with ultracode

Set /effort ultracode and Claude plans a workflow for each substantive task. Ultracode combines xhigh reasoning effort with automatic workflow orchestration. It lasts for the current session and resets when you start a new one.

03

Save a workflow for reuse

When a run does what you wanted, press s in the /workflows view to save it as a command. Save to .claude/workflows/ in your project (shared with the team) or ~/.claude/workflows/ (personal use).

Watch the Run

Workflows run in the background so your session stays responsive. Run /workflows at any time to list running and completed workflows.

KeyAction
/ Select a phase or agent
Enter or Drill into the selected phase, then into an agent
EscBack out one level
pPause or resume the run
xStop the selected agent or the whole workflow
rRestart the selected running agent
sSave the run's script as a command

How a Workflow Runs

The workflow runtime executes the script in an isolated environment, separate from your conversation. Intermediate results stay in script variables instead of landing in Claude's context.

No mid-run user input

Only agent permission prompts can pause a run. For sign-off between stages, run each stage as its own workflow.

No filesystem or shell access

Agents read, write, and run commands. The script coordinates the agents — it does not access files or the shell directly.

Up to 16 concurrent agents

Fewer on machines with limited CPU cores. This bounds local resource use.

1,000 agents per run

Total agent cap per run prevents runaway loops.

Permission Modes

Whether you see a confirmation prompt depends on your permission mode.

Permission ModeWhen You're Prompted
Default, accept editsEvery run, unless you've selected "Yes, and don't ask again" for that workflow in this project.
AutoFirst launch only. Any "Yes" records consent in your user settings. Skipped when ultracode is on.
Bypass permissions, claude -p, Agent SDKNever. The run starts immediately.

Disable Workflows

Toggle dynamic workflows off in /config, set "disableWorkflows": true in settings, or use the admin settings page for your organization.

Frequently Asked Questions

Quick answers to the most common questions about Claude Code workflows.

What is a dynamic workflow?

A dynamic workflow is a JavaScript script that orchestrates subagents at scale. Claude writes the script for the task you describe, and a runtime executes it in the background.

What can I use workflows for?

Codebase-wide bug sweeps, 500-file migrations, research questions that need cross-checked sources, and plans worth drafting from several independent angles before committing.

How do I run a bundled workflow?

Run /deep-research with a question. It fans out web searches, cross-checks sources, and returns a cited report.

Can I save a workflow for reuse?

Yes. From the /workflows view, select the run and press s to save it as a reusable command.

How many agents can a workflow spawn?

Up to 16 concurrent agents and 1,000 total agents per run.

Can I resume a paused workflow?

Yes. Resume from /workflows by selecting it and pressing p. Cached results are reused for completed agents.

How do I turn workflows off?

Toggle Dynamic workflows off in /config, or set "disableWorkflows": true in your settings.

What's the difference vs subagents?

Workflows move the plan into code. With subagents, Claude decides turn by turn. With workflows, the script holds the loop, branching, and intermediate results.

Related Resources

Dig deeper into multi-agent orchestration with Claude Code.

Run Agents in Parallel

Compare subagents, agent view, agent teams, and workflows side by side.

Read More

Create Custom Subagents

The worker primitive that workflows orchestrate at scale.

Read More

Manage Costs

How multi-agent runs count toward usage limits and how to control spend.

Read More