Claude Code can now build its own agent workflows on the fly
Anthropic just added dynamic multi-agent workflows to Claude Code, letting the AI write and orchestrate custom JavaScript harnesses for complex tasks. Powered by Claude Opus 4.8, it spawns isolated subagents to run patterns like adversarial review and tournament brackets without context bleed. It burns significantly more tokens, but it turns Claude Code into an autonomous project manager for messy, high-value tasks.

If you push coding agents hard enough, you inevitably hit the wall. The context window fills up, the agent starts hallucinating fixes, falls in love with its own broken logic, and quietly drifts away from what you actually asked it to build.
Anthropic calls this agentic laziness, self-preferential bias, and goal drift. And its latest fix for Claude Code tackles the root cause: last week, Anthropic rolled out dynamic workflows, allowing Claude to write and run its own multi-agent orchestration harness on the fly.
Claude builds its own team on demand
Until now, running multi-agent setups required rigid scaffolding. You had to wire up static scripts using the Claude Agent SDK or chain CLI commands. That works, but it breaks the moment an edge case doesn't fit your pre-baked architecture.
Dynamic workflows flip the script. Powered by Claude Opus 4.8, Claude evaluates your task and writes a custom JavaScript orchestration file specifically for that problem. This runner can spawn subagents with completely isolated context windows, assign different model tiers based on the required intelligence, and even isolate file changes inside dedicated Git worktrees.
If you kill the terminal or get disconnected mid-run, resuming the session picks right back up where the harness left off. You can trigger the mode naturally in conversation or by using the keyword "ultracode."
Tournaments, quarantine, and adversarial checks
Anthropic detailed several patterns that emerge when agents can spin up other agents. One is fan-out and synthesize, where dozens of subagents tackle modular tasks in parallel before a barrier agent merges the results. Anthropic noted that the massive migration of Bun from Zig to Rust relied on this exact strategy across a million-line codebase.
Another pattern is adversarial verification. If you have a flaky race condition that fails one in fifty times, Claude can spin up rival agents with disjoint evidence to champion competing theories until only one survives the logs. For subjective tasks like resume ranking or naming, it can run pairwise tournament brackets rather than flawed absolute scoring.
There is also a quarantine pattern designed for triage. Subagents scraping untrusted bug reports or user input are strictly air-gapped from taking high-privilege actions, handing sanitized findings off to execution agents.
Why it matters
We think this is one of the sharpest architectural pivots in the agent space this year. Instead of trying to build a single master harness that anticipates every edge case, Anthropic is letting Claude treat harness generation as code generation. When the AI orchestrates the architecture, the workflow fits the shape of the problem.
For developers and power users tackling high-stakes engineering—like massive codebase refactors, deep root-cause analysis, or comprehensive doc auditing—dynamic workflows turn Claude into an asynchronous engineering pod. The new /deep-research skill in Claude Code is living proof of what this pipeline looks like in production.
That said, you should not use this casually. Multiplying subagents and pitting them against each other burns tokens at an eye-watering pace. It is explicitly designed for high-value, complex problems where correctness matters more than API spend. But by moving the battleground from context length to dynamic runtime orchestration, Anthropic is showing what post-chatbot software engineering actually looks like.
Sources (1)
- claude.com(opens in a new tab)Originalclaude.com