claude-code - 💡(How to fix) Fix Feature Request: Configurable concurrent subagent limit in workflows

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

{
  "workflow": {
    "maxConcurrentAgents": 32
  }
}

---

const results = await parallel(tasks, { maxConcurrency: 32 })
RAW_BUFFERClick to expand / collapse

Problem

The workflow engine caps concurrent agent() calls at min(16, cpu_cores - 2). On a 10-core machine this means only 8 agents run in parallel. For large-scale workflows (research sweeps, exhaustive reviews, multi-perspective verification), this is a significant bottleneck.

Current Behavior

  • Hard limit: min(16, cpu cores - 2)
  • No configuration option to override
  • Excess agents queue and wait

Proposed Solution

Add a configurable option (e.g., in .claude/settings.json or as a workflow script parameter) to override the concurrent limit:

{
  "workflow": {
    "maxConcurrentAgents": 32
  }
}

Or in workflow scripts:

const results = await parallel(tasks, { maxConcurrency: 32 })

Use Cases

  • Large-scale code reviews across 50+ files
  • Exhaustive bug finding with multiple independent finders
  • Multi-perspective verification panels (5+ independent verifiers per finding)
  • Research sweeps with diverse search strategies

Environment

  • Claude Code version: 2.1.158
  • Platform: macOS (Darwin 25.5.0), 10 cores
  • Actual concurrent limit: 8

Notes

The current cpu_cores - 2 safeguard is sensible as a default, but power users with sufficient resources (cloud instances, dedicated machines) should be able to opt into higher concurrency. The 16 hard cap could also be raised or made configurable.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Feature Request: Configurable concurrent subagent limit in workflows