Claude Code Dynamic Workflow: Hundreds of Sub‑Agents in One Session and a 75‑k‑line Bun Migration in 11 Days

Claude Code’s new dynamic workflow lets a single session launch up to 1,000 sub‑agents with 16‑way concurrency, enabling large‑scale tasks such as migrating 750,000 lines of Bun code from Zig to Rust in just 11 days while achieving a 99.8% test‑suite pass rate.

AI Engineering
AI Engineering
AI Engineering
Claude Code Dynamic Workflow: Hundreds of Sub‑Agents in One Session and a 75‑k‑line Bun Migration in 11 Days

MIT CSAIL and the DSPy team released a paper on Recursive Language Models (RLM), a paradigm that treats long prompts as external environments, enabling large models to programmatically decompose tasks and recursively invoke themselves, thereby exceeding context‑window limits on both long and short tasks.

Core Capability

The dynamic workflow’s core logic has Claude generate JavaScript orchestration scripts on‑the‑fly. These scripts launch dozens to hundreds of coordinated sub‑agents that run in parallel. All intermediate results are cross‑validated before the final answer is returned.

Unlike Claude Code’s built‑in sub‑agents and skill functions, the orchestration lives in an independent script outside the model’s context window, supporting up to 1,000 sub‑agents per session, 16 concurrent lanes, and checkpoint‑resume capability so interrupted tasks can continue without restarting.

How to Trigger

Include the keyword workflow in the prompt to explicitly request a workflow.

Run the /effort ultracode command, which raises the inference effort level; Claude then decides whether the task requires a workflow.

Applicable Scenarios and Real‑World Cases

The workflow targets complex tasks that a single agent cannot finish in one turn. Official scenarios include:

Full‑code‑base vulnerability scanning, performance‑optimisation audits, and security checks.

Large‑scale cross‑framework, cross‑language code migrations involving thousands of files.

High‑risk tasks that need multiple independent sub‑agents for cross‑validation or adversarial testing.

Case study: Bun creator Jarred Sumner used the dynamic workflow to port 750,000 lines of Bun code from Zig to Rust. The migration took 11 days from first commit to merge, and the existing test suite achieved a 99.8 % pass rate. The process was broken into several workflow stages:

Sub‑agents mapped each Zig struct to a Rust lifetime.

Hundreds of agents generated Rust implementations for each file.

Each file underwent two independent reviews.

A repair loop repeatedly built and tested until all tests passed.

An overnight workflow scanned for unnecessary data copies and automatically generated PRs for final human review.

Enterprise pilots:

Klarna’s senior engineering manager Alessio Vallero reported that the workflow discovered dead code and refactoring opportunities missed by traditional static analysis tools, accelerating maintenance efficiency.

CyberAgent’s chief systems engineer Ken Takao noted that the workflow bridges the gap between single‑agent and full‑team pipelines, providing smoother planning‑to‑execution flow and preserving visibility for long‑running tasks.

Usage Tips

Dynamic workflows consume significantly more tokens than ordinary Claude Code sessions. The documentation advises starting with well‑scoped small tasks to gauge consumption before scaling up. When a workflow is first launched, Claude displays a planning and cost preview that the user must confirm.

Feature access depends on the subscription tier: Max and Team plans enable dynamic workflows by default; Enterprise plans require an admin to enable it, and admins can also disable the feature organization‑wide. Individual users can toggle the feature via the /config command.

The capability is available through Claude Code’s CLI, desktop client, VS Code extension, as well as via Claude API, AWS Bedrock, Google Cloud Vertex AI, and Microsoft Foundry. Documentation: http://code.claude.com/docs/en/workflows

User Feedback

Developers joke that “everything is fun until the sub‑agents form a union.”

Some recall earlier /goal issues with incomplete execution and wonder if similar problems appear in workflow mode.

Comments highlight the core shift: “Prompts are no longer instructions to an executor but a temporary org chart.”

Others observe that “a single prompt becoming a coordinated workflow mirrors real code‑base change processes.”

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

code migrationClaude CodeAgent OrchestrationDynamic WorkflowRecursive Language Model
AI Engineering
Written by

AI Engineering

Focused on cutting‑edge product and technology information and practical experience sharing in the AI field (large models, MLOps/LLMOps, AI application development, AI infrastructure).

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.