“agent thread limit reached” << it got this after two subagents spawned
That happened in a longer thread with 1400 turns in one thread in about 30 hours..
Which is alot higher than what I normally did.
I used main thread as an orchestrator for the subagents and then i logged into the subagents and added a couple “next”, “next”,.. to start anotehr turn.
but then the main turn goes to next turn and the subagents are not listed there anymore but run in the background…
might be that they hung up and blocked something - you are welcome
turn prompt1
– sub1
– – next
– – next
– sub2
– – next
– – next
– sub3
– – next
– – next
– sub4
– – next
– – next
– sub5
– – next
– – next
– sub6
– – next
– – next
then main loops in a poll loop to check the subs every 60 seconds and if there is one idle then start a new one
but this turn loop ends eventually and then it doesn’t show the subs anymore
Is it possible that the agents are spawning more subagents, or that previously spawned agents were not properly despawned? Maybe it is a combination of both.
Those would be among the usual suspects for this kind of issue.
might as well been some idle subagents that wait for new instructions in a loop.. so hmm maybe not a bug.. but you don’t see the subagents anymore after orchestrator goes into next loop.. you can’t see the subagents anymore…
would be cool to have an extra pane for the subagents.. the code view isn’t needed much anymore anyways haha
We hit the thread limit on the fourth worker, so I’m clearing out the completed older workers first. Then I’ll spawn the next worker as requested.
My limit is six subagents, which is the default setting. However, even though Codex previously reported that the other agents had been despawned, that apparently was not fully accurate.
Ps. I also don’t see the currently running subagents in the Codex App. They exist in a hidden state (MacOS).
Yeah, its often not closing the “thread handles” on subagents
Try telling codex to always close thread handles for subagents after they are done when you ask it to use subagents (or perhaps try in custom instructions, I didnt try that yet)
Otherwise it just keeps spawning more, while not all are closed
Or after the first turn of using them, ask it to check if some subagent thread handles are still not closed and to close them
It seems it still needs some help with these
Also these are default
multi_agent = true
there is also under development
multi_agent_v2 = true
Actually still didnt try v2
There isnt exactly an explanation/documentation on it yet it seems
Just have to use ChatGPT/codex to check their repo and explain the v2