Dynamic Workflows & ultracode
Dynamic workflows (Claude Code v2.1.154+, shipped May 2026 alongside Claude Opus 4.8) let Claude take on tasks bigger than a single conversation can coordinate. Instead of working turn by turn, Claude writes a JavaScript script that orchestrates subagents at scale, and a runtime executes it in the background while your session stays responsive. Codebase-wide audits, 500-file migrations, and cross-checked research that would blow past one context window become a single run that reports back when it’s done.
When to Use a Workflow
Section titled “When to Use a Workflow”Subagents, skills, and workflows can all run a multi-step task. The difference is who holds the plan:
| Subagents | Skills | Workflows | |
|---|---|---|---|
| What it is | A worker Claude spawns | Instructions Claude follows | A script the runtime executes |
| Who decides what runs next | Claude, turn by turn | Claude, following the prompt | The script |
| Where intermediate results live | Claude’s context window | Claude’s context window | Script variables |
| What’s repeatable | The worker definition | The instructions | The orchestration itself |
| Scale | A few delegated tasks / turn | Same as subagents | Dozens to hundreds of agents per run |
| Interruption | Restarts the turn | Restarts the turn | Resumable in the same session |
Reach for a workflow when a task needs more agents than one conversation can coordinate, or when you want the orchestration codified as a script you can rerun. Good fits:
- Codebase audits — sweep every endpoint under
src/routes/for missing auth checks - Large migrations — a 500-file framework or API migration from kickoff to merge
- Cross-checked research — a question whose sources should be verified against each other
- Hard plans — draft an approach from several independent angles, then weigh them before committing
Moving the plan into code also lets a workflow apply a repeatable quality pattern, not just run more agents: independent agents can adversarially review each other’s findings before anything is reported, so you get a more trustworthy result than a single pass.
If the end state is a clear pass/fail condition rather than a fan-out of work, use /goal instead. If you just need a few delegated lookups this turn, use subagents.
Three Ways to Start a Workflow
Section titled “Three Ways to Start a Workflow”-
Say
workflowin your prompt — run a single task as a workflow without changing the session’s effort level:Run a workflow to audit every API endpoint under src/routes/ for missing auth checksClaude Code highlights the word and Claude writes a workflow script for the task instead of working through it turn by turn. If it highlights the word when you didn’t mean it, press
alt+wto ignore it for that prompt. -
Let Claude decide with
ultracode— set the session to plan a workflow for every substantial task (see below). -
Run a command that already exists — a bundled workflow like
/deep-research, or one you’ve saved.
ultracode: Let Claude Decide
Section titled “ultracode: Let Claude Decide”ultracode is the auto-on mode. It combines xhigh reasoning effort with automatic workflow orchestration — with it on, Claude plans a workflow for each substantive task instead of waiting for you to ask.
/effort ultracodeA single request can then turn into several workflows in a row: one to understand the code, one to make the change, and one to verify it. This applies to every task in the session, so each request uses more tokens and takes longer than at lower effort levels.
Watch a Run with /workflows
Section titled “Watch a Run with /workflows”Workflows run in the background, so the session stays free while agents work. Run /workflows to list running and completed workflows, then select one to open its progress view — each phase with its agent count, token total, and elapsed time.
/workflows| Key | Action |
|---|---|
↑ / ↓ | Select a phase or agent |
Enter / → | Drill into a phase, then an agent to read its prompt, tool calls, and result |
Esc | Back out one level |
p | Pause or resume the run |
x | Stop the selected agent — or the whole workflow when focus is on the run |
r | Restart the selected running agent |
s | Save the run’s script as a command |
A one-line progress summary also appears in the task panel below the input box; press the down arrow to focus it, then Enter to expand.
Run a Bundled Workflow
Section titled “Run a Bundled Workflow”The fastest way to see one in action is /deep-research, the workflow Claude Code ships for investigating a question across many sources:
/deep-research What changed in the Node.js permission model between v20 and v22?It 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 didn’t survive cross-checking filtered out. (It needs the WebSearch tool available.) You approve the run once, then watch it from /workflows while your session stays free.
Save a Workflow for Reuse
Section titled “Save a Workflow for Reuse”When Claude writes a workflow for something you’ll repeat — a review you run on every branch, say — save that run’s script as a command:
- Run
/workflowsand select the run you want to keep. - Press
s. In the save dialog,Tabtoggles between two locations:.claude/workflows/in your project — shared with everyone who clones the repo~/.claude/workflows/in your home directory — available in every project, visible only to you
- Press Enter. The workflow now runs as
/<name>in future sessions and appears in/autocomplete alongside the bundled ones.
If a project workflow and a personal workflow share a name, the project one wins.
How a Run Works (and Its Limits)
Section titled “How a Run Works (and Its Limits)”The runtime executes the script in an isolated environment, separate from your conversation — intermediate results stay in script variables, not in Claude’s context. It tracks each agent’s result as the run progresses, which is what makes a run resumable within the same session: stop it, and on resume the completed agents return cached results while the rest run live. (Exit Claude Code while a workflow is running and the next session starts it fresh.)
| Constraint | Why |
|---|---|
| No mid-run user input | Only agent permission prompts pause a run; for sign-off between stages, run each stage as its own workflow |
| No direct filesystem/shell from the script | Agents read, write, and run commands — the script only coordinates them |
| Up to 16 concurrent agents | Bounds local resource use (fewer on machines with limited CPU cores) |
| 1,000 agents total per run | A backstop against runaway loops |
The subagents a workflow spawns always run in acceptEdits mode and inherit your tool allowlist, regardless of your session’s permission mode — so add the shell commands, web fetches, or MCP tools they’ll need to your allowlist before a long run, or they’ll prompt you mid-run.
Availability & Turning It Off
Section titled “Availability & Turning It Off”Dynamic workflows are a research preview, require Claude Code v2.1.154+, and are available on all paid plans plus Anthropic API access and on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry. They work in the CLI, the Desktop app, the IDE extensions, non-interactive mode (claude -p), and the Agent SDK. On Pro, enable them from the Dynamic workflows row in /config.
To turn them off:
- Toggle Dynamic workflows off in
/config(persists across sessions) - Set
"disableWorkflows": truein~/.claude/settings.json - Set
CLAUDE_CODE_DISABLE_WORKFLOWS=1 - Org-wide:
"disableWorkflows": truein managed settings
When disabled, the bundled commands disappear, the workflow keyword no longer triggers a run, and ultracode is removed from the /effort menu.