Repository navigation
feat: configure parallel sub-agent limit via environment - #1364
Merged
Merged
Conversation
Default MAX_PARALLEL_SUB_AGENTS to 10 and validate positive integer overrides at startup. Pass the configured limit through turn resource resolution to orchestration. Co-authored-by: TrueForge Agent <trueforge@truefoundry.com>
thesujai
requested review from
chiragjn,
debajyoti-truefoundry and
heerambavi1998
as code owners
November 12, 2026 13:50
🦋 Changeset detectedLatest commit: 8f76a6d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
thesujai
commented
Nov 12, 2026
thesujai
commented
Nov 12, 2026
Co-authored-by: TrueForge Agent <trueforge@truefoundry.com>
heerambavi1998
approved these changes
Nov 12, 2026
Omit unset limits when forwarding to preserve exact optional property semantics. Co-authored-by: TrueForge Agent <trueforge@truefoundry.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear
AGE-2785 — Increase subagents concurrency limit & make it configurable
Summary
MAX_PARALLEL_SUB_AGENTS, defaulting to 10..env.exampleand include patch changesets for core and server.Configuration
The limit is per turn, preserving existing batching behavior. Unset or blank values use the default of 10.
Validation
--max-warnings=0); reran on the orchestrator after the review change.git diff --check.Note
Medium Risk
Raises default sub-agent concurrency and adds an env knob that affects per-turn parallelism and resource load, though behavior is otherwise unchanged and invalid values fail at startup.
Overview
Replaces the hard-coded parallel sub-agent cap (5) with a per-turn, configurable limit that defaults to 10.
MAX_PARALLEL_SUB_AGENTSis read in serverconfig(positive integer validation at startup) and documented in.env.example. The value flows fromcreateTurnResolver→TurnResourceResolver→SessionHandle→AgentThreadOrchestrator, which batches runnable sub-agents using the instance limit instead of a module constant. Core exposesDEFAULT_MAX_PARALLEL_SUB_AGENTSfor the default; hosts that omit the resolver override keep that default.Reviewed by Cursor Bugbot for commit 8f76a6d. Bugbot is set up for automated code reviews on this repo. Configure here.