Claude Code Dynamic Workflows¶
What It Is¶
On May 28, 2026, Anthropic announced dynamic workflows as a research preview in Claude Code. The core idea: Claude writes a JavaScript orchestration script on the fly, then a separate runtime executes that script, spinning up dozens to hundreds of subagents in parallel to tackle complex engineering tasks.
Trigger: Use the word "workflow" in a prompt, or enable /effort ultracode for automatic workflow detection.
How It Works¶
- Claude receives a natural-language request
- Instead of working turn-by-turn, it generates a JavaScript orchestration script
- A runtime executes the script in the background
- The script spawns coordinated subagents (up to 1,000 total, 16 concurrent)
- Intermediate results live in script variables, not in Claude's context window
- Final output is a consolidated report
Key activation paths:
- Explicit: include "workflow" in your prompt
- Automatic: /effort ultracode (Claude decides when workflows are warranted)
Key Technical Details¶
- Scale: Up to 1,000 total agents per execution, 16 running concurrently
- Concurrency cap: Tuned for average local machine resources
- Repeatability: Scripts can be saved to
.claude/workflows/or~/.claude/workflows/and re-executed via slash command - Resumability: Interrupted workflows resume from where agents left off — cached results persist
- Model: Each agent uses the current session's model unless the script routes to a different one
- Permissions: Subagents always operate in
acceptEditsmode; the script itself cannot access filesystem or shell directly - No mid-execution user input: Only permission prompts can pause a workflow
Why It Matters (vs. Classic Subagents)¶
| Aspect | Classic Subagents | Dynamic Workflows |
|---|---|---|
| Plan location | Claude's context window | JavaScript script variables |
| Context consumption | Every intermediate result eats tokens | Intermediate state lives outside conversation |
| Scale | Limited by context window | Up to 1,000 agents |
| Repeatability | Manual re-run | Save and replay scripts |
| Resumability | Start over | Resume from cached state |
Real-World Validation¶
Jarred Sumner rewrote Bun from Zig to Rust using dynamic workflows — generating ~750,000 lines of code in 11 days while keeping 99.8% of tests green. That's the flagship demo: a quarter-scale project compressed into days.
Practical Applications¶
- Repository-wide audits: Check every endpoint for missing auth, scan for vulnerabilities across thousands of files
- Large-scale refactoring: Automated migrations across entire codebases
- Deep research: The bundled
/deep-researchcommand fans out web searches from multiple angles, cross-checks sources - Bug hunting: Distributed search across entire services
- Code generation at scale: Parallel file generation with verification
Caveats¶
- Token cost: Each agent pays its own context overhead — can burn substantially more tokens than standard sessions
- Model matters: Switching to Opus 4.8 for a 500-agent audit changes the bill by an order of magnitude
- Ultracode is session-scoped: Resets on every new session; drop back to
/effort highafter heavy tasks - Research preview: Behavior may change before general availability
Getting Started¶
/model opus-4.8
/effort ultracode
"Run a workflow to check every endpoint under src/routes/ that is missing authentication"
Or use the bundled /deep-research command for zero-config workflow exploration.
Bibliography¶
- @ClaudeDevs (May 28, 2026). Claude Code dynamic workflows [Tweet/analysis]. X/Twitter.
- Anthropic (May 28, 2026). Introducing dynamic workflows in Claude Code [Blog post]. https://www.anthropic.com
- Anthropic (May 28, 2026). Claude Opus 4.8 [Announcement]. https://www.anthropic.com
Related¶
- sub-agent-parallelism — Parallel subagent fleets (Anthropic scales to 1,000)
- subagent-spawning — Subagent spawning mechanism
- workflows — The workflows concept
- workflows/pipeline-with-gates — Pipeline model with quality gates
- multi-agent-pipeline — Multi-agent orchestration
Source: @ClaudeDevs tweet (May 28, 2026), Anthropic blog post, and third-party coverage.