SKIP TO CONTENT
ON AIR — VIBE CODING ACADEMY · EN · LIVE
All articles
TUTORIAL·June 1, 2026·9 MIN READ

Claude Opus 4.8 Is Live: How to Use Dynamic Workflows for Hundreds of Parallel Subagents

By EndOfCoding

Anthropic shipped Claude Opus 4.8 today with one headline feature: Dynamic Workflows. This lets a single orchestrator agent spawn hundreds of parallel subagents in real time, each handling a discrete subtask, with results aggregated back into the orchestrator's context. For developers doing serious agentic work — large codebases, parallel test runs, multi-file refactors, comprehensive security scans — this changes what's possible in a single session. Here's everything you need to know and a working implementation you can use today.

What You'll Learn

You'll understand what Dynamic Workflows are and how they differ from sequential agent calls, the architecture behind parallel subagent spawning, how to write an orchestrator prompt that leverages Dynamic Workflows effectively, a concrete worked example (parallel code review across a large codebase), and the billing and rate-limit considerations you need to know before you scale.

What Dynamic Workflows Are

Previously, if you wanted parallel agent execution with Claude, you had to manage multiple API calls yourself — spinning up concurrent requests, managing their contexts, aggregating results. Dynamic Workflows move this coordination into the model layer.

With Dynamic Workflows, you write a single orchestrator prompt. The model's reasoning process identifies parallelizable subtasks and spawns subagents for each, tracking their execution and aggregating results without requiring your code to manage the concurrency.

From Anthropic's announcement:

'Dynamic Workflows enable Claude to decompose complex tasks into parallel workstreams, coordinate hundreds of subagents simultaneously, and synthesize results into coherent outputs — all within a single high-level instruction.'

The Architecture

Your prompt
     ↓
[Orchestrator Agent - Opus 4.8]
  ↓        ↓        ↓        ↓
[Sub-1] [Sub-2] [Sub-3] ... [Sub-N]  ← parallel, each with isolated context
  ↓        ↓        ↓        ↓
[Orchestrator aggregates all results]
     ↓
Synthesized output to you

Subagents are not separate API calls you manage. They are spawned and managed by the orchestrator model internally. You interact only with the orchestrator.

Enabling Dynamic Workflows

Dynamic Workflows require Claude Opus 4.8 and must be enabled in your API call:

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();

const response = await client.messages.create({
  model: 'claude-opus-4-8',
  max_tokens: 16000,
  betas: ['dynamic-workflows-2026-06'],  // Enable the beta feature
  system: `You are an expert software engineering orchestrator. 
When given a task that can be parallelized, use Dynamic Workflows 
to spawn parallel subagents for independent subtasks. 
Always aggregate and synthesize results into a coherent final output.`,
  messages: [
    {
      role: 'user',
      content: 'Review every file in the /src directory for security vulnerabilities. Run checks in parallel and give me a prioritized findings report.',
    },
  ],
});

console.log(response.content[0].text);

Worked Example: Parallel Codebase Security Review

This is the canonical use case for Dynamic Workflows — a task that is embarrassingly parallelizable:

const parallelSecurityReview = async (repoPath: string) => {
  const fileList = await getSourceFiles(repoPath); // Get all .ts, .tsx, .js files
  
  const response = await client.messages.create({
    model: 'claude-opus-4-8',
    max_tokens: 32000,
    betas: ['dynamic-workflows-2026-06'],
    messages: [
      {
        role: 'user',
        content: `
Security review task for ${fileList.length} source files.

Files to review:
${fileList.join('\n')}

File contents:
${await readAllFiles(fileList)}

Instructions:
1. Spawn parallel subagents — one per file or logical group of related files
2. Each subagent reviews its assigned files for OWASP Top 10 vulnerabilities:
   - Injection (SQL, command, LDAP)
   - Authentication bypass
   - Sensitive data exposure
   - IDOR / broken access control
   - XSS / CSRF
3. Each subagent returns: { file, findings: [{ line, type, severity, description, fix }] }
4. Aggregate all findings, deduplicate, and sort by severity (CRITICAL → HIGH → MEDIUM → LOW)
5. Output a final prioritized security report
        `,
      },
    ],
  });
  
  return response.content[0].text;
};

