A short request can start a long coding workflow. Your agent may inspect files, run commands, interpret failures, and revise its patch. Each step can add input or output usage.
This guide diagnoses Codex coding sessions. Ordinary ChatGPT conversations have a different interface and may use different tools.
First, identify what your usage number means
Open /status in Codex CLI to inspect session usage and context capacity. Use /usage for account activity.
These views answer different questions. Context capacity describes the current working context; cumulative usage describes work across requests.
See the official Codex command reference.
Also record whether you use a subscription, purchased credits, or API billing. A token count alone does not establish a dollar charge. OpenAI documents these distinctions in Codex pricing.
Check these seven sources of usage
| Check | Evidence to look for | First change to try |
|---|---|---|
| Long conversation | Many unrelated tasks share one thread | Start a separate chat for the next task |
| Repeated file reads | The agent opens the same unchanged files | Provide the relevant paths and known findings |
| Large command results | Full logs hide a small failure | Request the failing section and its context |
| Broad instructions | Repository guidance includes unrelated procedures | Keep shared rules short and scope specialist guidance |
| Reasoning effort | Simple work uses a demanding configuration | Try a lower supported effort on a comparable task |
| Tool configuration | The session exposes irrelevant tools | Disable one irrelevant integration and compare |
| Delegation and retries | Workers repeat discovery or failed work | Count all threads and remove duplicate assignments |
1. Separate unrelated work
A session that combines deployment, design, debugging, and research accumulates context with different purposes. Start a new chat when the objective changes substantially. Preserve the task brief and necessary decisions if the new task depends on earlier work.
Do not reset a productive investigation merely because the context meter looks large. The compact versus new guide explains that tradeoff.
2. Give the agent a search boundary
Compare two requests:
Investigate the authentication code.
Inspect src/auth/session.ts and its callers.
Find why an expired session reaches the dashboard.
Verify the fix with the existing session tests.
The second request names the failure, likely files, and completion check. It still permits investigation when those files do not explain the problem.
3. Keep useful command output
A complete build log can contain much more text than the actual failure. Ask for the failure message, surrounding lines, and command exit status. Keep the full log available when the excerpt does not explain the failure.
Halv includes RTK command filtering and Crux code navigation to support this workflow. Download Halv and try it on your next debugging task.
4. Audit persistent instructions
Keep test commands, important constraints, and repository conventions. Remove repeated explanations and instructions that apply to unrelated projects. Use the AGENTS.md guide to check discovery and measure a proposed reduction.
5. Match effort to the task
Higher reasoning effort can increase usage and response time. It can also improve results on difficult work. Use a supported setting and evaluate the result before changing your default. The official model and effort guidance explains this distinction.
A cheaper failed patch is not an improvement if the next attempt consumes the saved budget.
6. Inspect tools without assuming a fixed tax
MCP cost depends on the client, tool discovery, server instructions, and returned content. Counting configured servers does not reveal the complete cost. The MCP context guide gives a controlled comparison procedure.
7. Include every agent and retry
A coordinator can look inexpensive while workers perform most of the work. Record their usage separately, then calculate the combined total. Include unsuccessful attempts and the coordinator’s integration work.
Run a useful before-and-after check
- Select a task with an existing acceptance test.
- Record the repository revision, model, effort, tools, and client version.
- Run the baseline from an isolated checkout.
- Change one configuration choice.
- Run the same task from an equivalent checkout.
- Compare test results, total usage, cost basis, and elapsed time.
Repeat the comparison before making a general claim. One run can change because model output varies. Keep environment failures separate from model failures, and explain any excluded runs.
What Halv has actually measured
Our published SWE-rebench report compares Codex with and without the Halv toolkit across 20 task pairs. The report includes configuration, verifier outcomes, and downloadable evidence. It measures the combined toolkit, not the savings from any individual tip above.
For a broader checklist, read how to save tokens in ChatGPT and Codex. For allowance questions, read Codex usage limits.
Sources and scope
Official documentation checked on September 28, 2026. This article provides a diagnosis method, not a new benchmark result.