Claude Code Dynamic Workflows in 2026: Fan Out 1,000 Subagents, What It Costs, and When to Use It Over OpenCode or Cursor
TL;DR: Dynamic Workflows let Claude Code write a JavaScript orchestration script that fans out up to 1,000 subagents — capped at 16 running at once — for tasks too big for one context window. It’s now on every paid plan (Pro included, via /config), not a Max-only preview. The catch is cost: a single large run can burn through a week’s Pro budget. Use it for repo-wide audits and migrations, not your daily edits.
| Claude Code Dynamic Workflows | OpenCode + Ollama | Cursor Agent Mode | |
|---|---|---|---|
| Best for | Repo-wide audits, large migrations, cross-checked research | Free, private, local parallel runs | Interactive multi-file edits you watch |
| Cost | Plan usage (Pro $20 → Max $200) or API metered | $0 (your own GPU) | Cursor Pro $20/mo flat |
| Scale | Up to 1,000 agents/run, 16 concurrent | Bounded by your VRAM and CPU | A handful of files per turn |
| The catch | One big run can drain your weekly cap | You manage the model and hardware | Not built for hundreds of files unattended |
Honest take: If you already pay for Claude Code, turn Dynamic Workflows on and reserve it for the jobs that genuinely don’t fit one agent — a security sweep across 400 files, a framework migration, a research question worth cross-checking. For everything you’d watch happen in the editor, stay in normal Claude Code or Cursor. Workflows are a power tool, not a default.
Anthropic shipped Dynamic Workflows alongside Claude Opus 4.8 in late May 2026, and the feature went generally available across the Claude Code CLI, the Desktop app, and the IDE extensions. The pitch is simple and the mechanics are not: instead of Claude spawning a subagent or two per turn and holding every result in its context window, Claude writes a script that holds the plan, runs the agents, keeps the intermediate results in script variables, and hands your conversation only the final answer.
That last detail is the whole point. A single Claude Code context can coordinate a few subagents before it starts dropping detail. A workflow can coordinate hundreds, because the orchestration lives in code the runtime executes in the background — not in the model’s attention.
What “dynamic” actually means here
You don’t write the script. You describe the task in plain language, Claude writes a JavaScript orchestration script for it, and a separate runtime executes that script while your session stays responsive. The script can loop, branch, fan work out in parallel, and — the part people underrate — run agents that adversarially review each other’s findings before anything gets reported back to you.
Compare the four ways Claude Code can run a multi-step task:
| Subagents | Skills | Agent teams | Workflows | |
|---|---|---|---|---|
| Who decides what runs next | Claude, turn by turn | Claude, per the prompt | A lead agent, turn by turn | The script |
| Where results live | Claude’s context | Claude’s context | A shared task list | Script variables |
| What’s 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 |
The repeatability row matters more than it looks. Because the orchestration is a script, you can save it, read it, diff it against last week’s run, and rerun it on a new branch. A code review you run on every PR becomes the same orchestration every time, not a fresh improvisation.
Turn it on (Pro users: read this first)
The single most common piece of stale advice already circulating is that Dynamic Workflows is a Max/Team/Enterprise research preview. As of the current docs, it is generally available on all paid plans, including Pro — you just have to enable it. It also works through the Anthropic API and on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry.
Requirements, verified June 2026:
- Claude Code v2.1.154 or later
- A paid plan (Pro, Max, Team, or Enterprise) or API access
On Pro, flip it on from the Dynamic workflows row in /config:
/config
# arrow down to "Dynamic workflows" → Enter to toggle on
Check your version first so you’re not debugging a feature that isn’t there yet:
$ claude --version
2.1.186 (Claude Code)
Anything below 2.1.154 and the trigger keyword silently does nothing. Update with your package manager (npm i -g @anthropic-ai/claude-code or your platform’s installer) before going further.
Triggering a run
There are three ways in, from least to most aggressive.
One task, on demand. Put the keyword ultracode at the front of a prompt. Claude highlights it and writes a workflow for that one task instead of working through it conversationally:
ultracode: audit every API route under src/routes/ for missing auth checks
Plain English works too — “use a workflow to…” or “run a workflow that…” is treated as the same opt-in. (Before v2.1.160 the literal keyword was workflow; both the keyword and natural-language requests work now.) If the highlight appears and you didn’t mean it, Option+W on macOS or Alt+W on Windows/Linux dismisses it for that prompt.
Every substantive task. /effort ultracode combines xhigh reasoning with automatic orchestration. With it on, Claude decides when a task warrants a workflow and may chain several in a row — one to understand the code, one to change it, one to verify. This burns tokens fast and lasts the whole session; drop back with /effort high when you return to routine work.
A saved or bundled workflow. Claude Code ships one built-in: /deep-research. It’s the cleanest way to see the machinery before you trust it with code.
/deep-research What changed in the Node.js permission model between v20 and v22?
It fans web searches across several angles, fetches and cross-checks the sources against each other, votes on each claim, and returns a cited report with the claims that didn’t survive cross-checking already dropped. You get a report, not a turn-by-turn transcript.
Approving and watching the run
The first time a workflow launches in a project, Claude Code shows you the planned phases and asks before running anything. You’ll see options like Yes, run it, Yes, and don’t ask again for this workflow in this project, View raw script, and No. Ctrl+G opens the script in your editor if you want to read the orchestration before committing tokens to it.
One security note worth internalizing: the subagents a workflow spawns always run in acceptEdits mode and inherit your tool allowlist, regardless of your session’s permission mode. File edits are auto-approved inside the run. Shell commands, web fetches, and MCP tools that aren’t on your allowlist can still prompt you mid-run — so on a long unattended run, add the commands the agents need to your allowlist first, or you’ll come back to a stalled workflow waiting on a permission dialog.
Once it’s going, /workflows is your control panel:
$ /workflows
# Running
# ▸ audit-api-routes Phase 2/3 Verify 24 agents 1.2M tok 3m41s
# Completed
# ▸ deep-research done Synthesis 9 agents 310K tok 2m08s
Arrow to a run, press Enter to drill into a phase, then into an individual agent to read its prompt, recent tool calls, and result. p pauses or resumes, x stops the selected agent or the whole run, and s saves the run’s script as a reusable /command. Saved workflows live in .claude/workflows/ (shared via the repo) or ~/.claude/workflows/ (just you), and accept input through an args global so you can pass a list of issue numbers or target paths at invocation time.
The real cost — and the mistake everyone makes once
This is where people get burned, so here are actual numbers.
A workflow spawns many agents, and every run counts toward your plan’s usage and rate limits like any other session. Every agent uses your session’s model unless the script routes a stage to a smaller one.
Work the math at the standard API rates, which are the clearest way to reason about it even if you’re on a subscription:
| Model | Input / M tokens | Output / M tokens |
|---|---|---|
| Opus 4.8 (standard) | $5 | $25 |
| Opus 4.8 (Fast mode) | $10 | $50 |
| Claude Fable 5 | $10 | $50 |
Say a repo-wide audit fans out 200 agents, and each reads ~40K tokens of code and writes ~3K tokens of findings. That’s 8M input + 600K output. On Opus 4.8 standard, roughly $40 input + $15 output ≈ $55 for one run. Swap in Fable 5 and you’re near $110. Now picture a migration that loops to 1,000 agents over a 100K-file codebase — you can see how a single command lands a bill that dwarfs a month of Cursor Pro.
On a subscription the dollars are hidden but the cap isn’t. Pro runs a rolling 5-hour window plus a weekly cap. Max 5x ($100/mo) gives roughly 88K tokens per 5-hour window; Max 20x ($200/mo) about 220K. A 1.2M-token workflow run will blow straight through a Pro window and eat meaningfully into a Max one.
The mistake everyone makes once: pointing a fresh workflow at the entire repo to “see what it finds.” Don’t. Run it on a slice first — one directory, one narrow question — watch the per-agent token counts in /workflows, and only then scale up. The 1,000-agent cap and 16-concurrent limit bound a runaway script, but they won’t save you from a deliberate-but-oversized run. And if you usually switch to a smaller model for routine work, check /model before a big run, because the workflow inherits whatever’s set.
A problem you’ll actually hit: the workflow stalled overnight
I kicked off a security audit with ultracode before leaving, came back, and /workflows showed it parked at 11% with one agent flagged. Drilling in (Enter on the run → Enter on the stuck agent) showed the agent had tried to run semgrep --config auto — a command not on my allowlist — and the run was waiting on a permission prompt nobody was there to answer.
The fix, in order of how often it works:
- Add the command to your allowlist before launching. For a known audit, allowlist
semgrep,rg,git, and whatever else the agents will reach for. This prevents the stall entirely. - Use
claude -por the Agent SDK for fully unattended runs. In non-interactive mode there’s no one to prompt, so tool calls follow your configured rules without blocking — but that also means you must trust the allowlist completely. - Resume instead of restarting. A stopped run resumes within the same session: completed agents return cached results, and only the rest run live. Press
pon the paused run, or ask Claude to relaunch from the same script. Note that if you exit Claude Code while a workflow is running, the next session starts it fresh — so don’t quit mid-run if you care about the work in flight.
That last constraint — resume only works within the same session — is the one to remember. Workflows are resumable, not durable across restarts.
When to reach for something else
Dynamic Workflows is the right tool for a narrow band of jobs. Outside that band, two alternatives are genuinely better.
OpenCode + Ollama wins when cost or privacy is the constraint. Running parallel agents against a local model on your own GPU costs nothing per token and never leaves your machine — the trade is that you manage the hardware and model quality, and a 7B–32B local coder won’t match Opus 4.8 on a gnarly migration. For the setup, see our OpenCode + Ollama local guide, and for the GPU side, runaihome.com’s local model VRAM guide.
Cursor Agent Mode wins when you want to watch the work and steer it. Cursor’s agent handles multi-file changes interactively at a flat $20/month, which makes it the better pick for the daily edits where you’re in the loop reviewing each diff. It’s not built to run hundreds of files unattended — that’s exactly the gap workflows fill.
A rough decision tree: a few files you’ll review → Cursor or normal Claude Code. Hundreds of files, one pass, you trust the result after the fact → Dynamic Workflows. Cost or data-privacy is the hard constraint → OpenCode on local Ollama. For coordinating multiple agents without the script abstraction, our parallel AI coding agents guide covers the manual approach, and the Claude Code review and power-user setup cover the tool itself.
FAQ
Is Dynamic Workflows free on the Pro plan?
The feature is available on Pro — you enable it in /config — but runs consume your normal plan usage. There’s no separate workflow fee; a big run just eats your token budget faster than a normal session.
How many agents can one workflow run? Up to 1,000 total per run, with at most 16 running concurrently (fewer on machines with limited CPU cores). The caps exist to bound runaway loops and local resource use.
Can I see the script Claude wrote?
Yes. Every run writes its script to a file under ~/.claude/projects/, and Claude gets the path when the run starts — just ask for it. You can read it, diff it against a previous run, edit it, and relaunch from the edited version. In the approval prompt, Ctrl+G opens it in your editor before you run.
Does it work without a subscription? Yes, through the Anthropic API and on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry. You pay per token at the model’s standard rate.
What’s the difference between this and /effort ultracode?
The ultracode keyword in a single prompt runs that one task as a workflow. /effort ultracode is a session-wide setting that makes Claude plan a workflow for every substantive task until you reset it. Use the keyword for one job; use the effort setting when an entire session is workflow-shaped.
How do I turn it off?
Toggle Dynamic workflows off in /config, set "disableWorkflows": true in ~/.claude/settings.json, or export CLAUDE_CODE_DISABLE_WORKFLOWS=1. Organizations can disable it in managed settings.
Sources
- Orchestrate subagents at scale with dynamic workflows — Claude Code Docs
- Claude Code Adds Dynamic Workflows for Parallel Agent Coordination — InfoQ
- Anthropic Ships Claude Opus 4.8 Alongside Dynamic Workflows, Capped at 1,000 Subagents — MarkTechPost
- Claude Opus 4.8 — Anthropic
- Pricing — Claude Platform Docs
- Use Claude Code with your Pro or Max plan — Claude Help Center
Last updated June 26, 2026. Pricing, plan limits, and feature availability change frequently; verify current state on the official pages before purchasing or relying on a run’s cost.
Was this article helpful?
Thanks for the feedback — it helps improve future articles.