Found something good?

Save it before you doomscroll past it.

Fix Your Codex Pro Plan Usage With Config.toml in 5 Minutes

Fix Your Codex Pro Plan Usage With Config.toml in 5 Minutes

Your Codex 5x and 20x Pro plan is burning too fast. The reason is a routing flaw in how Codex handles subagents.

When you set GPT-5.6 Sol to "Ultra" in the model picker, every subagent Codex spawns also runs Sol Ultra.

The spawn_agent tool does not let you pick a different model or reasoning effort for the child. It copies the parent. Three subagents on one task means three Sol Ultra instances running at the same time, each burning through your quota at full speed.

You can cut that token usage by ~50% by using this smarter mix of models:

  • GPT 5.6 Sol Extra High as the main brain
  • GPT 5.6 Sol Medium for the smarter subagents
  • GPT 5.6 Terra High for the fast lightweight agents.
  • Why these three models? I'll get to that after we fix the config file.

    The idea is simple. You need to have one “Orchestrator” model that does the thinking: planning, architecture, deciding what to delegate. Then you have “Executor” models that implement the plan. The executors are cheaper, faster, and smart enough to follow instructions without needing full-power reasoning.

    Codex already supports this through a file called config.toml and custom agent definitions. You define agent roles in small config files, set which model each role uses, and add a routing policy that tells Codex when to use which agent. After that, Codex handles everything automatically. You submit tasks the same way you always have.

    Ask Codex to build "Auto Mode" for you

    Open Codex and paste this prompt. It will read your existing config, create the agent files, and update the routing policy.

    After Codex creates the files, restart Codex or open a new task. The agents load on startup.

    What you should see after the fix?

    Before this fix, every subagent ran the same model and reasoning effort as your main agent.

    After this fix, Codex reads your agent files (autonomously) and picks a cheaper model when the task is simple. A file search routes to Terra High instead of Sol Ultra. A routine bug fix runs on Sol Medium. Only the hard stuff gets Sol High. Your main agent stays on whatever you set in the model picker when you started the session.

    You can still override it. Say "use Sol only" or "don't use subagents" in your prompt and the routing steps aside.

    What the agent files look like?

    Codex will generate files that look like this. Each one lives under ~/.codex/agents/.

    The routing policy in your config.toml tells the orchestrator when to use each one and when to keep work on the main agent.

    Why these model and effort combinations?

    GPT 5.6 has three models (Sol, Terra, Luna) and six reasoning effort levels (Low, Medium, High, Extra High, Max, Ultra). That is 18 possible combinations. Most of them are wrong for Codex subagent work. The routing above uses only four model variants, picked from two independent benchmark reports published this week.

    Artificial Analysis tested every GPT 5.6 model at every reasoning level on 9 different tests covering reasoning, knowledge, and coding. They publish one combined score per model.

    Sol at max reasoning scores 59 out of 100. Sol at extra high scores 58. That is one point of difference. The cost difference is roughly 3x — max burns about three times the tokens to get that one extra point.

    For the root orchestrator that plans your tasks and coordinates subagents, extra high gives you the same quality of decisions at a third of the token cost. Max and Ultra are overkill for 99% of tasks.

    Stay away from Ultra. Ultra is more expensive because it spawns four parallel sub-subagents inside a single agent. On Terminal-Bench (a test for command-line coding workflows), Sol Ultra scores 91.9% versus Sol at 88.8%. That is 3.1 extra points at roughly 3x the cost. OpenAI did not even publish Ultra results for their two main coding benchmarks. If you use Ultra on a subagent that is already a subagent, you get recursive spawning — subagents spawning more subagents. The Codex docs specifically warn against this.

    Why Sol Medium for routine work?

    Sol at medium reasoning still beats Claude Fable 5 by 11.4 points on Agents' Last Exam, a test of long-running workflows across 55 professional fields. It does this at about a quarter of the cost.

    Medium is strong enough to follow a plan, write a feature, fix a bug, or run tests. It does not need to make architectural decisions on its own. Codex team also recommends using Sol medium as the daily driver model.

    Why Terra High for lightweight work, not Luna?

    This is the one that surprises people. Luna is cheaper per token ($1/$6 per million) compared to Terra ($2.50/$15). But token price is not the full picture.

    DeepSWE v1.1 tests coding agents on 113 real engineering tasks across 91 open source projects. It measures what percentage of tasks each model finishes, how much each task costs in total, and how many steps it takes.

    Results from July 9, 2026:

  • Sol at max: finishes 73% of tasks, costs $8.39 per task, takes 61 steps.
  • Terra at max: 70%, $4.95, 76 steps.
  • Luna at max: 67%, $3.03, 102 steps.
  • Claude Fable 5 at max: 70%, $21.63, 88 steps.
  • Claude Opus 4.8 at max: 59%, $13.22, 120 steps.
  • Luna's $3.03 per task looks good until you see the step count. 102 steps versus Terra's 76. Each step is a tool call with its own input and output tokens. More steps means more total tokens burned, more time, and more chances for the model to loop on an error and retry.

    Luna also cannot handle large codebases. On Nerova, a test that measures how well a model recalls information from long inputs, Luna scores 41.3%. Terra scores 89.6%. Sol scores 91.5%. When a subagent needs to search across thousands of files and hold that context, Luna misses things that Terra catches.

    On the Artificial Analysis Coding Agent Index (which combines DeepSWE, Terminal-Bench, and SWE-Atlas-QnA into one coding score), Sol scores 80, Terra scores 77.4, Luna scores 74.6, and Claude Fable 5 scores 77.2. Terra is 2.6 points behind Sol but costs half as much. For a subagent that reads files and collects evidence, those 2.6 points do not matter. For a subagent doing hard multi-file debugging, they do — which is why that work goes to Sol High instead.

    Terra at max also matches Claude Fable 5's DeepSWE score (both at 70%) at less than a quarter of Fable's cost ($4.95 vs $21.63). You are getting Fable-level coding performance on your lightweight subagent for $5.

    The bottom line

    Fix your config.toml file. Set your root agent to Sol Extra High. Set routine subagent work to Sol Medium. Set lightweight read-only work to Terra High. Skip Luna, skip Low, skip Ultra on subagents. Set it up once. Every Codex session after that routes automatically and your Pro plan lasts the way it should.

    X Article
    10231.4K
    Reading tools
    Keep it forever

    Create a free account to save everything you preview — private to you.

    Preview another link

    Works with X, Instagram, TikTok & YouTube.

    One place for everything
    Tweets, TikToks, Reels, Shorts & articles in one searchable home.
    Media at your fingertips
    Full-screen viewer for photos and video — save any post to your collection.
    Actually find it later
    Full-text search across everything you save.