r/codex • • Jul 24 '26

Workaround Possible GPT-5.6 Sol usage workaround: explicit tool batching cut weighted usage by 27–45% in my repeated tests

[deleted] — view deleted post

376 Upvotes

52 comments sorted by

5

u/Zandesh Jul 24 '26

Very interesting! Your post inspired me to turn the idea into an experimental Codex skill for bounded, concurrent tool execution:

https://github.com/JinParkmida/bounded-batch

It is still subject to testing and refinement, and contributions, replications, criticism, and negative results are all welcome.

0

u/[deleted] Jul 24 '26

[deleted] — view deleted comment

3

u/Zandesh Jul 24 '26

Thanks — and yes, crediting the original investigation properly was important to me.

I haven’t yet run controlled Codex A/B tests that would justify publishing performance numbers for the skill itself.

So far, I’ve tested the package mechanics: validation, concurrent execution, timeouts, truncation reporting, malformed manifests, and policy filtering.

The actual model-level questions—usage reduction, invocation reliability, completeness, and answer quality—still need paired testing. The truncation caveat was mainly included because I didn’t want to turn an interesting preliminary result into an unqualified “usage-saving” claim. Your latest update definitely adds useful nuance, especially that truncation also occurred in non-batched runs and did not clearly produce materially worse conclusions.

I’ll update the documentation to reflect that distinction more clearly.

The repository includes an evaluation scaffold precisely so results—positive, negative, or inconclusive—can be collected transparently. Contributions or test results would be very welcome.

2

u/kepners Jul 24 '26

Chap this really worked for me! on both Claude and Codex!

0

u/[deleted] Jul 24 '26

[deleted] — view deleted comment

2

u/kepners Jul 24 '26

no i havent, but have been working alot hard today and i havent hit the 5hour mark and used a fraction of what i normally use on CLaude especially!

93

u/ComputerEngineer0011 Jul 24 '26

Interesting read. I’m sure many of us would like to test this but we don’t have any weekly usage left 😭

10

u/ds1841 Jul 24 '26

I was counting on a reset today so I left my sol ultra cook for 16 hours 😂😭

41

u/Pronoia2-4601 Jul 24 '26

Thank you so much for this. My Sol 5.6 concurs.

"I tested the new instruction twice on the same task:

  • Without it: about 2.9 million tokens
  • With it: about 2.05 million tokens

So the instruction saved roughly 30% of tokens in this test while producing comparable conclusions and more supporting evidence.

The instructed run:

  • Took 448 seconds instead of 330
  • Ran 63 inspections instead of 28
  • Produced 50 evidence references instead of 38
  • Reached equally sound conclusions
  • Used about 30% fewer tokens

It inspected fewer distinct files, 34 versus 40, so “more diligent” here means deeper and more evidence-rich within the chosen files, rather than broader coverage.

Two connection retries also inflated its runtime. My conclusion is: batching improved token efficiency and encouraged more investigation, while wall-clock speed remained inconclusive."

TL;DR initial impressions seem positive.

23

u/tulwio Jul 24 '26

Thanks for this OP. I tried it and got similar results. It really is absurd that users had to reverse-engineer a workaround for GPT-5.6 burning substantially more quota because OpenAI shipped an under-tested orchestration regression. This should have been caught before release, but I guess Voice mode and capturing Claude Code’s audience with fake resets was prio…

2

u/Malenx_ Jul 24 '26

Maybe they’re starting to weight models on profitability?

20

u/gtgderek Jul 24 '26 edited Jul 24 '26

Alright... I am not one to look at post about saving tokens, but damn I am glad I checked this one. Ran it across two of my code bases with side by side checks with 5 different tests.

Thank you for this!!

The randomised order was C→T, T→C, C→T, T→C, T→C. Every treatment used one nested Promise.allSettled cell with four calls; every control made four serial tool calls. Median observed wall time was 24 seconds for control versus 20 seconds for treatment, but treat that as directional because startup/cache effects are not fully normalised.

