A harness for every task: dynamic workflows in Claude Code

Thariq Shihipar and Sid Bidasaria (Anthropic, Claude Code team) ยท article ยท 2026-06-02 source โ†— Reader ๐Ÿ–ฅ๏ธ

Agent Coordination Overhead (Supervisor vs. Workflow)Agent HarnessAgent SecurityAgent Context Files (CLAUDE.md / AGENTS.md)Context Rot & Context LimitsMulti-Agent OrchestrationAI Workflow Patterns
Because a single, continuously-running context window degrades on long, parallel, structured, or adversarial tasks through three specific failure modes โ€” agentic laziness, self-preferential bias, and goal drift โ€” Claude Code should let the model write and orchestrate a custom, task-specific multi-agent harness (a dynamic workflow) on the fly, rather than relying on one generic static harness for every task.

practical ยท expository โ€” A product feature explainer written by its own authors: describes what dynamic workflows are, why they exist (three named failure modes of single-context execution), and a catalog of reusable composition patterns and use cases.

Structure

PartRole
Example prompts across technical and non-technical tasksconcrete orientation before the mechanism
How dynamic workflows work (JavaScript harness, subagent spawning/coordination, model/isolation choice, resumability)mechanism
Three named failure modes of single-context execution (agentic laziness, self-preferential bias, goal drift)the problem dynamic workflows solve
Dynamic vs. static workflowscontrast with the prior approach (Agent SDK / claude -p scripted orchestration)
Six composable patterns (classify-and-act, fan-out-and-synthesize, adversarial verification, generate-and-filter, tournament, loop-until-done)reusable vocabulary for building workflows
Eleven use cases (migrations, deep research, deep verification, sorting, memory/rule adherence, root-cause investigation, triage at scale, exploration/taste, evals, model routing)evidence of generality beyond coding
When not to use dynamic workflows, token budgets, saving/sharingqualification and operational guidance

Key terms

Propositions

Arguments

Use dynamic, task-specific multi-agent workflows instead of one generic harness for long-running, parallel, structured, or adversarial tasks. strength: high
Explicit premises:
Implicit premises:
Inferences:

Narratives

Questions addressed

Gaps

Related documents