Claude Code Introduces Dynamic Workflows: Enabling AI to Form Teams and Collaborate

marsbitОпубликовано 2026-06-04Обновлено 2026-06-04

Введение

Claude Code introduces dynamic workflows, enabling AI to coordinate teams of specialized agents for complex tasks. This transforms Claude from a code assistant into a programmable workbench. Workflows address key limitations of single-agent systems: agentic laziness (premature task completion), self-preferential bias (favoring own outputs), and goal drift (losing sight of original objectives). The system allows Claude to dynamically create execution frameworks using JavaScript. It can split tasks, dispatch parallel agents for isolated work (e.g., in separate worktrees), implement adversarial validation, run tournaments, and synthesize results. This multi-agent approach is valuable for tasks requiring deep research, factual verification, code migration, root cause analysis, large-scale triage, and qualitative sorting. Key patterns include: classify-and-route, fan-out-and-synthesize, adversarial verification, generate-and-filter, tournaments, and loop-until-done. While token usage is higher, workflows excel where tasks resemble programming—needing problem decomposition, isolated context, hypothesis testing, and handling many details. They extend Claude Code's utility beyond technical work to areas like business plan review, resume screening, and naming brainstorm. The feature is not a universal solution but points to a future where AI tool competitiveness depends on organizing reliable, reusable, and auditable execution flows for complex goals.

Editor's Note: Claude Code is evolving from a coding assistant into a composable Agent workbench.

The workflows introduced in this article are designed to enable Claude to move beyond "thinking and then doing" within the same context window. Instead, it can dynamically generate an execution framework for tasks: decomposing tasks, dispatching sub-agents, parallel processing, cross-validation, iterative cycles, and even allowing different agents to compete with each other before synthesizing the final results.

This signifies a clear expansion of Claude Code's applicable scenarios. It's not just suitable for code migration, refactoring, test reproduction, and code review, but also for non-technical tasks such as deep research, fact-checking, resume screening, incident post-mortems, rule distillation, business plan reviews, and naming brainstorms. Many complex tasks are inherently similar to programming: they require problem decomposition, context isolation, hypothesis validation, handling of extensive details, and making choices among multiple candidate paths.

Dynamic workflows aim to address several common issues with large language models on long tasks: "Agentic laziness," where the agent declares completion prematurely; "Self-preferential bias," where the agent tends to favor its own conclusions; and "Goal drift," where the agent gradually deviates from the original objective over multiple execution rounds. By assigning tasks to multiple Claude instances with independent contexts, it transforms complex tasks from a "single-agent marathon" into "multi-agent collaboration."

Of course, workflows are not a universal solution. They typically consume more tokens and may not be necessary for every routine coding task. However, they point to an important direction: future competition among AI tools may depend not only on the intelligence of a single model but also on its ability to organize reliable, reusable, and reviewable execution processes around complex objectives.

Below is the original article:

Although Claude Code's default execution framework is built for programming, it is also applicable to many other types of tasks. It turns out that many tasks are structurally similar to programming tasks. However, for certain specific task types to perform optimally, we still need to build customized execution frameworks on top of Claude Code, such as for research, security analysis, agent team collaboration, or code review.

Workflows allow you to dynamically create execution frameworks, enabling Claude to solve the aforementioned problems, and more, more natively within Claude Code itself. You can also share and reuse these workflows with others.

In this article, I'll share my initial experiences and insights using workflows to help you leverage their capabilities more fully.

It should be noted, however, that best practices are still emerging. Dynamic workflows typically consume more tokens, so you need to carefully consider when and how to use them.

Note: This article is also published on the Claude Blog.

Example Prompts

Before diving into technical details, I'd like to provide some example prompts to help you understand the possibilities with workflows:

"This test fails approximately once every 50 runs. Set up a workflow to reproduce it, formulate hypotheses, and conduct adversarial testing across different worktrees. /goal Do not stop until one hypothesis is validated."

"Use a workflow to review my last 50 sessions, extract recurring corrections I've made, and convert these persistent issues into CLAUDE.md rules."

"Use a workflow to examine the past six months of the #incidents channel in Slack and identify recurring root causes that no one filed tickets for."

