How Dynamic Workflows Work
Dynamic workflows enable Claude Code to orchestrate hundreds of parallel AI subagents for complex engineering tasks. Instead of managing subagents turn by turn, Claude writes a JavaScript script that encodes the entire plan. A runtime executes this script in the background, keeping your session responsive. Script variables hold intermediate results, and only the final output is returned to Claude’s context.
The runtime supports up to 16 concurrent agents per session, with a total cap of 1,000 agents per workflow. Workflows are resumable if interrupted, and they can incorporate quality patterns such as independent agents adversarially reviewing each other’s findings before reporting results.
Use Cases and Availability
Dynamic workflows are ideal for codebase-wide migrations, security audits, bug sweeps, and research tasks requiring multi-angle analysis. Anthropic demonstrated a migration of a 750,000-line codebase in 11 days with a 99.8% test pass rate. Claude Code ships with a built-in /deep-research workflow that fans out web searches, cross-checks sources, and returns cited reports.
Users can trigger a workflow by including the word ‘workflow’ in their prompt, or enable ‘ultracode’ mode (/effort ultracode) for automatic workflow orchestration on every substantive task. CLI controls allow monitoring progress with /workflows, drilling into phases and agents, pausing and resuming runs, and saving successful workflows as reusable commands. Dynamic workflows are in research preview on Claude Code v2.1.154+ and available on all paid plans, via Anthropic API, Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry.
Source: Anthropic