Tested in Terra Max

**edit to fix grammar.

1

u/justlaughandmoveon Jul 24 '26

Can you dumb this down for me please? Do I understand that the last row indicates the usage savings you’re making with OP’s change?

2

u/gtgderek Jul 24 '26

Control was the baseline… with his changes in place in the second column. The last column is the improvements over baseline. So yes, his recommended changes made a massive improvement.

0

u/justlaughandmoveon Jul 24 '26

Thank you much :)

1

u/gtgderek Jul 24 '26

You’re very welcome. Usage improvements changes by model, that is why I put the model that I did control with.

5

u/dkluis-dpg Jul 24 '26

I asked Codex Sol / High what it thought about the optimize instructions and this is what it answered back:

The intent makes sense, but I would revise it before adding it to AGENTS.md.

The main benefit would be faster work with fewer tool round trips. For example, repository status, file searches, and documentation inspection could run together when none depends on another. I would still keep builds, mutations, approval-requiring operations, and diagnosis driven by earlier results sequential.

One technical correction: Promise.all(...) does not actually abort tool calls that have already started when one fails. It only rejects without returning the other results, which conflicts with “inspect every result.” Promise.allSettled(...) is therefore safer for most diagnostic batching.

Recommended wording:

Effect on my work:

  • Faster repository inspection and verification.
  • Fewer commentary/tool transitions.
  • More deliberate grouping into bounded stages.
  • Better visibility into partial diagnostic failures.
  • No change to implementation decisions or safety boundaries.
  • Builds that write to the same outputs, patches, live mutations, and approval requests would remain sequential.

I would place it under ## Working Rules. The conditional “when functions.exec is available” is important because AGENTS.mdmay also be read by agents or environments that do not provide that orchestration tool.

4

u/thonfom Jul 24 '26

I've been running 5 codex sessions on parallel worktrees with my Pro plan, running into weekly usage limits almost daily. I'll give this a try and report back!

1

u/Odd-Conversation-101 Jul 24 '26

Any updates?

2

u/thonfom Jul 24 '26 edited Jul 24 '26

I didn't notice any improvement to be honest. Started at around 90% usage remaining when I posted that comment, now at 0. Same 5 worktrees and sessions. I added the instructions to my global AGENTS.md file and told all my sessions to follow it.

4

u/Acehan_ Jul 24 '26

Amazing work! Good stuff.

4

u/Big-Independent-3093 Jul 25 '26 edited Jul 28 '26

I used your AGENTS example and added a few modifications of my own:

Agentic Loop Suppression: Independent reads, checks and tool calls are grouped into a single batch for each phase. Separate model cycles are avoided when they would only describe progress, poll for unchanged results, or re-analyze the same outcome.

Limited Context Lifetime: Each new phase starts from the latest validated checkpoint. Old conversation history, completed phases and already hydrated owner context are not carried forward automatically.

Now added this as well. I’ll test it and see how it performs:

Compaction Quality Trigger: Compaction is not treated as a failure by itself. The key question is whether it is followed by a patch, test, decision, or other required evidence. Once the stop condition is satisfied, the task ends. The next independent milestone in a long-running session starts as a fresh task.

Results so far. I should add that I started with GPT-5.5, so I still need to run more tasks using only GPT-5.6 SOL before drawing any firm conclusions.

On paper, GPT-5.6 SOL may appear to do more “work,” but that does not necessarily mean it is more efficient. It may use more tools, create more intermediate steps and explore several possible approaches before deciding which one best fits the task. That can result in more reasoning and higher usage, even when the final result is similar to what GPT-5.5 produces with fewer steps.

So more reasoning is not automatically the same as better efficiency. The real question is whether the additional exploration produces a meaningfully better result or simply reaches a similar outcome at a higher cost.

EDIT: More tests, results and conclusions can be found in the replies below. My final conclusion, based on longer-term testing, is that an optimized GPT-5.6 SOL setup works best for me. Ultimately, though, you should choose the model and workflow that best fit your own needs.