"Run my business plan through a workflow, having different agents critique it from the perspectives of an investor, a customer, and a competitor."

"Here is a folder with 80 resumes. Use a workflow to rank them according to backend role requirements and double-check the top ten. Use the AskUserQuestion tool to query me to help you establish evaluation criteria."

"I need to name this CLI tool. Use a workflow to brainstorm a batch of options, then select the top three through a tournament mechanism."

"Use a workflow to rename our User model to Account everywhere."

"Read my blog draft and use a workflow to verify every technical claim against the codebase. I don't want to publish anything incorrect."

How Dynamic Workflows Work

A dynamic workflow executes a JavaScript file containing special functions for generating and coordinating sub-agents.

Dynamic workflows also include standard JavaScript functions like JSON, Math, and Array for data manipulation.

Notably, dynamic workflows can decide which model a particular agent uses and whether a sub-agent runs in its own worktree. This allows Claude to autonomously select the required level of intelligence and isolation based on task needs.

If a workflow is interrupted—for example, by a manual user action or terminal exit—it can resume execution from the point of interruption when the session is restored.

Why Dynamic Workflows are Needed

When you have Claude Code's default execution framework handle a task, it needs to perform both planning and execution within the same context window. While this is very effective for many programming tasks, it can sometimes fail on long-running, massively parallel, or highly structured adversarial tasks.

The reason is that the longer Claude works on a complex task within a single context window, the more prone it becomes to several specific failure modes:

Agentic laziness: This occurs when Claude stops prematurely on particularly complex, multi-part tasks, declaring the task complete after only partial progress. For example, processing only 20 out of 50 items in a security audit and announcing completion.

Self-preferential bias: Claude tends to prefer its own results or findings, especially when asked to verify or judge its own output against some evaluation criteria.

Goal drift: Over multiple rounds of execution, Claude's fidelity to the original goal gradually declines, particularly after context compression. Each summarization incurs information loss, and specific details like edge cases or "don't do X" constraints can be lost.

Creating a workflow helps mitigate these issues by orchestrating multiple independent Claude instances, each with its own context window, focused on isolated, well-defined tasks.

Dynamic Workflows vs. Static Workflows

You may have previously created static workflows using the Claude Agent SDK or claude -p to coordinate multiple Claude Code instances.

However, because static workflows need to cover various edge cases, they tend to be more generic. With the advent of Claude Opus 4.8 and dynamic workflows, Claude is now intelligent enough to write a tailored execution framework for your specific use case.

Practical Patterns When Using Dynamic Workflows

You can directly ask Claude to create a dynamic workflow, or use the trigger word "ultracode" to ensure Claude Code creates a workflow.

However, if you build a mental model of how dynamic workflows operate, it's easier to judge when to use them and to guide Claude via prompts.

When constructing workflows, Claude commonly uses and combines the following patterns:

Classify & Execute: Use a classification agent to determine the task type, then route to different agents or behaviors based on that type. A classifier can also be used at the end of the process to judge the output.

Fan-out & Synthesize: Split a task into multiple smaller steps, have each step handled by an agent, and finally synthesize the results. This is particularly suitable for tasks with numerous small steps or where each step needs a clean context window to avoid interference or cross-contamination. The synthesis step acts as a "barrier": it waits for all fanned-out agents to finish, then merges their structured outputs into a single result.

Adversarial Verification: For each generated output, run an independent agent to adversarially verify it against a set of evaluation criteria or guidelines.

Generate & Filter: Generate a large number of ideas around a theme, then filter them based on evaluation criteria or a verification process, removing duplicates and returning only the highest-quality, tested ideas.

Tournament: Instead of splitting the work, have agents compete. Generate N agents, each attempting to complete the same task using different methods. Then, a prompt or model-driven reviewing agent compares the results pairwise until a winner emerges.

Loop Until Done: For tasks with unknown workload, instead of a fixed number of rounds, cycle through generating agents until a stop condition is met, such as no new discoveries or errors in the logs.

Use Cases

You can think more creatively about when and how to have Claude Code create dynamic workflows. I've found workflows can sometimes be even more useful for non-technical work.

Migration & Refactoring

Bun used workflows for its rewrite from Zig to Rust. You can read Jarred's post on X for details.

