Skip to content

Feature Request: Support for higher or configurable sub-agent spawning limits #16183

Closed

Description

@LIHUA919

What variant of Codex are you using?

App

What feature would you like to see?

Description:
When using codex for complex task decomposition (e.g., splitting a project into parallel design and implementation tracks), I frequently encounter the "Failed to spawn agents" error due to the hard limit on the number of concurrent sub-agents.

Current Pain Point:
As shown in the attached logs, my workflow involves:

Image

Spawning a "Social Mechanism Design" agent.

Spawning two independent "Implementation" agents.

Managing the main thread for integration and synchronization.

Currently, I have to manually close completed "Research" or "Survey" agents to free up slots for "Implementation" agents. This manual intervention disrupts the "main thread" logic and limits the system's ability to handle high-granularity parallel tasks.

Suggested Solution:
Configurable Limit: Allow users to define max_parallel_agents in the configuration file (e.g., settings.json or .env).

Dynamic Scaling: If system resources allow, increase the default hard limit to better support multi-faceted workflows .

Queue Management: Implement a simple queue where pending agents are spawned automatically as soon as existing ones are closed.

Context:
For advanced AI research and complex engineering tasks (like building Reward Models or multi-agent frameworks), the current limit acts as a significant bottleneck for developer productivity.

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    tool-callsIssues related to tool calling
    on Mar 29, 2026
  2. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor
  3. added
    agentIssues related to the core agent loop
    and removed
    tool-callsIssues related to tool calling
    appIssues related to the Codex desktop app
    on Mar 29, 2026
  4. etraut-openai commented on Mar 29, 2026

    @etraut-openai
    Contributor

    I think that the agents.max_threads config key is what you're looking for here. It defaults to 6, but you can override the default with a larger value.

  5. added
    subagentIssues involving subagents or multi-agent features
    and removed
    agentIssues related to the core agent loop
    on Apr 11, 2026
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

    enhancementNew feature or requestsubagentIssues involving subagents or multi-agent features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions