Last updated: 2026-10-09

Dynamic Workflows in Claude Code

A dynamic workflow is a JavaScript script that Claude writes to run many subagents at once, and that you can reread and rerun. A runtime executes it in the background while your session stays responsive. It's Claude Code's tool for jobs too big for one conversation: codebase-wide bug sweeps, 500-file migrations, or research that should be cross-checked.

This page was rewritten on 2026-09-27

The earlier version described general "adaptive" prompting patterns, some with skills and tools that aren't part of Claude Code. Dynamic workflows are now a documented Claude Code feature, and this page follows that documentation.

Workflow, subagent, skill or agent team?

SubagentsSkillsAgent teamsWorkflows
What it isA worker Claude spawnsInstructions Claude followsA lead agent supervising peersA script the runtime executes
Who decides the next stepClaude, turn by turnClaudeThe lead agentThe script
ScaleA few tasks per turnSame as subagentsA handful of peersDozens to hundreds of agents per run
If interruptedRestarts the turnRestarts the turnTeammates keep runningResumable in the same session

Because the plan lives in code, a workflow can also enforce quality patterns, such as having independent agents review each other's findings before they're reported.

Try the bundled one

/deep-research What changed in the Node.js permission model between v20 and v22?
/workflows          # list runs; select one to see phases, agent counts, tokens and time

/deep-research searches from several angles, fetches and cross-checks sources, and returns a cited report with claims that didn't survive checking removed. Claims it couldn't verify are listed as unverified. Claude Code asks your permission before a workflow runs.

For your own task, ask Claude to write a workflow. Once a run does what you want, save it and it becomes a / command like the bundled one.

Availability and cost

  • All paid plans, the Anthropic API, Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry. On Pro, turn it on in the Dynamic workflows row of /config.
  • Many agents means many tokens. Watch the per-phase token totals in /workflows, and remember usage is shared with Claude and Cowork.
  • ultracode (/effort ultracode, or Tab in the /effort slider) makes Claude orchestrate workflows for substantive tasks automatically, at whichever effort level the session runs at; since Claude Code 2.1.284 it is a separate toggle and no longer forces xhigh. See effort levels.

Source: Claude Code docs: dynamic workflows. Checked 2026-10-09.

← Back to Claude Cowork FAQ · See also: Skills Guide · Setup Guide