In short.
This is Anthropic's documentation page for Claude Code dynamic workflows. It is aimed at developers who need Claude to coordinate dozens to hundreds of subagents on tasks such as codebase audits, large migrations and cross-checked research. The main catch is that runs can use meaningfully more tokens than an ordinary conversation, and the page gives no dollar costs. A dynamic workflow is a JavaScript script that Claude writes for the task you describe. A runtime executes it in the background while the session stays responsive. Intermediate results stay in script variables, so Claude's context holds only the final answer. The page documents the bundled /deep-research command, two ways to request a workflow (the ultracode keyword or /effort ultracode), the approval prompt in each permission mode, saving a run as a reusable command, passing input through args, resume and stall behaviour, runtime limits, cost controls and how to disable the feature. All of this is the vendor's own description. The page includes no measurements, so how well workflows perform, what they cost in practice and how reliable they are remain unverified.
Researched and written by an AI model and checked by a second AI model. How it works
Scope is the complete text of the single page at [https://code.claude.com/docs/en/workflows.md], in the version captured on 12 November 2026. Linked materials are excluded, including the documentation index at [https://code.claude.com/docs/llms.txt] and the linked pages on subagents, skills, agent teams, permissions, the settings reference, environment variables, model configuration, plugins and the Agent SDK reference; anything those pages define is outside this scope. The page states no licence or reuse terms for itself, and no separate licence notice accompanies it, so reuse rights are unknown. The workflow behaviour, performance, real-world cost and accuracy of the vendor's claims described on the page are untested and unverified.
The overview
What this resource is
The resource is a single documentation page titled Orchestrate subagents at scale with dynamic workflows, published on Anthropic's Claude Code documentation site at [https://code.claude.com/docs/en/workflows.md]. It describes a Claude Code feature, not a downloadable package. A dynamic workflow is a JavaScript script that orchestrates many subagents at once. Claude writes the script for the task you describe, and a runtime runs it in the background.
The page fits best under learning resources because it teaches how to use and manage the feature. It also documents a bundled command (/deep-research) and the shape of saved workflow files, but apart from one short illustrative example it does not ship any workflow code.
Overall assessment
As documentation, the page is detailed and specific. It gives concrete numbers (concurrency, agent and item caps, warning thresholds, retry counts), exact names for commands and settings, and version markers for several behaviours. It reads as a complete reference for the feature from the user's side. It is also open about trade-offs, for example that ultracode makes each request use more tokens and take longer.
The page has limits as a source. It is the vendor's own documentation, so claims such as getting a more trustworthy result than a single pass are the vendor's statements. The page offers no benchmark or measured comparison. As a result, how well workflows perform, what they cost in practice and how reliable the resume and stall behaviour is are all unverified.
Who it is for
The page is for people already using Claude Code who face work too large for one conversation. Its examples are a codebase-wide bug sweep, a 500-file migration, research that needs sources cross-checked, and a hard plan drafted from several independent angles. It also suits teams who want orchestration written down as a script they can read, diff, save to a repository and rerun.
A beginner can follow the quick start without writing code, because Claude writes the scripts: run /deep-research with a question, approve it, watch /workflows and read the report. Experienced developers get the script functions, limits and resume rules. The feature is a poor fit for someone who only needs a few delegated tasks per turn, which is the scale the page gives for plain subagents and skills. It is also a poor fit for work that needs sign-off between stages, because the runtime takes no user input mid-run.
What it can do
According to the page, a workflow can run dozens to hundreds of agents per run and hold loops, branching and intermediate results in script variables. It can also apply quality patterns, such as having independent agents adversarially review each other's findings, or drafting a plan from several angles and weighing them against each other. The example prompts cover auditing every route handler for missing authentication checks, fixing type-check errors until the check passes or stops making progress, migrating components in isolated copies, reviewing every changed file in a pull request and merging the findings into one ranked summary, researching a topic across many sources, and hunting for flaky tests until new rounds find nothing new.
The bundled /deep-research command fans out web searches across several angles, fetches and cross-checks the sources, votes on each claim, and returns a cited report with claims that failed cross-checking filtered out. If the verifier agents could not check a claim, for instance after a rate limit or API error, the report lists it as unverified rather than refuted.
For day-to-day use, you can watch runs in /workflows, where you can pause, resume, stop, restart an agent, filter and save. You can save a run as a project or personal command, pass structured input through the args global, and distribute workflows inside a plugin, where they are namespaced by the plugin name. Stalled agents and usage-limit pauses are handled automatically under conditions the page lists.
Using it
Requirements
The page states that dynamic workflows are available on all paid plans, with Anthropic API access, and on Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry. On the Pro plan you turn them on from the Dynamic workflows row in /config. /deep-research also requires the WebSearch tool to be available.
Several behaviours depend on Claude Code versions named on the page. The /workflow-authoring skill needs v2.1.248 or later. Raising the concurrency cap with CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS needs v2.1.269 or later. Automatic pausing at a usage limit needs v2.1.271 or later (v2.1.319 or later in the Desktop Code tab). Rerunning agents that failed at a usage limit while keeping saved results needs v2.1.318 or later. A fix that stops completed agents rerunning when an unedited script is relaunched arrived in v2.1.305. /effort ultracode behaved differently before v2.1.284. The page does not state a minimum Claude Code version for the feature as a whole, or exact plan limits.
The agents use your existing permission rules, so add the tools they need to your allow rules to avoid prompts during a long run.
How it works
The runtime executes the script in an isolated environment, separate from the conversation. The script body is plain JavaScript with top-level await. agent() starts one subagent, pipeline() runs one agent per item in a list, parallel() runs a set of agent tasks at the same time and waits for all of them, phase() groups agents under a title in the progress view, log() shows a message, and the args global carries input. A saved file begins with an exported meta object holding a name and description. These must be literal values, or the command is dropped from autocomplete.
An agent() call can take a schema so the subagent returns JSON in that shape. Claude Code checks the schema before starting and fails the call if it can prove the schema contradicts itself. If the output still fails validation after five attempts, the call fails; MAX_STRUCTURED_OUTPUT_RETRIES changes that count. An agent that is stopped or hits an unrecoverable API error resolves to null, and pipeline() keeps the null in its results.
The script itself has no direct filesystem or shell access and cannot load modules: a script containing import() fails before the run starts. Agents do the reading, writing and command running. Date.now(), Math.random() and a no-argument new Date() throw errors, so that a relaunched run repeats the same agent calls. The runtime records each agent's result, which makes a run resumable within the same session. On relaunch, completed agents return their saved results up to the first agent whose prompt differs, and from that point later agents run again.
Agents in the same run can share prompt-cache prefixes. The page says a workflow agent's cache holds for five minutes by default, including on a Claude subscription, and that setting subagentPromptCacheTtl to 1h keeps it for an hour. The page attributes the higher charge for one-hour cache writes to API billing (the API bills them at a higher rate); it does not say that subscription users pay that rate. When a fan-out starts several matching agents, Claude Code holds back all but the first for up to 5000 ms by default, so the later ones can read the first agent's cache.
Setup and getting started
The page's quick start has four steps: run /deep-research with a question, allow the workflow when asked, open /workflows to watch phases and agent counts (or use the task panel under the input box), and read the report when it finishes. For your own task, ask in plain words (for example, use a workflow) or include the ultracode keyword in a prompt you type yourself. Another option is to set /effort ultracode, or start with claude --effort ultracode, so that Claude plans a workflow for each substantive task in the session. The launch flag also sets the effort level to xhigh.
In the CLI, the approval prompt shows the planned phases and four options: Yes, run it; Yes, and don't ask again for that workflow in that project; View raw script; and No, which cancels. Ctrl+G opens the script in your editor. The don't-ask-again option is offered only when you run a bundled, saved or plugin workflow by name, not for a script Claude has just written for the current task. In the Desktop app, an approval card offers Once, Always and Deny instead.
Whether you see the prompt depends on your permission mode. Auto mode asks on the first launch only and skips the prompt entirely when ultracode is on. Manual and accept-edits modes ask on every run unless you chose the don't-ask-again option for that workflow in the project. Bypass permissions never prompts. In claude -p and the Agent SDK there is no prompt at all. To let a workflow start there, use an allow rule such as Workflow or Workflow(name), auto mode, bypass permissions mode, a PreToolUse hook that returns allow, or approval from your host through --permission-prompt-tool or an Agent SDK canUseTool callback. In plan mode, a PreToolUse hook's approval alone does not start the workflow, so you need a permission rule or host approval there.
To keep a useful run, open /workflows, select the run and press s. Then choose .claude/workflows/ in the project, or ~/.claude/workflows/ for personal use. The workflow then runs as /name. The page recommends trying a small slice first, such as one directory instead of the whole repository.
Worked example from the page
The page shows a saved script that audits route handlers. It exports a meta block named audit-routes. It then asks one agent, using a JSON schema that requires a files array, to list every .ts file under src/routes/. Next it calls pipeline() over those files, so one agent audits each file for missing authentication checks, labelled with the file name. Finally it returns the audits with .filter(Boolean) to drop null entries left by stopped or failed agents.
The matching prompt on the page is: use a workflow to audit every route handler under src/routes/ for missing authentication checks, and adversarially verify each finding before reporting it. A saved workflow that takes input can be invoked with a prompt such as Run /triage-issues on issues 1024, 1025, and 1030, and the script reads the structured list from args. These examples are taken directly from the page, and the output and behaviour they would produce are unverified.
Assessment & evidence
Limitations and caveats
Documented runtime limits: no user input mid-run (a run pauses on its own only for agent permission prompts and usage-limit waits, so sign-off between stages needs separate workflows); no direct filesystem or shell access from the script; no module loading; up to 16 concurrent agents by default, fewer on machines or containers with fewer CPUs, adjustable from 1 to 256 on v2.1.269 or later; up to 4,096 items per parallel() or pipeline() call; and 1,000 agents in total per run.
Resume rules can cause repeated work. If an agent in the middle of a fan-out failed, relaunching reruns that agent and every agent started after it, even ones that had completed. Reordering agents in an edited script reruns everything from the first difference. Stopping a single agent counts as failing it. Runs do not continue by themselves if you leave the session, and a relaunch fails with a nothing to resume error if the saved results cannot be found.
The automatic pause at a usage limit works only when all the listed conditions hold: a claude.ai subscription without usage-based billing, an interactive terminal session or a local Code tab session, autoContinueAtUsageLimit turned on, a limit that resets within 24 hours, and fewer than two earlier waits in the run. Once a run has already waited twice, hitting the limit again fails the affected agent. The pause does not apply in claude -p, the Agent SDK, background sessions, Remote Control or agent-team teammate sessions, or several Desktop session types; in those cases the affected agent fails. A stalled agent restarts up to five times. If the sixth attempt also stalls, the call fails, and any files the stalled attempts already changed stay changed.
The ultracode keyword only counts in a prompt you type yourself. It does not start a workflow from -p prompts, Agent SDK input that is not marked as human, scheduled tasks, or webhook and pull-request-comment content. Agents get the same permission checks and sandboxing as other tool calls. The page does not assess how safe or accurate generated scripts or agent results are, so reviewing the raw script before approving and checking the results is up to you.
Why it is worth reading
The page explains a distinction that is easy to miss. With subagents, skills and agent teams, Claude decides turn by turn what happens next, and every result lands in a context window. A workflow moves the plan into a script that holds the loop, the branching and the results. The page's comparison table covers who decides what runs next, where intermediate results live, what is repeatable, scale and interruption, and it gives a clear way to choose between these tools.
It also documents the practical details that decide whether a large run is manageable: approval behaviour in each permission mode, how to gauge cost beforehand, what a relaunch runs again, and how to turn the feature off for yourself or an organization. These details come with version numbers, so you can check them against your installed Claude Code. The claim that workflows give better results through adversarial review or multi-angle planning comes from the vendor, and the page does not back it with measurements.
Alternatives and comparisons
The page itself compares four ways to run a multi-step task in Claude Code. Subagents suit a few delegated tasks per turn, with results kept in Claude's context. Skills are instructions Claude follows, at the same scale as subagents. Agent teams are a lead agent supervising a handful of long-running peer sessions through a shared task list. Workflows are a script that runs dozens to hundreds of agents, keeps intermediate results in script variables and can be resumed within the session. The page links to a separate comparison page (Run agents in parallel), which lies outside this single page.
Orchestration frameworks from other vendors, or building your own agent loop, would be other routes. This page does not discuss them, so it gives no basis for comparing them.
Evidence base
The source is a single page of Anthropic's Claude Code documentation at [https://code.claude.com/docs/en/workflows.md], in the version captured on 12 November 2026. Its descriptions of features, commands, settings, limits, defaults and version requirements are the vendor's own account. The page offers no benchmarks or measured comparisons, and its only code is a short illustrative script, so its claims about performance, reliability, cost in practice and result quality are unverified.
The page opens with a note pointing readers to a documentation index at [https://code.claude.com/docs/llms.txt]. That index and the other pages the page links to are separate materials outside this single-page scope, so anything they define is not reflected here.
Access & freshness
Costs
The page gives no prices. It says a single workflow run can use meaningfully more tokens than doing the same task in conversation, and that runs count toward your plan's usage and rate limits. With ultracode on, each request uses more tokens and takes longer, so a subscription session reaches its session or weekly limit sooner. The actual money cost for any plan or API tier is not stated and is unknown.
The page describes these cost controls: run the workflow on a small slice first; watch each agent's token usage in /workflows and stop the run at any time; check /model before a large run; ask Claude to use a smaller model for stages that do not need the strongest one; and set a size guideline. Workflow agents pick their model in the same order as subagents, and otherwise use the session's model. The size guideline values are unrestricted (no guideline), small (fewer than 5 agents), medium (fewer than 10) and large (fewer than 50). The default is medium, or small on a Pro plan with Claude Code v2.1.271 or later. The guideline is advice to Claude, not a cap, and a prompt that calls for a different scale overrides it. You can set it in /config, with /config workflowSizeGuideline=small, or with the workflowSizeGuideline key in a settings file.
A Large workflow warning appears in the task panel when a run schedules more agents than the agent-count threshold or its projected token total passes 1.5 million. The agent-count threshold is 25 by default. If you choose a size guideline yourself, that guideline's agent count replaces the 25-agent threshold; the built-in default guideline leaves it at 25. The warning is advisory and does not pause or limit the run, and sessions with ultracode on do not show it. Hard runtime caps of 1,000 agents per run and 4,096 items per parallel() or pipeline() call limit what a runaway script can spend. The page also says the API bills one-hour cache writes (used when subagentPromptCacheTtl is set to 1h) at a higher rate. It does not establish that this higher charge applies to subscription users.
Rights and licence
The page does not state a licence, copyright terms or reuse permissions for its own text, so whether you may copy, adapt or redistribute the documentation is unknown. The page describes a feature of Claude Code. It does not cover the terms for using Claude Code itself, Anthropic API access or the cloud platforms.
The page describes workflow scripts that you or Claude create and save in your own project as files you can share through the repository or a plugin. It says nothing about ownership or licensing of generated scripts or their outputs, so that is also unknown.
Freshness
The page shows no publication or last-updated date. Its currency can only be inferred from the version markers it cites. The most recent is Claude Code v2.1.319 for the Desktop Code tab, followed by v2.1.318 and v2.1.305 for resume behaviour. The captured text was obtained on 12 November 2026; whether it matched the implementation then or remains current is unverified. The feature clearly changes between versions, with thresholds, defaults and behaviours tied to specific releases. If you rely on exact numbers such as the default size guideline, the default 25-agent warning threshold or the default limit of 16 concurrent agents, check the live page and your installed Claude Code version.
Suggested next steps
If your plan and platform match the availability statement, start with /deep-research on a narrow question. Approve it, then watch the run in /workflows to see phases, agent counts and token usage before trying a bigger task. Before any large audit or migration, check /model, pick a size guideline in /config, and run the workflow on one directory first.
For repeated work, press s in /workflows to save a good run, read the raw script before approving, and add the tools the agents need to your allow rules. If you do not want the feature, turn off Dynamic workflows in /config, set disableWorkflows to true in ~/.claude/settings.json, or set CLAUDE_CODE_DISABLE_WORKFLOWS=1. Check the live page for current version requirements, and see the linked pages on subagents, permissions and cost management for details this page leaves out.