The key is to split the task into a series of steps to process, like call sites, failing tests, modules, etc. Launch a sub-agent for each fix in a worktree to complete the repair; then have another agent perform an adversarial review before merging results. You might consider explicitly telling agents not to use overly resource-intensive commands, maximizing parallelism without exhausting local machine resources.

Deep Research

We released a deep research skill (/deep-research) in Claude Code, which uses dynamic workflows. Specifically, it fans out to perform web searches, scrape sources, adversarially verify relevant claims, and synthesize a referenced report.

But this kind of research isn't limited to web searches. For example, you could have Claude compile a status report from Slack context or explore the codebase deeply to study how a feature works.

Deep Verification

Conversely, if you have a report and want to fact-check every factual claim and source cited, generate a workflow: first, an agent identifies all factual claims; then, launch a sub-agent for each claim to meticulously verify it. You can also have a verification agent check the sourcing sub-agents to ensure their source quality is high enough.

Ranking

You might have a set of items you want to rank by some qualitative metric, and you believe Claude Code is good at evaluating that metric. For example, ranking support tickets by bug severity.

But if you try to rank 1000+ lines in a single prompt, quality degrades, and it might not fit the context window. It's better to run a tournament, building a pipeline of pairwise comparison agents because comparative judgments are often more reliable than absolute scoring; or perform parallel bucket sorting first, then merge results. Each comparison is done by an independent agent, so a deterministic loop can maintain the tournament structure, with only the current running order needing to stay in context.

Memory & Rule Adherence

If you have a set of specific rules that Claude often misses or fails to execute well, even when seeing them in CLAUDE.md, create a workflow listing these rules and have verification agents check them one by one—one verifier per rule. Creating a sub-agent with a "skeptic" persona to review whether these rules are sensible can also help avoid excessive false positives.

Conversely: mine your recent sessions and code review comments to find corrections you repeatedly make; have parallel agents cluster these issues; then adversarially validate each candidate rule to judge if it genuinely would have prevented a real mistake; finally, distill the surviving rules back into CLAUDE.md.

Root Cause Investigation

The most effective debugging involves generating several independent hypotheses and testing each. But if you use only one context window, Claude may fall prey to self-preferential bias.

Workflows can structurally prevent this: they can launch multiple agents to generate hypotheses based on non-overlapping evidence. For example, have different agents look at logs, files, and data separately. Then, each hypothesis can be scrutinized by a set of verifiers and refuters.

This isn't just for code. Workflows can also be used for sales analysis, e.g., "Why did March sales drop?"; for data engineering, e.g., "Why did this pipeline fail?"; or for any post-mortem.

Large-Scale Triage

Every team has support queues, bug reports, or other backlogs that can't be fully handled by humans. A triage workflow can classify each item, deduplicate against tracked issues, and take action. This could mean attempting a fix or escalating to a human user.

For triage workflows, a useful pattern is quarantine. That is, forbid agents reading untrusted public content from performing high-privilege actions; high-privilege actions should be done by dedicated action-taking agents.

You can pair triage workflows with /loop for continuous execution of such tasks.

Exploration & Taste Judgment

Workflows are useful when you need to explore different solution paths, especially for tasks involving aesthetic judgment like design or naming, and can benefit from a set of evaluation criteria.

You can have Claude explore numerous options and give a reviewing agent criteria for "what a good solution looks like." The task is done when the reviewing agent deems the result meets the criteria. Different options can also be ranked or filtered via a tournament based on these criteria.

Evals (Evaluations)

You can run lightweight evals for specific tasks by launching independent agents in worktrees and then comparison agents to compare and score outputs against evaluation criteria. For example, you can evaluate and improve a skill you created against specific standards.

Model & Intelligence Routing: You can create a classification agent tuned for your tasks to decide which model to use. This is useful when tasks involve many tool calls and doing research beforehand can help identify the most suitable model.

For example, for the task "explain how the auth module works," the best model depends on how many files are in the auth module and the codebase structure. The classification agent can do this research first, then route the task to Sonnet or Opus based on expected complexity.

When Not to Use Dynamic Workflows

Workflows are still new. While they can deliver far better results in many use cases, not every task needs them, and they can significantly increase token consumption.

