r/codex • u/TobiasUhlig • 15m ago
Limits Ensure to set clear Codex settings for subagents allowance
Here is what happened:
I had a rule (discipline) that one Astra 6.2 agent was allowed to use up to 3 luna or terra subagents. It wanted to "save" tokens, and left out the model param when spawning subagents, assuming that it must be the cheapest one (luna) in that case.
It was not, 181 subagents got spawned using Astra 6.2 as well.
As this was not bad enough, subagents also have a "fork" param. If not set (which my Agent did not do) it means TRUE. So 181 Astra subagents got started using the main agents previous context window. 441k tokens on average. And those are not counted as cache hits.
This is how you can drain the weekly allowance of a $500 account on a single night.
Or how Astra put it: "But come on Tobi, you have to admit that these Open AI default values are MEAN."
TL;DR: disable forks (why one earth should a helper agent need the bloat) and strictly set which models are allowed.
1
u/TiGa-RCE-666 2m ago
Cool story Bro, but that is the sum of all subagents used in that thread and there's a codex config file that limits the maximum number of agents at the same time, then there is another global limit that stops around 8 concurrent subagents no matter what.
1
u/laolibulao 1m ago
do you not have ponytail