Claude Code Dynamic Workflows are a powerful tool for developers who need to manage massive, multi-part projects using the Anthropic Claude ecosystem. Introduced in the 0.4.8 update, this feature allows the model to generate and execute JavaScript-based scripts that orchestrate dozens of subagents to work in parallel. Instead of waiting for a single agent to process a large file structure linearly, a workflow can spin up worker agents (typically using the faster and cheaper Haiku model) to handle specific subtasks and then synthesize the results using the more intelligent Opus model. This video serves as a comprehensive guide to understanding these advanced agentic capabilities and managing the significant token costs associated with them.
Key Takeaways
- Dynamic Workflows generate a physical JavaScript file stored in your local directory to execute complex plans.
- The Agency Ladder helps users choose between a simple question, a skill, a subagent, an agent team, or a full workflow.
- Workflows focus on width (parallel tasks), while the /goal command focuses on depth (iterative refinement).
- Using Haiku for worker agents significantly reduces costs compared to using Opus for every subtask.
- UltraCode mode enables Claude to run workflows by default, effectively placing the tool on autopilot for high effort tasks.
- Proper scoping and explicit instructions are critical to preventing massive token burn during parallel executions.
The Agency Ladder and Levels of Autonomy
One of the most important concepts discussed in the video is the ladder of agency. Not every task requires the heavy lifting of a dynamic workflow. At the bottom of the ladder is a simple request, where you just ask Claude a question. Above that are skills, which are reusable recipes or automations you have pre defined. Subagents are single helpers sent off for side tasks, and agent teams are small crews that can actually communicate with one another in a group chat style. Dynamic workflows represent the top of this ladder. They are intended for giant, parallel jobs where Claude writes a script to manage up to 1000 agents. Understanding where your task sits on this ladder is essential for maintaining efficiency and budget.
Width vs Depth: Workflows and Goals
There is often confusion between the /goal command and the new dynamic workflows. Nate Herk clarifies this by comparing width and depth. The /goal command is designed for depth: it uses a single agent that loops through turns until a specific criteria is met (Done equals True). It is an iterative process. Dynamic workflows are designed for width: they create a plan and execute many pieces at the exact same time. While a goal might run for a long time to get a single answer right, a workflow runs many agents in parallel to sweep through a large codebase or dataset. You can even nest these, putting a skill or a goal inside a workflow agent for maximum complexity.
Managing Token Burn and Costs
Dynamic workflows are an incredible way to burn through your token budget if you are not careful. Because every agent in a workflow represents a full Claude call with its own context window, the costs can scale rapidly. Nate shares an example where a single vague prompt consumed half of a two hundred dollar monthly subscription in just thirty minutes. To prevent this, he recommends three specific steps: bound the scope of the project, name the specific deliverable you expect, and explicitly put the heavy lifting on the Haiku model rather than Opus. By using Haiku for the worker agents and Opus only for the final synthesis, you can achieve professional results at a fraction of the cost.
Practical Applications
Developers can apply dynamic workflows to projects that are too large for a single context window. If you need to review every file in a codebase for security vulnerabilities or migrate a four hundred file project to a new framework, a workflow is the ideal solution. It allows you to distribute the work across many agents, ensuring that every file receives dedicated attention without hitting the limits of a single linear conversation. Another practical use is deep research, where the /deep-research command (a built in workflow) can search multiple sources simultaneously, vote on claims, and produce a cited report. This is particularly useful for technical documentation or competitive analysis.
Frequently Asked Questions
How is a workflow different from an agent team?
An agent team acts like a group chat where members hand off tasks and react to each other in real time. This is best for collaborative problem solving. A dynamic workflow, on the other hand, runs agents in solo lanes. These agents never see each other and only merge their results at the very end of the process. This makes workflows superior for brute force parallel tasks.
Where are the workflow scripts stored locally?
When Claude Code runs a workflow, it writes a real JavaScript file. These are typically stored in your project directory under the .claude/workflows folder. You can view these files to see exactly how Claude planned the execution or even rerun them manually in the future without having to reinvent the logic.
What is UltraCode and when should I use it?
UltraCode is a high effort mode that can be activated using the /effort command. It combines high reasoning with workflows by default. This means Claude will automatically attempt to orchestrate a workflow for almost every prompt without you needing to ask for it. It should only be used when quality is far more important than the cost of the tokens.
