Skip to content

Add a setting to limit concurrent sub-agent runs #40903

Closed as not planned
Closed as not planned

Description

@nodir-malikov

Problem

T3 Code has no setting to limit how many sub-agents run at the same time. A parent thread can start many sub-agents in parallel. This can overload the machine and exhaust provider rate limits and usage quotas. Related: #18485 (memory growth while many agents run at the same time).

What exists today

  • orchestrator_capabilities returns features.maxBatchThreads: 20.
  • This value is a hard-coded literal in src/mcp/OrchestratorMcpService.ts (server 0.1.11).
  • It limits only the size of one create_threads call. It does not limit concurrent runs.
  • t3_environment_preferences_update has no field for it. The only related field is backgroundActivity.profile, and its effect on agents is not documented.

Request

Add a user setting, for example maxConcurrentSubagents:

  • Settings UI, plus a field in t3_environment_preferences_update.
  • Default: no limit (the current behavior).
  • When the limit is reached, new delegate_task calls wait in a queue, or return a clear error. Say which one in the docs.
  • Optional: apply the limit per parent thread and also globally per environment.

Acceptance criteria

  • With the limit set to N, no more than N sub-agents run at the same time.
  • The current limit is visible in orchestrator_capabilities.
  • The setting survives an app restart.

Activity

  1. juliusmarminge commented on Nov 22, 2026

    @juliusmarminge
    Member

    Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions