You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Support for higher or configurable sub-agent spawning limits #16183
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:
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.
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.
Activity
github-actions commentedon Mar 29, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Mar 29, 2026
I think that the
agents.max_threadsconfig key is what you're looking for here. It defaults to 6, but you can override the default with a larger value.