It's best to use workflows on tasks that expand Claude Code's capabilities in new ways. For routine programming tasks, ask yourself: does this task really need more compute? For example, most traditional programming tasks don't need a panel of 5 reviewers.

Tips for Building Dynamic Workflows

Prompt Design

When writing prompts for dynamic workflows, more detail usually yields better results, especially using the specific techniques mentioned above.

Workflows aren't only for large tasks. You can also prompt the model to use a "quick workflow." For instance, you could create a quick adversarial review process to check a hypothesis.

Combine with /goal and /loop

When using repeatable workflows like triage, research, or verification workflows, you can pair them with /loop to run at fixed intervals, and /goal to set hard completion requirements.

Token Usage Budget

You can set explicit token usage budgets for dynamic workflows to limit token consumption. You can write something like "use 10k tokens" in the prompt to set a 10k token cap.

Saving & Sharing Dynamic Workflows

You can save workflows by pressing 's' in the workflow menu. You can commit them to ~/.claude/workflows or distribute them via skills.

To share them via a skill, place the JavaScript workflow file in the skill folder and reference it in SKILL.md. For greater flexibility, you can also prompt Claude to treat workflows in a skill as templates rather than scripts to be run verbatim.

A Whole New World

Workflows are a useful new way to extend Claude Code. I encourage you to see them as a starting point. There's much more to explore on how best to use them. Please share your findings with us.

Thariq Shihipar and Sid Bidasaria (@sidbid) are members of the Anthropic technical team working on Claude Code.

Трендовые криптовалюты

Связанные с этим вопросы

QWhat is the core value of the dynamic workflows introduced by Claude Code?

AThe core value is enabling Claude to dynamically generate an execution framework for complex tasks: breaking down tasks, dispatching sub-agents, parallel processing, cross-validation, iterative cycles, and even making different agents compete, before synthesizing the results.

QWhat common issues in long-running tasks does the dynamic workflow aim to solve?

AIt aims to solve agentic laziness (stopping prematurely), self-preferential bias (favoring its own conclusions), and goal drift (losing track of the original goal over multiple rounds of execution).

QName one practical pattern mentioned for building dynamic workflows and briefly describe it.

AFan-out and Merge: It splits a task into multiple smaller steps, each handled by a separate agent in its own clean context, and then merges their structured outputs into a final result.

QAccording to the article, what is a significant non-technical use case for dynamic workflows?

ADeep research, such as generating a status report from Slack context or investigating how a feature works by deeply exploring the codebase, is a significant non-technical use case.

QWhat is one key consideration or limitation when deciding to use a dynamic workflow?

ADynamic workflows typically consume more tokens and may not be necessary or efficient for every routine coding task. They are best used to extend Claude Code's capabilities for complex, structured problems.

Похожее

Ранний инвестор в компании Unitree вкладывает в компанию по интерфейсу мозг-компьютер

Ориентируясь на сцену из фильма «Аватар», основатель компании WaBo Technology Чжан Синчжи более десяти лет занимался изучением взаимодействия человека и машины. В конце 2025 года, с перспективным планированием интерфейса «мозг-компьютер» (BCI) в рамках 15-го пятилетнего плана и развитием соответствующих технологий, он основал WaBo Technology. Компания позиционирует себя как модельная, сосредоточившись на создании фундаментальной «модели нейронных намерений человека». Эта система предназначена для преобразования нейронных сигналов, поведения и контекстной информации в стандартизированные «векторы намерений», понятные машинам, для точного понимания целей, тенденций к действию и намерений пользователя, таких как подтверждение, исправление или остановка. Ядро команды сформировалось быстро. После начального раунда финансирования от Source Capital последовал ангельский раунд с участием Vertex Ventures (дочерней компании Temasek), фонда Hongtai, Future Industry Fund Chengdu и Huifengda Capital. Инвесторы высоко оценили системные возможности компании в сборе данных, обработке сигналов и инженерной реализации. Особый интерес вызвало сотрудничество WaBo Technology с Тяньцзиньским университетом в области космических интерфейсов «мозг-компьютер». В планах компании — создание двух штаб-квартир: в Шанхае (передовые исследования, модель нейронных намерений) и в Чэнду (аппаратное обеспечение, производство, поставки). По оценкам Чжан Синчжи, в ближайшие три года отрасль BCI ожидает консолидация, и выживут те компании, которые смогут создать устойчивый цикл «данные — модель — сценарии применения». Футуристическое видение, вдохновленное «Аватаром», постепенно становится реальностью.

