Claude Code Dynamic Workflows
Claude writes its own JavaScript orchestration script that fans work out to tens-to-hundreds of parallel subagents in a single session and verifies the result before returning it. Anthropic frames it as the biggest Claude Code upgrade since skills and subagents.
What it is
A dynamic workflow is a JavaScript orchestration program Claude Code generates on the fly to coordinate many subagents across isolated contexts, then synthesizes and checks their output before anything reaches the user. Instead of managing a long multi-step task inside one conversation window, Claude moves the coordination - phases, branching, retries, synchronization points, agent allocation - into code that you can read and rerun. Announced 2026-05-28; now generally available. Source: Anthropic/Claude blog, https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code, reviewed 2026-07-01
Anthropic's headline claim: "Work you'd normally plan in quarters now finishes in days." A widely-cited early run completed a 750,000-line codebase rewrite in 11 days. Source: Anthropic/Claude blog, 2026-06-12
The 2026-07-01 docs review keeps the operational bar concrete: dynamic workflows require Claude Code v2.1.154+, execute a generated JavaScript workflow in the background, can be viewed through /workflows, and are for tasks that need more agents, saved orchestration, or adversarial review. Source: Claude Code docs, https://code.claude.com/docs/en/workflows, reviewed 2026-07-01
The coordination ladder
Workflows sit at the top of an increasing-overhead progression - they are the highest level of coordination, not the default: Source: Claude Code docs, https://code.claude.com/docs/en/workflows, reviewed 2026-07-01
skills → subagents → agent teams → dynamic workflows
(prompt) (one conv) (coordinated) (codified runtime)
Reach for a workflow only when a task (a) needs more agents than one conversation can coordinate, (b) should be saved as rerunnable orchestration code, or (c) needs adversarial / cross-checked review. Otherwise subagents are enough. Source: Claude Code docs, 2026-06-12
Durability Boundary
The workflow runtime is not Temporal-in-the-terminal. Anthropic's docs describe workflows as JavaScript scripts run in the background: the script owns the plan, branching, variables, and intermediate results, while Claude's context receives the final result. The same docs say dynamic workflows are resumable in the same session and, as of v2.1.196, verifier failures can leave claims explicitly unverified rather than falsely refuted. Source: Claude Code docs, 2026-07-04
Thariq's artifact reply gives the useful informal boundary: the JS environment is made more deterministic, but the right mental model is roughly as durable as /resume across every subagent, not a full durable-execution platform. For workflows that need crash-safe side effects, idempotency, timers, or external approvals, route through Durable Agent Execution Architecture rather than assuming the workflow script is enough. Source: X/@trq212 reply, 2026-06-02
Six coordination patterns
| Pattern | Use |
|---|---|
| Classify & act | Route each item to the right handler |
| Fan out & synthesize | Parallel work, then merge into one result |
| Adversarial verification | Agents check each other's output |
| Generate & filter | Produce many candidates, keep the best |
| Tournament | Bracket candidates against each other |
| Loop until done | Iterate against a success condition (pairs with Claude Code /goal Command) |
Source: Claude Code docs, https://code.claude.com/docs/en/workflows, reviewed 2026-07-01
Omar/DAIR's reviewed event artifact turns the same six patterns into a cross-harness design target: classify-and-act, fan-out-and-synthesize, adversarial verification, generate-and-filter, tournament, and loop-until-done are "harnesses" an agent can generate or port when the task warrants higher test-time compute. The note matters because it frames dynamic workflows as a small-use-case, high-leverage primitive for hill-climbing research experiments, not a default mode for everyday agent work. Source: X/@omarsar0, 2026-06-25; Source: DAIR.AI event, 2026-06-25
ultracode, enabling, and disabling
ultracode is a Claude Code setting that combines xhigh reasoning effort with automatic workflow orchestration — Claude decides when a task warrants a workflow rather than waiting to be asked, so one request can spawn several workflows in a row (understand → change → verify). Accessed via the /effort menu; before v2.1.160 the flag was workflow. Source: Claude Code docs, 2026-06-12
| Action | How |
|---|---|
| Start a workflow | Ask Claude to "create a workflow", or turn on ultracode |
| Monitor | /workflows view: token usage, per-agent phases, elapsed time |
| Save & reuse | Press s in /workflows → reusable command in ~/.claude/workflows; or package as a skill |
| Enable (Pro) | /config → Dynamic workflows row (on by default for Max/Team/Enterprise + API) |
| Disable | /config toggle · "disableWorkflows": true in ~/.claude/settings.json · CLAUDE_CODE_DISABLE_WORKFLOWS=1 |
Requires Claude Code v2.1.154+; available on the CLI, Desktop, and VS Code extension across paid plans, plus the Anthropic API, Amazon Bedrock, Google Vertex AI, and Microsoft Foundry. /deep-research is one shipped workflow that runs in the background. Source: Anthropic/Claude blog + Claude Code docs, 2026-06-12
Cost & cautions
Dynamic workflows consume substantially more tokens than a typical session — the first trigger shows what will run and asks for confirmation; admins can disable via managed settings. Real-world report: ~1M tokens for 9 agents in ~8 minutes — overkill for easy questions, worth it for hard research/migrations. Start scoped. Source: Anthropic/Claude blog, 2026-06-12
Cross-harness routing
Dynamic workflows are also a dispatch layer across harnesses, not only across Claude subagents. Theo's July 2026 CLAUDE.md example routes high-taste planning and review through Fable/Opus-class Claude models, then uses a thin Claude wrapper to call Codex CLI for well-specified mechanical work, computer use, and UI/UX verification. The wrapper's job is to write a self-contained prompt, run codex exec or codex review, and return receipts. It should not silently summarize failures. Source: X/@theo, 2026-07-06; Source: User-provided screenshot, 2026-07-06
Route the repeatable procedure through Cross-Harness Model Routing. The durable point is not the exact model table; it is separating taste/judgment, mechanical execution, and verification so each substrate does the work it is best at.
Where it fits Kevin's stack
This is Anthropic's first-party answer to agent fan-out — the same territory as Cursor's Cursor Orchestrate Skill (/orchestrate) and the Recursive Agent Orchestration / Multi-Agent Topologies concepts. It extends the Claude Code Harness capability stack (skills → subagents → workflows) and operationalizes the Agent Looping / loop-until-done pattern with model-verified exit conditions (Claude Code /goal Command). The "codify the orchestration as rerunnable code" principle echoes Kevin's no-one-off-work rule. Source: compiled, 2026-06-12
External triggers are a separate layer from workflow orchestration. The mvanhorn/agentmail-to-claude-code pattern uses AgentMail or Primitive email as a durable task trigger, then opens a normal Claude Code session through cmux or Ghostty; a dynamic workflow may happen inside that session only if the task warrants it. Keep these concepts separate: inboxes start work, workflows coordinate subagents. Source: GitHub mvanhorn/agentmail-to-claude-code, 2026-07-02
Timeline
- 2026-07-06 | Added the cross-harness workflow pattern: Claude/Fable-class models plan and judge; a thin Claude wrapper can call Codex CLI for clear-spec execution, computer use, and UI/UX verification. Source: X/@theo and User-provided screenshot, 2026-07-06
- 2026-07-04 | Deep-reviewed the link-only @trq212 X Article row. The article body remains blocked to anonymous fetch, but the artifact reply clarified the durability boundary: Claude Code workflows use a deterministic JS environment and
/resume-style subagent recovery, not a Temporal-equivalent durable workflow engine. Source: raw/x-bookmarks/enriched/2061907337154367865.json; Claude Code docs, 2026-07-04 - 2026-07-02 | Added the AgentMail-to-Claude-Code repo as an external trigger pattern: inboxes can start Claude Code sessions, while dynamic workflows remain the internal orchestration layer for tasks that need fan-out or adversarial review. Source: GitHub
mvanhorn/agentmail-to-claude-code, 2026-07-02 - 2026-05-28 | Anthropic announced dynamic workflows for Claude Code; later marked generally available. JS orchestration scripts, tens-to-hundreds of parallel subagents, self-verification. Source: Anthropic/Claude blog, https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code, reviewed 2026-07-01
- 2026-06-02 | @trq212 (Thariq, Anthropic): "Workflows are the biggest upgrade to Claude Code's capabilities since skills and subagents." Deep dive with @sidbid; Claude Blog post linked in thread. 4,690 likes, 8,217 bookmarks. Source: X/@trq212, 2026-06-02
- 2026-06-12 | Page created during domain-2a absorption. Requires Claude Code v2.1.154+;
ultracode= xhigh effort + auto-orchestration. Source: Claude Code docs, https://code.claude.com/docs/en/workflows, 2026-06-12 - 2026-07-01 | Deep-reviewed Omar/DAIR's dynamic-workflows event artifact and image. Preserved the six harnesses as the reusable pattern set and linked the self-thread's BINEVAL/evaluator note to BINEVAL. Source: X/@omarsar0, 2026-06-25
- 2026-07-01 | Re-reviewed the original Thariq bookmark against the current Claude blog and docs; no local media expected, and the blocked X photo artifact was not source-critical. Source: raw/x-bookmarks/enriched/2061907538741006796.json; Claude Code docs, 2026-07-01