DEV Community

Jovan Chan
Jovan Chan

Posted on • Originally published at aicoderscope.com

Claude Code Dynamic Workflows in 2026: Fan Out 1,000 Subagents, What It Costs, and When to Use It Over OpenCode or Cursor

This article was originally published on aicoderscope.com

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
Enter fullscreen mode Exit fullscreen mode

Check your version first so you're not debugging a feature that isn't there yet:

$ claude --version
2.1.186 (Claude Code)
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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?
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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

Top comments (0)