marsbit5 мин. назад

Ранний инвестор в компании Unitree вкладывает в компанию по интерфейсу мозг-компьютер

marsbit5 мин. назад

ChangXin Technology: Циклическая акция на вершине цикла

Компания Changxin Technology (长鑫科技) достигла рыночной капитализации в 3,28 трлн юаней, возглавив список компаний на бирже А в Китае. Всего за два года она смогла преодолеть убытки в 163 млрд юаней и прогнозирует чистую прибыль в 50-57 млрд юаней за первое полугодие 2026 года. Этот стремительный рост обусловлен ажиотажным спросом на память DRAM, вызванным бумом в сфере искусственного интеллекта и импортозамещением. Однако корни этой трансформации лежат в циклической природе отрасли DRAM. Продукция стандартизирована, а расширение мощностей занимает годы, что ведет к регулярным циклам дефицита и перепроизводства. Рост прибыли Changxin в основном обусловлен резким скачком цен на DRAM, связанным с перераспределением мощностей мировых гигантов (Samsung, SK Hynix, Micron) в пользу более прибыльной памяти HBM для AI. Несмотря на текущий успех, в отрасли уже намечаются признаки замедления роста цен и начинается масштабная волна инвестиций в новые мощности. Аналитики прогнозируют, что пик цен может прийтись на 2026-2027 годы, а к 2028 году возможно избыточное предложение. Ключевым вызовом для Changxin является преодоление отставания в производстве HBM, чтобы обрести устойчивость к следующему спаду цикла. Таким образом, Changxin Technology является одновременно и важным национальным достижением в области полупроводников, и классической циклической компанией. Ее долгосрочная ценность основана на повестке импортозамещения и росте доли рынка, но текущая рыночная капитализация, по всей видимости, уже учитывает многолетний рост. Инвесторам следует тщательно оценивать риски, связанные с инвестированием в циклическую акцию на пике её цикла.

marsbit10 мин. назад

ChangXin Technology: Циклическая акция на вершине цикла

marsbit10 мин. назад

Самый прибыльный квартал в истории SK Hynix: почему он все равно «не оправдал ожиданий»?

SK Hynix представила отчет за второй квартал 2026 года, показав рекордную прибыль. Выручка составила 79,32 трлн вон (рост на 257% г/г), операционная прибыль достигла 60,54 трлн вон (рост на 557% г/г), а операционная рентабельность поднялась до 76%. Несмотря на эти выдающиеся результаты, отчет был воспринят рынком как «не оправдавший ожиданий», поскольку аналитики прогнозировали выручку в 84 трлн вон и операционную прибыль в 64 трлн вон. После публикации отчетности акции SK Hynix испытали волатильность, что отражает разногласия на рынке. Основная причина «несоответствия» кроется в изменении структуры прибыли. Рост доли продуктов HBM, которые часто поставляются по долгосрочным соглашениям (LTA) с фиксированной ценой, ограничил возможность компании в полной мере воспользоваться быстрым ростом спотовых цен на стандартную память DRAM и NAND. Кроме того, темпы роста средних цен на эти продукты замедлились. Тем не менее, руководство SK Hynix сохраняет оптимистичный прогноз. Спрос на DRAM в 2026 году, как ожидается, вырастет на 20%+, а на NAND — на high-teen процентов. Компания подписала долгосрочные соглашения примерно с 10 клиентами, что обеспечивает стабильность будущих доходов. Также начались поставки памяти HBM4 для новых платформ ИИ (например, NVIDIA Rubin), а капитальные затраты на 2026 год остаются на высоком уровне (свыше 40 трлн вон), что свидетельствует об уверенности в долгосрочном спросе. Таким образом, волатильность акций отражает ключевую дилемму рынка: скептики опасаются, что потенциал роста уже заложен в цене, в то время как оптимисты верят в продолжение суперцикла, связанного с инвестициями в инфраструктуру ИИ. SK Hynix, будучи лидером на рынке памяти для ИИ, остается в центре этой борьбы.

