Claude Code Dynamic Workflows: One Prompt, Hundreds of Agents
Claude Code's dynamic workflows write their own orchestration script and fan work across tens to hundreds of background agents. Here's how to use them.
Anthropic shipped dynamic workflows in Claude Code, and they change what a single prompt can do. Instead of you wiring up subagents by hand, Claude writes a JavaScript orchestration script for the task you describe, then a runtime executes it in the background while your session stays responsive. You ask one question; tens to hundreds of agents go answer it in parallel.
This is different from the subagents you already know. A normal subagent is one helper you spawn for one job. A dynamic workflow is Claude deciding how many helpers the task needs, splitting the work, running it concurrently, checking the results, and folding everything back into one answer. You need Claude Code v2.1.154 or later, and it runs on every paid plan plus the API, Bedrock, Vertex AI, and Microsoft Foundry.
The Fastest Way to See One Run
Claude Code ships a built-in workflow called /deep-research. It investigates a question across many sources, spawns agents to read them, has other agents try to refute what the first ones found, and keeps iterating until the answers agree. Run it once and watch the agent count climb in the background — it's the clearest demo of the pattern.
/deep-research What changed in the React 20 concurrent rendering model, and which of our components break? While it works, your main session keeps going. Background workflows report progress and notify you when they finish, so you are not stuck staring at a spinner.
Triggering a Workflow on Your Own Task
You don't have to call a built-in command. Describe a job that obviously needs parallel work and ask Claude to build a workflow for it. The trigger is the scale of the request — sweeping a whole codebase, migrating hundreds of files, or drafting a plan from several independent angles before you commit.
Build a dynamic workflow that sweeps every file in src/ for missing
error handling on async calls. Run one agent per directory, have a
second pass verify each finding is real, and return only confirmed
issues grouped by severity. Turn on the ultracode setting if you want Claude to reach for workflows by default on substantial tasks. Leave it off when you want tight, single-thread control — workflows trade tokens for breadth, and not every task earns that trade.
Where the Parallelism Actually Pays
Most teams on real codebases run in the 10-to-100 concurrent agent range. Going to hundreds is possible but means watching rate limits closely. The pattern shines when the work is wide and independent: a codebase-wide bug sweep, a 500-file framework migration, a research question where sources need to be cross-checked against each other, or a hard architecture decision worth attacking from three independent angles before you pick one.
It does not shine on narrow, sequential work. If the task is 'fix this one function,' a workflow just burns tokens spinning up agents that have nothing to parallelize. Match the tool to the shape of the problem: wide and independent gets a workflow, narrow and linear gets a single thread.
Reading the Output Without Trusting It Blindly
The built-in verification step — agents refuting each other before findings reach you — cuts down on confident-but-wrong results, but it does not eliminate them. Treat a workflow's output the way you'd treat a fast junior team's: the breadth is real, the conclusions still need your eyes. Spot-check a few of the confirmed findings against the actual files before you act on the whole batch.
Key Takeaway
Dynamic workflows let one prompt fan out across tens to hundreds of background agents that split, verify, and reconcile the work. Use them for wide independent tasks like codebase sweeps and large migrations — not narrow sequential fixes.
Frequently Asked Questions
What version of Claude Code do I need for dynamic workflows?
Version 2.1.154 or later. They're available on all paid plans plus the Anthropic API, Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry.
How is a dynamic workflow different from a subagent?
A subagent is one helper you spawn for one job. A dynamic workflow is Claude writing a script that decides how many agents the task needs, runs them in parallel, verifies their results, and reconciles everything into a single answer.
How many agents can a workflow run at once?
Tens to hundreds. Most teams on real codebases stay in the 10-to-100 range; spawning hundreds works but requires careful rate-limit management.
Personalized for your role
Get Your AI Career Action Plan
Our AI Advisor builds you a personalized AI Readiness Score, skills gap analysis, and 30/60/90 day plan based on your specific role and experience.
Try the AI Advisor →Level up your AI coding every week
New tips, tool updates, and workflows every week. Stay ahead of what AI can do for your code.
We respect your privacy. No spam, ever.