2

u/Big-Independent-3093 Jul 26 '26

I ran several more tests over the past few days. The overall pattern was fairly consistent: the optimization rules worked well for GPT-5.6 SOL, but the same rules did not appear to suit GPT-5.5 High as well.

With GPT-5.5 High, the optimized runs often took longer, produced more code, made more mistakes, and required more repair cycles. The unoptimized GPT-5.5 run performed better than the optimized 5.5 runs, so GPT-5.5 may either need a much lighter, model-specific ruleset or simply a clear task and enough freedom to choose its own execution strategy.

GPT-5.5 did sometimes use fewer raw tokens than GPT-5.6 SOL, but it also produced a weaker overall result in my tests: more code, less polished UI/UX, more failures and more rework. That initial token saving may disappear if the result then needs additional fixes or another model to audit it.

So my current conclusion is:

  • Without optimization, GPT-5.5 High can be more token-efficient than GPT-5.6 SOL.
  • The previous optimization rules appear to help GPT-5.6 SOL substantially.
  • Optimized GPT-5.6 SOL Medium outperformed GPT-5.5 High in overall outcome efficiency: better UI/UX, fewer mistakes, less rework, and faster completion.
  • The same optimization rules should not automatically be applied to every model.

This is still based on my own repeated project runs rather than a universal benchmark, but the direction was consistent enough that I would currently use optimized GPT-5.6 SOL Medium for full application work and test a lighter, separate approach for GPT-5.5.

1

u/Big-Independent-3093 Jul 25 '26

I tested four completely fresh projects: two with the optimized AGENTS md rules and two without them.

The task was identical in every run: build a local browser-based Codex usage dashboard from scratch. It had to load JSONL session logs, calculate token metrics, provide filtering and session comparisons, display a visual activity timeline, handle malformed records, include sample data, and run entirely in the browser without uploading anything.

Even the weaker optimized run used 47.7% less total token activity than the non-optimized comparison:

  • 42.4% fewer token-meter events
  • 43.3% fewer tool calls
  • 39.4% less uncached input
  • 48.3% less cached input
  • 1 patch → test → fix cycle instead of 6
  • 2 successful patches instead of 7

The biggest difference was not simply that each individual model call was smaller. The optimized run avoided repeated implementation and repair loops. The non-optimized run repeatedly followed this pattern:

patch → validate → discover another issue → patch again → revalidate

Each additional cycle created another model turn, carried forward a larger context, and required more tool calls. Its context eventually grew to about 114k tokens, compared with about 87k in the optimized run.

I also compared the two optimized runs with each other, because the first optimized run performed much better than the second one. The stronger optimized run still used 37.8% less total activity, despite both having the same rules.

The difference was mainly first-pass convergence:

  • one coherent implementation patch instead of two;
  • no patch → test → fix cycle;
  • 29% fewer tool calls;
  • 29% fewer token events;
  • fewer repeated validations and DOM snapshots;
  • smaller median and maximum context;
  • it stopped once sufficient validation evidence existed.

So the strongest run did not win because it blindly skipped validation. It chose a smaller sufficient design, implemented it coherently, validated it in a focused way, and stopped at the correct point.

My main takeaway is:

The largest token savings came from avoiding unnecessary decision, repair, and revalidation cycles—not merely from reducing the size of each individual model call.

The most useful additional AGENTS md rules appear to be:

Smallest sufficient implementation: Prefer the simplest design that satisfies the stated requirements. Do not expand architecture or scope without a concrete requirement.

First-pass convergence: Before the initial patch, identify the required data flow, UI states, error paths, acceptance checks, and validation plan. Prefer one coherent implementation pass over speculative partial patches.

Bounded validation: Plan one focused validation batch. Avoid repeated snapshots, equivalent selector checks, duplicate browser setup, and full revalidation unless a later patch changed the relevant behavior.