Odaily星球日报50 мин. назад

Самый прибыльный квартал в истории SK Hynix: почему он все равно «не оправдал ожиданий»?

Odaily星球日报50 мин. назад

Что произойдет, если закон CLARITY так и не будет принят?

Закон CLARITY, направленный на создание регуляторной ясности для криптоактивов в США, столкнулся с трудностями в Сенате. Несмотря на одобрение в Палате представителей год назад и продвижение в комитете в мае, его рассмотрение отложено как минимум до сентября. Основное разногласие касается этических положений о криптоактивах госслужащих. Вероятность принятия закона в этом году, по данным Polymarket, упала с 82% до 35%. Если закон не будет принят, аналитики ожидают ограниченного краткосрочного влияния на крипторынок, так как негативные ожидания уже частично учтены. Однако это может усилить волатильность акций компаний, связанных с криптоиндустрией, таких как Coinbase и Circle. Для Coinbase возможна коррекция до уровня $140-160, в то время как для Circle отсутствие новых жёстких правил, ограничивающих доходность стейблкоинов, может быть даже выгодным в долгосрочной перспективе. В Вашингтоне провал закона усилит политический тупик, связав судьбу крипторегулирования с противостоянием демократов и администрации Трампа. Это, вероятно, отложит принятие всеобъемлющих федеральных правил до 2027 года или позже. В ближайшее время отрасль продолжит работать в рамках существующих регуляторных механизмов, таких как закон GENIUS для стейблкоинов и отдельные инициативы SEC и CFTC.

marsbit1 ч. назад

Что произойдет, если закон CLARITY так и не будет принят?

marsbit1 ч. назад

Что произойдет, если закон CLARITY в конечном итоге не будет принят?

**Резюме:** Закон о четкости регулирования цифровых активов (CLARITY) с июля 2025 года находится на рассмотрении в Сенате США. Основная задача закона — разграничить, какие криптоактивы являются ценными бумагами, а какие — товарами, определив полномочия SEC и CFTC. Текущее препятствие — пункт о конфликте интересов госслужащих, связанных с криптоактивами. Вероятность принятия закона в 2026 году, по данным Polymarket, упала с 82% до 35%. **Влияние на рынок:** Аналитики считают, что рынок уже частично учел возможный провал закона. Краткосрочное давление на Bitcoin и акции компаний, таких как Coinbase (COIN) и Circle, возможно, но долгосрочные перспективы остаются устойчивыми благодаря институциональному внедрению криптоактивов. Для Circle отсутствие закона может даже снизить регуляторные риски и усилить конкуренцию. **Политический контекст:** Принятие закона требует поддержки 60 сенаторов, но сопротивление демократов связано не только с содержанием закона, но и с потенциальными конфликтами интересов семьи Трампа. Если закон не будет принят до августа, его шансы в 2026 году значительно снизятся, а дальнейшее продвижение может быть отложено до 2027 года после промежуточных выборов. В качестве альтернативы отрасль продолжит регулироваться по действующему закону GENIUS (для стейблкоинов) и через нормативные инициативы SEC и CFTC.

Odaily星球日报1 ч. назад

Что произойдет, если закон CLARITY в конечном итоге не будет принят?

Odaily星球日报1 ч. назад

Торговля

Спот

Популярные статьи

Неделя обучения по популярным токенам (2): 2026 может стать годом приложений реального времени, сектор AI продолжает оставаться в тренде

2025 год — год институциональных инвесторов, в будущем он будет доминировать в приложениях реального времени.

1.9k просмотров всегоОпубликовано 2025.12.16Обновлено 2025.12.16

Неделя обучения по популярным токенам (2): 2026 может стать годом приложений реального времени, сектор AI продолжает оставаться в тренде

Обсуждения

Добро пожаловать в Сообщество HTX. Здесь вы сможете быть в курсе последних новостей о развитии платформы и получить доступ к профессиональной аналитической информации о рынке. Мнения пользователей о цене на AI (AI) представлены ниже.

活动图片