← all video summaries
Claude Code

Claude Code Dynamic Workflows: When the Parallel-Agent Feature Is Worth the Bill

Dynamic workflows arrived with Claude Opus 4.8 — Claude writes a script that fans out dozens of agents in parallel. Here is where it sits next to skills, sub-agents, agent teams, and /goal, and how one prompt burned through half a $200 plan.

Watch on YouTube
TL;DR

The short version

  1. Dynamic workflows ship with Claude Opus 4.8 — Claude writes a JavaScript file that fans out many sub-agents in parallel, then merges their results back to the main session.
  2. The five primitives blur together but aren't interchangeable: skill = recipe, sub-agent = isolated side task, agent team = a crew that talks, /goal = a loop until done, workflow = a wide parallel job.
  3. /goal is depth (one agent looping until done = true); a workflow is width (50+ agents each doing one pass, no end-criteria check).
  4. Cost scales with how big a job you point it at — each agent is a full Claude call with its own context window. One unscoped desktop crawl ate half a $200/month plan in ~30 minutes.
  5. Ask one question: does this break into many independent pieces that can run at once? If not, a workflow is overkill — most knowledge work doesn't need it.

01 · The hook

A workflow audits every skill at once

The demo that opens the video: a dynamic workflow that read all 41 Claude Code skills, spun up one Haiku scoring agent per skill, then fed every score into a single Opus synthesis agent. Because the agents ran in parallel it finished fast, but it pulled a lot of input tokens — the rollup was billed at 5.33M while the raw re-read summed to 10.8M. Output was small, so it wasn't expensive. The result is an HTML scorecard ranking the skills worst to best with the single highest-value fix for each.

The output: 42 sub-agents (41 Haiku scorers + 1 Opus synthesizer), ~105 seconds wall-clock, 85 tool calls, skills ranked worst-to-best with a fix per row.00:00:24
Why the two token numbers differCache reads dominate because all 42 agents loaded the same large shared context. 5.33M is the engine's billed-equivalent rollup; 10.8M sums every cache re-read at full weight.

02 · The primitives

Five features that blur together

The reason workflows are confusing is that Claude Code already has sub-agents, agent teams, and /goal — they all feel similar. What actually changes between them is how many agents are in the loop and whether they can talk to each other. A skill is a reusable recipe. A sub-agent is a parallel worker with its own context window that talks back only to the main session, never to other sub-agents. An agent team is a crew that does talk to each other and shares a task list — closer to a group chat with roles, tools, and specializations. A workflow is Claude writing a script that runs many lone sub-agents and merges the results at the end.

Skill · Sub-agent · Agent Team · Workflow, side by side — the recipe analogy and whether each one talks to the others.00:02:20
The relationshipA skill is the how. A workflow is the how many — the width and depth of execution. A skill can nest inside a workflow, because each sub-agent can read and run your skills, hit your MCP servers, and use your API keys.

03 · The ladder

Who holds the plan

The separating question is who holds the plan. With normal Claude and sub-agents, the whole plan lives with Claude in the main session. With a workflow, Claude writes a JavaScript file and that is what executes and delegates — you describe the end goal, Claude builds the pipeline that runs it. Those workflow files can be saved and re-run later. Climbing the ladder — ask, skill, sub-agent, agent team, workflow — buys more functionality but also more risk, more autonomy, and more money.

The ladder: plain ask at the bottom, then skill, sub-agent, agent team, workflow at the top. "Default answer is not a workflow. Step up only when the rung below runs out of room."00:03:46
When the speaker reaches for itMost of his Claude Code use is automations and knowledge work, not building software — so he doesn't expect to use workflows much. The unscoped run that cost half his plan was a crawl across his entire desktop, every repo and local file, looking for an analysis.

04 · Depth vs width

/goal and workflow are opposites

The other confusion is /goal versus workflow. /goal is depth: one agent (sub-agents can still spin up) takes multiple turns and passes until done = true — you could leave it running 24 hours against a criterion. A workflow is width: many sub-agents each do one pass on different pieces, then everything synthesizes at the end. There's no endless loop checking a criterion — the agents execute a plan fixed from the start and shoot off their result.

/goal = DEPTH (a loop, "done = TRUE"); Workflow = WIDTH (50+ agents fanning out, merged once). "One agent, keeps going until done" vs "Many agents, all at once."00:09:00
What would be interesting is if you combine these two together — maybe a workflow within a /goal. But you'd want to be very careful about that level of autonomy, because it's powerful, and a great way to burn money.— Speaker

05 · The bill

Scope it or it gets expensive

Are workflows just a scheme to make you burn tokens? Probably not — there's real value, it's just a question of whether you actually need it, and a lot of the time it's overkill. The bill depends on how big a job you point it at: each agent is a full Claude call with its own window and its own context to read, and many get spun up. Most of the cost lands on input rather than output, but it still adds up. The fix is the same discipline as /goal — a vague request makes it loop or fan out forever.

"This is powerful. And a great way to burn money." The three rules: bound the scope, name the deliverable, put the workers on Haiku. Vague -> big bill; scoped -> pennies.00:11:00
  1. Bound the scopedon't point it at "everything" — name the exact target.
  2. Name the deliverablebe explicit about the output you want back.
  3. Put the workers on Haikuthe fan-out agents don't all need Opus.
  4. Read the script, then approveit shows you the plan before it runs.
/deep researchA built-in function that auto-invokes a workflow: it fans out parallel research agents, they vote on each claim, and you get a cited research report at the end. Worth testing if you do a lot of research.

06 · The run

The actual prompt, and where the files land

The real prompt: "Run a workflow that audits all of my Claude Code skills in two places — my user-level global skills and this project's skills," graded on clarity, frontmatter pass/fail, and trigger quality, with one final agent ranking every skill worst to best, all workers on Haiku. Claude asked permission before running — you can also view the raw script — and /workflows shows everything in flight: all 41 agents, their model, tokens used, tools, and runtime. One gotcha: by default the saved workflow files land in a global Claude Code directory, not your project, so you may have to tell it to save them into .claude/workflows.

The prompt running live in Claude Code on Opus 4.8, extra-high effort — the full audit instruction with grading criteria and the worst-to-best ranking step.00:12:27
UltraCode and /effort/effort offers low, medium, high, extra-high, max — plus UltraCode, which is extra-high reasoning plus workflows by default. On that mode Claude bypasses a lot of permission prompts and just starts orchestrating, so it's the most expensive setting. Typing "workflow" in a prompt highlights in rainbow but doesn't auto-invoke one; the reliable trigger is "set me up a dynamic workflow to do this."

07 · The decision rule

The whole thing on one slide

The takeaway is a routing table, not a mandate to use the newest feature. Knowing what a feature does and when it beats the alternatives is separate from needing to use it daily — the test is whether it solves a pain point you have right now.

The full decision rule, top to bottom.00:15:30
Quick thing

just ask Claude Code.

Something you repeat

use a skill.

Messy side task

use a sub-agent.

A crew that talks together

use an agent team.

Keep going until a criterion is met

use /goal.

A giant parallel job

use a dynamic workflow — carefully.

Connect your data

MCPs, CLIs, and API endpoints plug into any of them.