Root-cause repair: When validation fails, identify the common cause and group related fixes into one patch instead of repairing symptoms one at a time.

Stop after sufficient evidence: Once the required validation passes, stop unless there is a reproducible defect, missing requirement, or explicit evidence gap.

For debugging high usage, the most useful metrics were:

  • number of patch → test → fix cycles;
  • total token-meter events;
  • tool-call count;
  • repeated commands and snapshots;
  • tokens before the first successful patch;
  • tokens after the last sufficient validation;
  • median and maximum context size;
  • absolute cached input, not just cache percentage.

A high cached-input percentage is not automatically efficient. A large context processed repeatedly across many agentic loops can still consume a huge amount of usage.

This is still a small sample, so I would not claim one universal savings percentage. However, the repeated direction of the results suggests that the optimization rules have a real measurable effect, and that reducing rework is probably the most important part.

1

u/Big-Independent-3093 Jul 25 '26 edited Jul 27 '26

A rough follow-up on practical weekly capacity

I also compared the weekly-limit consumption of the two models before applying these optimization rules.

In my usage, GPT-5.5 High was around 2% of the Pro Lite weekly limit per active hour, while GPT-5.6 SOL Medium was closer to 5–6% per active hour. That suggests GPT-5.6 SOL was using roughly 2–2.5× more weekly capacity for my workload.

The project-level A/B tests above

suggest that the optimization rules can reduce total activity by roughly 18–48%, depending on how well the run converges. I would not apply those percentages directly as guaranteed hourly savings, but they provide a reasonable range for a rough estimate.

Based on the current sample, my provisional estimates for Pro Lite are:

  • GPT-5.5 High before optimization: around 2%/h, or roughly 50 active hours
  • GPT-5.5 High after optimization: roughly 1.3–1.7%/h, or around 60–75 active hours
  • GPT-5.6 SOL Medium before optimization: around 5–6%/h, or roughly 17–20 active hours
  • GPT-5.6 SOL Medium after optimization: roughly 3–3.5%/h based on the latest measurements, or around 29–33 active hours.

Plus has approximately 5× less Codex capacity than Pro Lite, so the rough Plus equivalents would be about one fifth of those estimates:

  • optimized GPT-5.5 High: approximately 12–15 active hours
  • optimized GPT-5.6 SOL Medium: approximately 6–6.6 active hours

These are not official limits or stable benchmarks. They are estimates derived from a small number of local log audits and observed weekly-limit changes. Task complexity, model behavior, context growth, failed attempts, validation depth, and repair cycles can move the result significantly.

The pattern so far is more useful than the exact numbers: optimization improves both models, but GPT-5.5 High still appears substantially more efficient for sustained implementation work. GPT-5.6 SOL Medium may be a better fit for bounded audits, difficult debugging, or decisions where its additional exploration produces enough value to justify the higher usage.

EDIT: More tests, results and conclusions can be found in the replies below. My final conclusion, based on longer-term testing, is that an optimized GPT-5.6 SOL setup works best for me. Ultimately, though, you should choose the model and workflow that best fit your own needs.

3

u/gradstudent2019 Jul 24 '26

How did you generate that exact instruction?

3

u/PaperDry2796 Jul 24 '26

why do we have to debug their tooling

4

u/ekzess Jul 24 '26

This is VERY good stuff.... Well, done so far. Totally yoinked it.... 😉

6

u/HiperWars Jul 24 '26

I'm curious to see the outcome of this. I already use tools like 'Headroom', 'Serena MCP', and 'RTK' as standard parts of my workflow; they help me save quota while delivering the results I need.

1

u/pimpedmax Jul 24 '26

RTK has been unveiled to be unuseful, we need to be more cautious on these promises, code indexers like serena or codebase-memory can save a lot of tokens on large codebases, under 50k LOC they're unuseful and add token overhead, headroom is similar to caveman but I've not seen benchmarks yet https://www.reddit.com/r/ClaudeCode/comments/1v3b81w/jetbrains_analyzed_the_caveman_and_rtk_token/