Previously this would take sequential API calls across all files. With Dynamic Workflows, Opus 4.8 parallelizes the file reviews internally and returns a synthesized report.

Other High-Value Use Cases

Parallel Test Generation

// Spawn one subagent per module to generate tests in parallel
const prompt = `
Generate comprehensive unit tests for all modules in this codebase.
Parallelize: one subagent per module directory.
Each subagent outputs test file contents for its module.
Aggregate: return all test files as a unified test suite.
`;

Parallel Documentation

// Generate API docs for all endpoints simultaneously
const prompt = `
Document all API endpoints in /src/api.
Parallelize: one subagent per API route file.
Each subagent outputs OpenAPI YAML for its routes.
Aggregate: merge all route definitions into a single openapi.yaml.
`;

Parallel Migration

// Migrate component library across entire codebase
const prompt = `
Migrate all components from MUI v5 to shadcn/ui.
Parallelize: one subagent per component file.
Each subagent outputs the migrated component.
Aggregate: list all changed files and any migration notes.
`;

Billing and Rate Limits

Dynamic Workflows use token credits for each subagent's context + compute. Key considerations:

  • Billing: Each subagent's input + output tokens are billed. 100 subagents reviewing 100 files means 100x the token volume.
  • Rate limits: Dynamic Workflows have their own rate limit tier — check your account's Dynamic Workflow limits in the Anthropic console.
  • Cost estimation: For a 50-file codebase, expect roughly 5–15x the token cost of a sequential review (the parallelism adds overhead but removes the sequential accumulation of context).
  • Use case fit: Dynamic Workflows shine when tasks are large (50+ files, 30+ test suites) and fully parallelizable. For small tasks, sequential is cheaper.

Prompt Patterns That Work Best

Dynamic Workflows work best when your prompt explicitly signals:

  1. What to parallelize — "one subagent per file" or "one subagent per module"
  2. What each subagent must output — a schema or format
  3. How to aggregate — "merge", "deduplicate", "sort by", "synthesize"

Prompts that don't specify parallelization structure will fall back to sequential execution.

Common Challenges

'Dynamic Workflows beta isn't available on my account' — Dynamic Workflows require Opus 4.8 and are rolling out to API tiers starting with Teams and above. Check the Anthropic console for your beta access status. Individual API access may lag Teams by 1-2 weeks. 'My parallel review missed some files' — If you're passing file contents directly in the prompt, very large repos (1000+ files) may hit context limits before the orchestrator can dispatch all subagents. Solution: pass file paths only in the initial prompt and have each subagent use a file-reading tool to fetch its assigned files. 'Billing is higher than expected' — Track per-call token usage with response.usage.input_tokens and response.usage.output_tokens. Dynamic Workflow subagent tokens are included in the response usage. Set a token budget before dispatching large parallel tasks.

Advanced Tips

Pair Dynamic Workflows with structured output schemas — Have each subagent return a JSON object matching a Zod schema. The orchestrator can then merge structured outputs deterministically rather than synthesizing freeform text. This produces more reliable aggregated results. Use Dynamic Workflows for your own product's AI features — If you're building an AI product, Dynamic Workflows let you give users the 'it analyzed everything' experience that users expect from AI. Instead of showing progress on a single sequential task, dispatch parallel analysis and return comprehensive results instantly. Watch the cost/parallelism tradeoff — For tasks under 20 files, sequential is usually cheaper. Dynamic Workflows pay off at scale. Build a threshold check into your orchestration code: if fileCount < 20, run sequential; else use Dynamic Workflows.

Conclusion

Dynamic Workflows in Claude Opus 4.8 make parallel agentic work accessible without complex concurrency management in your application code. The tasks that previously required custom multi-threading or parallel API orchestration can now be expressed as a single well-structured prompt. This is the infrastructure that makes Karpathy's Agentic Engineering framework practical at scale — the tooling has caught up to the paradigm. For the foundational multi-agent curriculum, see Chapter 6 of the Vibe Coding Ebook, and the Multi-Agent Development course at the Academy covers orchestration patterns including the Dynamic Workflows approach in full.