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

Resolved 💬 2 comments Opened Mar 29, 2026 by LIHUA919 Closed Mar 29, 2026

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:

<img width="952" height="782" alt="Image" src="https://github.com/user-attachments/assets/5ee314e9-5bed-4cd2-a0a5-fb12cd025119" />

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_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