0

u/Mysterious_Bid_2850 Jul 24 '26

Great Stack , what do you think of adding code graphs like gitnexus to this ?

2

u/erpankaj Jul 24 '26

Use codebase memory mcp. It is better then gitnexus. I have done that.

2

u/MatlowAI Jul 24 '26

Can confirm this concept works generally just reminding it that it that cache hits cost 10% of input tokens and that to save money it can run parallel tool calls did the trick. I also use a graph based unique id notation system so that grepping is more efficient too that ties notes to code more closely and since grep is pretty native it is more cleanly used I've seen vs dedicated graph db type arrangements and is less likely to fall out of sync. This way instead of 5 different greps to find what you need it does 1 or 2 saving cache hits. It does over retieve a bit though which balances that out some but it's occasionally useful.

1

u/Glenpeel Jul 24 '26

Could you expand on how your graphing optimized for grep works?

1

u/MatlowAI Jul 25 '26

https://github.com/matlowai/grep-graph got most everything consolidated into this. Beware it's pure vibe extracted. I was able to start a new project using it so it works at least that far. Make sure to turn off compaction if you try it. Let me know if it helps or if its worse than what you do if you give it a try. I will try to keep it updated as things come in.

2

u/Calm_Pass_4289 Jul 24 '26

I feel like giving all these workarounds just exposes more weakness to them and they either patch it out or just assume everyone will use this and further decrease overall usage.

2

u/ConsistentAndWin Jul 24 '26

Codex evaluated this Post and told me I should use it as well. So it's being implemented as we speak. We'll see if I notice much difference.

2

u/thomasthai Jul 27 '26 edited Jul 27 '26

My stats

SurfaceRoot sessionsExec cellsSingle-tool cellsPromise cellsMedian single-tool rate
CLI6299210 (70.2%)83 (27.8%)86.1%
Desktop1633,21831,718 (95.5%)1,296 (3.9%)96.1%

1

u/DannyKoll1 Jul 24 '26

will try thx

1

u/Own-Professor-6157 Jul 24 '26

Unfortunately it's still double reading files for me. That's been my biggest loss in tokens.

1

u/justlaughandmoveon Jul 24 '26

OP, I just added your new findings to my file. Will it affect projects that are already running I have long threads for sites and apps that I use daily that are a tad complexe and use up a lot of usage. Will they be impacted too or must I start fresh threads?

1

u/greatsmokematrix Jul 24 '26

Curiously, xhigh 5.6 reasoning mentioned that the tools w

Suggested this instead:

"Efficient tool execution

  • Within each bounded stage, identify all independent read-only inspections, searches, file reads, and checks whose inputs are already known, and run them together using the environment's native parallel tool-calling mechanism.
  • Do not split otherwise batchable inspections across multiple tool-call rounds.
  • Inspect every result from the batch, including individual failures.
  • Continue after partial failures only when the failed results are not required to safely complete the stage or support its conclusions.
  • Treat the batch as failed when any missing result would invalidate the remaining work.
  • Keep operations sequential when:

    • one result determines the next action;
    • the investigation must adapt after each result;
    • approval or user input is required;
    • operations mutate shared or overlapping state;
    • operations are conflicting or interdependent;
    • a later operation depends on state created by an earlier one.
  • Do not create shell or JavaScript concurrency merely to imitate native parallel tool calls.
  • When supported by a programmatic tool-calling runtime, use concurrent execution only for eligible independent calls, preserve individual results and errors, and reduce large intermediate outputs before returning them to model context."

