
Claude dynamic workflows can run up to 16 agents concurrently, with an executable script coordinating their work. That capacity makes large tasks possible, but it also puts token consumption and the quality of verification at the center of the decision to use one. Prompt Engineering demonstrated the approach on a code migration, tracking both its progress and its limitations. Learn why the workflow’s design and success criteria matter before committing to a run.
A Script Holds The Plan And Results
TL;DR Key Takeaways :
- A JavaScript plan manages workflow execution, with a limit of 16 agents working at once.
- Independent verifiers and a fixer rely on an objective standard such as a test suite.
- The Quorum migration reported passing tests after about 750,000 tokens but still needed a meeting test.
- Large, measurable tasks are better candidates than subjective work or small changes.
- Passing a test suite does not guarantee that generated code is production-ready.
Claude writes a dynamic workflow plan as JavaScript, which a runtime executes in the background. Results are held in the script’s variables instead of leaving the plan solely in an agent’s context window. The script is also an artifact that can be inspected and versioned.
An illustrative script includes metadata and a phase call to label a stage, then maps a parallel operation over files. Each file goes to an agent call with a schema for structured output, and a final agent call returns a report. Agent, parallel, pipeline and workflows are the basic primitives used to assemble this kind of work.
Workflows can create hundreds or thousands of agents overall, subject to a limit of 1,000 agents per run. The concurrency limit controls how many of them can work at the same time.
Independent Agents Check And Fix The Work
Within that script, an orchestrator divides the task into subtasks for agents. Independent verifiers then review their implementations adversarially, looking for holes, and a separate fixer addresses problems before the orchestrator combines the results. The verifier and fixer have their own context windows, and separating these roles while sharing task-related information appears to produce better outcomes.
The implement, verify and fix loop needs a verifiable test suite so agents have a way to check the result. OpenAI introduced the /goal pattern, which Anthropic is also adopting: it pairs a task with completion criteria and lets an agent check its work and try again if it falls short.
Context Windows Shape Agent Coordination
The location of the plan also affects how other Claude Code arrangements work. In a single-agent session, files, tool results and the plan remain in the same context window. In a subagent setup, a lead orchestrator holds the plan, divides work among agents with separate context windows and collects their results. Those subagents do not communicate with one another in the described pattern, so they can duplicate work or miss what another agent is doing.
An agent team instead uses an orchestrator and a shared task list. Agents take tasks from that list and can communicate with one another, while the list itself acts as the plan. Models still have to read it into their context windows.
A Migration Makes The Cost Visible
The migration task involved Quorum, a local macOS app built with MLX Swift. It transcribes meetings, extracts action items and finds relevant meetings based on previous conversations. The request was to migrate all its models from MLX to transformers and test them against the MLX implementation, giving the work a measurable success criterion.
The Quorum test applies Claude Opus 4.8 workflows to a migration with a measurable result. It runs in Claude Code rather than Claude Cowork. Typing workflows in a Claude Code prompt requests a dynamic workflow for that turn, and the interface highlights the request and displays an animation. Alternatively, choosing ultra in the effort setting activates dynamic workflows; the test used extra high effort and invoked the workflow in the prompt instead.
After the request started, the orchestrator inspected the codebase, particularly the MLX implementation, and determined how many subagents to use. The initial assessment was followed by clarification questions and a proposed workflow for the user to review. Before launch, the generated script appeared with a warning that parallel subagents could consume many tokens quickly and count against the usage limit. That gives the user a chance to consider the cost before choosing whether to run it.
Once approved, the workflow planned four phases with nearly 12 subagents. Opening workflows exposed the current stage, subagent statuses, model and token use across tool calls; the initial stage shown was design. At about 200,000 tokens, the view showed three agents, including two that had completed, along with each agent’s usage. During implementation, seven agents were working and three were waiting.
Using Opus 4.8, the run reported implementation complete and tests passing after about 750,000 tokens. Quorum appeared to record and transcribe after migration, and began transcribing and summarizing when recording stopped. It still needed a meeting test, though, and background work meant it might not have been fully functional.
Token use can grow much further on other work. A developer recreating Anthropic’s workflows used 2 billion tokens with DeepSeek; using Opus 4.8 instead could have been extremely expensive. The warning before launch matters because parallel work can consume an allowance quickly, even when the task has a clear success criterion.
Passing Tests Does Not Guarantee Production Quality
Anthropic highlighted a migration of Bun code from Zig to Rust, where almost complete test coverage provided a way to measure the result by how accurately it passed the suite. The migrated code contained more than 13,000 unsafe blocks, compared with 73 in the handwritten Rust. Passing tests therefore does not necessarily make generated code ready for production.
Thorough test coverage is especially important for a code migration, but the tests must also provide agents with a useful standard for the intended result. The Bun example shows why a passing suite still leaves room to inspect the implementation itself.
Choose Tasks With An Objective Measure
The first question is whether the task has an objective measure of success. Without one, a dynamic workflow is a poor fit. If a measure exists but the task does not need a fan-out of hundreds of agents, a single agent or subagent orchestration is probably sufficient. The decision tree also recommends /goal when no state is needed mid-run.
Tasks worth considering for substantial parallel work include:
- Codebase-wide searches for bugs or security issues across the code.
- Large migrations involving hundreds of files, particularly when thorough tests can check the result.
- Deep searches where sources can cross-check one another.
Creative or subjective output, small well-scoped changes and tasks without an automated correctness bar are weaker candidates because workflow overhead can make them much more expensive than subagents or agent teams. Generating 10 website copies or asking agents to rate their own previous skills lacks a clear, objective standard for a good result.
We would treat the Quorum run’s passing tests and apparent transcription as a reason to inspect the result, not as permission to skip further checks. The remaining meeting test and possible background work show why an objective criterion needs to cover the behavior that matters. The reported token use also makes the approval screen worth reading: a smaller task may not justify the orchestration, even when Claude can divide it among agents.
Dynamic workflows are best reserved for large tasks with measurable outcomes and enough parallel work to justify the cost. Keep the script available for review, check the proposed run before approving it, and verify the result against the requirements that matter beyond a passing test suite.
More on Claude:
- Claude Code Workflow for Solo Developers: A Practical Guide
- Claude Code Workflows Coordinate Agents With JavaScript
- Claude Opus 4.8 Adds Effort Controls and Workflow Changes
- Claude Opus 4.8 and Sonnet 4.8 Rumors: What Could Change
Media Credit: Prompt Engineering
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.