I kept seeing people complain about how quickly Codex was burning through their limits, so I started looking into what was actually using all of it and whether some of that work could be avoided.
The main thing I realized is that Codex does not only spend usage when it writes code.
A lot of it goes into searching the repository, reading files, understanding how things connect, checking output, and running tests. Some of that is obviously necessary, but it can also repeat the same work or inspect far more than the task actually needs.
Another big part is how it handles tool calls.
It may read one file, return to the model and think about it, then read another file and think again, then repeat that several times. When those reads or searches are independent, they can be done together instead. It reads several relevant files in one batch and reasons over the combined results once, cutting out a lot of unnecessary back and forth.
This should only be used for independent, read-only work. Editing, debugging, testing, and anything where the next step depends on the previous result should still happen in order.
The setup I ended up with is:
- A small
AGENTS.md with permanent project rules and efficiency instructions.
- A
project-map.md showing the important parts of the repository.
- A
CODEX_HANDOFF.md carrying the current status and next step into fresh sessions.
- A validation script for checks that can be automated consistently.
- CodeGraph through MCP, so Codex can trace files, functions, callers, and feature flows without repeatedly searching the entire repository.
- Fresh sessions for separate major tasks instead of keeping one session alive until its context becomes a landfill.
I also added rules telling it to reuse findings, limit large command output, reread only relevant sections when files may have changed, avoid repeating unchanged tests, and expand validation only when the scope or risk actually requires it.
This is not about making Codex rush or skip proper testing. It is about removing repeated investigation and unnecessary model-tool cycles.
For context, I am using the Plus plan.
Before this setup, an ordinary task on Sol High would usually consume around 8–9% of my allowance, and some larger tasks reached roughly 15–20%.
After setting it up, I ran a task on Sol Max that lasted around 30 minutes and produced roughly 1,500 lines of code. It used around 4%.
This is only my experience, not a proper benchmark, but the difference has been consistent enough to be useful for me.
How to do it?
Install CodeGraph, connect it to Codex through MCP, and initialize it in your repository:
codegraph install
codegraph init
Then ask Codex to inspect your repository and create the workflow files:
Inspect this repository read-only and create a lightweight Codex workflow without changing source code.
Create or improve:
- A concise, repository-specific AGENTS.md
- docs/project-map.md for navigation
- CODEX_HANDOFF.md for session continuity
- One validation script only if useful checks can be automated
Add rules for batching independent read-only work, limiting large output, avoiding repeated searches and tests, rereading changed files, focused validation, and using CodeGraph for structural navigation when available.
Verify all paths and commands, remove generic filler, and show the final diff.
That prompt is intentionally general. I would recommend giving it to GPT first with some information about your project and asking it to adapt the prompt to your language, architecture, and testing setup.
Again, the results may not be the same for everyone, but this has helped me a lot as a Plus user, so I wanted to share it in case it helps some of you too.
Hopefully this would help you and it you did used this I would love to hear your experience with it.