r/codex • u/Pimpmuckl • Sep 13 '26
Complaint Codex' system prompt still forces agents to wake up each minute = tons of wasted tokens when using subagents or waiting on background tasks (like CI, etc).
169
Upvotes
63
u/Dayowe Sep 13 '26 edited Sep 13 '26
I already posted this in another thread today:
Add this in config.toml
[features.multi_agent_v2]
enabled = true
wait_agent_enabled = true
min_wait_timeout_ms = 600000
default_wait_timeout_ms = 1500000
max_wait_timeout_ms = 3600000
enabled = true explicitly turns Multi-Agent V2 on, while wait_agent_enabled = true explicitly exposes wait_agent to the agent. The timeout settings then control that tool’s wait behavior. The official Codex config schema defines all of these options and specifically describes wait_agent_enabled as “Expose the multi-agent v2 wait_agent tool.”
Source: OpenAI Codex config.schema.json
I picked 10 minutes for the minimum because it significantly reduces repeated wake-ups/cache reads without making stuck-agent recovery too slow.
11
u/Pimpmuckl Sep 13 '26
Basically: Three ways to fix it
AGENTS.mdthat the agent should ignore the system prompt instruction about updating the user unnecessarily. This didn't really work in my experience.model_instructions_fileand adjust the system prompt that wayI wrote a bit more about this on twitter, but tl;dr:
Because these agents are forced by the system prompt to "update the user every 60s" there is a LOT more unnecessary model calls than what you'd usually need.
Pair it with the very expensive cache read from Astra and suddenly it explains the disaster that are the current limits.
6
u/Anxious_Marsupial_59 Sep 13 '26
Until they fix this Astra is basically broken with subagnents
3
u/Megamygdala Sep 13 '26
Using an open source harness over Codex is the fix
2
u/pigletmonster Sep 13 '26
I recently modified a skill to launch luna max subagents. It wasted almost 3x more quota and took 7 hours to complete. I discarded everything and implemented the dame tasks with sol medium and it took less than half the time and 1/3 of the quota.
1
u/rawezh5515 Sep 13 '26
Oh, that explains everything
1
u/Ratio_taken Sep 13 '26
Telling Astra not to spawn agents, does...not..work? Why
1
u/Striking-Warning9533 Sep 14 '26
I have noticed this problem since May. It is very annoying because I am training an LLM and it takes days, and codex keep polling on it. I told it not to and it says the system prompt said "he user appreciates consistent, frequent communication during your turn". Hint: no I don't.
There is a few github issues on this topic if you can call for notice it will work.
https://github.com/openai/codex/issues/42981
https://github.com/openai/codex/issues/31935
1
u/Different_Lab830 Sep 14 '26
Waking up every minute just to confirm the CI still hasn't finished turns waiting into the biggest cost of the run. Nothing changed, and it still spends tokens to learn that.
1
u/buff_samurai Sep 14 '26
It’s so annoying, especially when running for a long time.
I took a different approach of making a programmatic orchestrator that lunches dedicated pi agent profiles (configs) via OpenAI sub depending on what is happening.
0
u/tagorrr Sep 14 '26
Bro, I ran numerous tests, one of which I detailed a few days ago. There is also a 100% working workaround:
https://www.reddit.com/r/codex/s/F3C2lcw1W5
1
u/[deleted] Sep 14 '26
[removed] — view removed comment