Mentioned this: "Honestly, I’m very confident about the core logic, but the complete file I gave you is not closely equivalent in scope to the original. My assessment Core concurrency behaviour preserved: approximately 85–90% Similarity of the entire AGENTS.md section: approximately 30–40% Confidence it produces the same token savings: only moderate The original instruction is narrowly about tool orchestration: Batch independent calls within a bounded stage. Use Promise.allSettled() when partial results remain useful. Inspect every result. Use Promise.all() when one failure should abort everything. Keep dependent, adaptive, approval-sensitive, and conflicting operations sequential. Do not unnecessarily divide one batch across multiple model turns. Our version preserves points 1, 3, 5, and 6. However, it deliberately removes the exact Promise.all() versus Promise.allSettled() distinction and adds many unrelated engineering rules covering implementation, mutation safety, verification, hallucinations, reporting, and subagents. The important technical difference The original appears written for OpenAI Programmatic Tool Calling, where generated JavaScript can coordinate tools using promises inside a hosted runtime. That mechanism can reduce tokens meaningfully when it filters or aggregates intermediate results before returning them to the model. � OpenAI Developers Normal Codex CLI parallelism is different. OpenAI’s Codex prompting guide says to use its native multi_tool_use.parallel mechanism and specifically says not to emulate it through scripts. � OpenAI Developers Therefore: For an API/harness that actually provides programmatic tool calling, the original is more precise. For a normal Codex project using AGENTS.md, our native-parallel wording is more portable and appropriate. The large complete file probably offsets some token savings, because every applicable AGENTS.md is injected into the conversation. OpenAI explicitly warns that large instruction files consume scarce context and recommends a short AGENTS.md serving mainly as a map. �"

1

u/Odd-Conversation-101 Jul 24 '26

What do mods/devs think of this solution?

Have u tried to dm them on how to make codex better again?

1

u/-LightHeaven- Jul 24 '26

I pointed this thread to codex and asked to audit the chat sessions to see if this was happening.

It looked into 51 recent chat sessions and found that from almost 5200 calls only less than 400 were batched, all others had this behavior of being called one at time and going to the llm in between.

I added your instructions to my personal preference and after 4 hours of intense work the number of used tokens (and therefore used quota) dropped drastically, without any perceived quality degration.

I was at ~650-700M tokens used for today and at 80% weekly left when I added the instructions. Now it's showing 940M tokens for the day and usage dropped to 74% despite having quite a few of work done. Yesterday my usage was about the same for the day and ended up crossing 1.2Bi tokens when I was done for the day (so around the same time as now)

1

u/rabbit12345a Jul 26 '26

First of all, thanks to the OP for sharing this workaround

I tried this in `C:\Users\owner\.codex\AGENTS.md`, and Codex started running four or more commands in parallel within a single turn. It also seems to use less quota than before

Since I completely disabled auto-review, I no longer get the unreasonable 30% usage increase that used to accumulate between the start of a task and the first context compaction

According to ChatGPT GPT-5.6 Sol, truncation can be mitigated by adding the following root-level setting to `config.toml`:

`tool_output_token_limit = 200000`

I tested it with two tasks and did not encounter any problems. Those two tasks used 20% of my Plus quota

1

u/yusing1009 Jul 29 '26

It will be better writing it in an overridden base instruction (and remove existing rules that contradict the new guidance).

1

u/mwillbanks Aug 02 '26

I found this exact same thing this past week, I was running post mortems and codex itself found that it was doing this. When I ship MCPs now I always ship with a skill bundled and those deliberately state batching usage and tell the agent how to batch and why and then my global AGENTS.md instructions state to leverage batching whenever feasible.

1

u/Emergency-Elk7527 Aug 05 '26

You can't talk about work around on reddit. It's monitored. Whatever may have been discovered will be patched. Once you disclose it here.

1

u/Emergency-Elk7527 Aug 05 '26

I know a real work around. This is not it. Essentially unlimited..no joke.

-12

u/TheOwlHypothesis Jul 24 '26

https://blog.cloudflare.com/code-mode/

Are you pretending you invented code mode?

0

u/[deleted] Jul 24 '26

[deleted] — view deleted comment

-5

u/TheOwlHypothesis Jul 24 '26

Ok.

It is interesting that the method is exactly the same as Cloudflare's from last year.