CloudCodeTree LogoCloudCodeTree
AI NewsTutorialsAbout
CloudCodeTree Logo
CloudCodeTree
  • AI News
  • Tutorials
  • About
← Back to AI News
Right-Size Your Agent Fleet: Dynamic Workflow Sizing and OTel Tracing in Claude Code v2.1.202

Right-Size Your Agent Fleet: Dynamic Workflow Sizing and OTel Tracing in Claude Code v2.1.202

Chris Harper

2 min read

Jul 7, 2026 · 04:07 UTC

AI
Workflow
Claude Code
Agents
Best Practices

TL;DR: Set /config workflow.size=small to cap dynamic workflow costs during testing; flip to large for big parallel sweeps; two new OTel attributes let you trace each run end-to-end.

Claude Code's dynamic workflows — where Claude plans a task and orchestrates parallel subagents to execute it — now expose two new controls in v2.1.202 (July 6, 2026).

Dynamic workflow sizing

A new workflow.size setting in /config controls how many agents get spawned when Claude runs a dynamic workflow:

/config workflow.size=small    # 2–4 agents, cheapest
/config workflow.size=medium   # 8–12 agents, default
/config workflow.size=large    # full fleet, up to 100+ agents

When to use each:

  • small — test a new workflow script or audit that an agentic task does what you expect before spending real tokens. A workflow that sweeps 500 files on large might cost $30+; the same logic on small gives you representative output at a fraction of the cost.
  • medium — the default. Right for most feature work, code reviews, and multi-file refactors.
  • large — reserve for tasks where parallelism is the point: large-scale migrations, codebase-wide audits, or batch processing pipelines where wall-clock time matters. Monitor spend if you enable this on Opus.

You can also set it per session by passing --workflow-size small on the CLI, or set it permanently in your project's .claude/settings.json:

{
  "workflow": {
    "size": "small"
  }
}

OpenTelemetry workflow attributes

Two new span attributes make workflow telemetry actionable:

AttributeValue
workflow.run_idUnique ID for this workflow execution
workflow.nameThe name from the workflow script's meta block

If you're already shipping Claude Code's OTLP traces to Grafana, Honeycomb, or Datadog, these attributes unlock per-workflow dashboards — filter by workflow.name to compare cost across runs of the same workflow, or drill into a specific failed run by its workflow.run_id. Combined with the existing session.cost_usd attribute, you can alert on workflow-level cost spikes independently from interactive sessions.

Other v2.1.202 changes

The same release fixes several notable bugs: session resume was taking minutes when many git worktrees were open, /review <pr> reverts to a fast single-pass review, Remote Control commands were failing with "Unknown command," and re-invoking a loaded skill was appending duplicate instructions. Full list at the changelog.

Sources: Claude Code changelog v2.1.202 · Dynamic Workflows docs