Skip to content

How to save tokens in ChatGPT and Codex

· Pedro Villaca

You can reduce avoidable token use by controlling context, model choice, effort, tools, and repeated work. No method guarantees a fixed reduction on every task.

First, separate the measures that appear in the same usage screen.

Tokens, cost, limits, and subscriptions

Measure What it means
Tokens Units of model input and output
Cost A charge or estimate based on rates and token types
Usage limit Included activity available during a time window
Subscription The recurring price of the selected plan

Lower token use can preserve an allowance. It does not reduce a fixed monthly subscription price.

OpenAI also says API token prices are separate from ChatGPT subscription usage. Do not convert an API rate card into a promised number of included Codex tasks.

Thirteen practical ways to reduce avoidable usage

1. Start a new chat when the task changes

A long conversation can add old context to later requests. Start a new chat when the next task does not need the earlier history.

Use compaction when the same task needs continuity. Compaction must process the history it summarizes, so it also consumes usage.

2. Write a complete, specific request

Name the target, expected result, constraints, and verification step. A precise request reduces clarification turns and broad repository searches.

Avoid requests such as “improve this project.” Point to the component and define what success means.

3. Choose a suitable model

Use a smaller model for clear, repeatable work when it meets your quality target. Use a stronger model when the task needs deeper reasoning or broader judgment.

Model choice can change cost and allowance consumption. It does not change the raw token count in a fixed transcript.

4. Use the lowest effective reasoning effort

Higher effort can increase reasoning tokens and latency. Start low for a bounded task, then increase effort if the result fails your checks.

5. Keep AGENTS.md short and scoped

Repository instructions become model context. Keep shared rules concise and place directory-specific rules near the files they govern.

Remove duplicate guidance. Preserve requirements that affect safety, quality, or repository behavior.

6. Reference files instead of pasting copies

Point Codex to a path when it can read the file directly. A pasted copy remains in the conversation and can increase later context.

Use short log excerpts that preserve the failing command and relevant error. Keep the full log in a file.

7. Disable unused tools and MCP servers

Tools can add definitions, instructions, retrieved content, and results. Enable the tools required for the current task.

Removing a tool can also remove a needed capability. Verify the task still passes its checks.

8. Bound command output

Large test logs and build output can dominate a conversation. Filter output to the first failure, relevant stack trace, and final summary.

Do not remove evidence that changes the diagnosis. Keep the complete output available for follow-up inspection.

9. Isolate verbose work carefully

A subagent can keep large logs outside the main conversation. However, the subagent sends separate requests and adds to total workflow usage.

Use subagents for independent work with a short conclusion. Do not call main context savings a total token reduction.

10. Stop work that runs without attention

Automations, cloud tasks, code review, and workers can consume allowance while you are not typing. Review active work when usage changes unexpectedly.

ChatGPT Work and Codex share usage, credits, and limits. Local Codex messages and cloud chats also share the plan allowance.

11. Keep reusable context stable

Caching can reduce the price of repeated input. Reordering instructions or replacing early context can reduce cache reuse.

Caching changes cost and consumption. It does not remove the cached tokens from the transcript.

12. Read the usage meters

Use /status for the active Codex session. Use the usage dashboard for current account limits, credits, and reset times.

Published message counts are estimates. Model, context, reasoning, tools, retrieval, caching, and execution location all affect usage.

13. Compare complete task outcomes

Record total input, cached input, output, model cost, elapsed time, and verifier result. Include coordinator and worker sessions.

One conversation can become smaller while the complete workflow becomes larger. Measure the system boundary that matters to your bill and completed work.

What our benchmark found

Our Codex SWE-rebench checkpoint covered 14 tasks with three repetitions each.

Both arms passed 25 of 42 runs. Halv recorded $144.67 in selected model cost, compared with $337.50 for vanilla Codex.

The Halv workflow used 3.49 times as many tokens. Different model routing and caching produced lower recorded cost with more tokens.

This benchmark does not prove a universal token reduction. It does not prove identical outcomes on every task or any result for Claude.

Where Halv fits

Halv processes context on your device before supported coding agent requests leave the machine. It reports the token changes it measures.

Some requests contain repeated or stale context. Others contain little removable material. Measure your representative tasks before you infer a savings rate.

Start a 7-day free trial. Halv Unlimited costs US$10 per month after the trial. A credit card is required. Cancel during the trial to pay nothing.

Sources

Official OpenAI documentation checked on October 14, 2026:

Related reading: Codex usage limits, how to save tokens in Claude, and Claude Code vs Codex.

Diagnose a specific source of usage

If your goal is to preserve your allowance, start with how to reduce ChatGPT usage. For coding sessions, use the Codex usage workflow.

How to Reduce ChatGPT Usage

Reduce avoidable ChatGPT usage with focused chats, relevant files, controlled tools, shorter outputs, and the right workspace for coding.

How to Reduce Claude Usage

Reduce Claude and Claude Code usage with smaller context, focused Projects, clear model choices, controlled tools, and complete measurement.

Frequently asked questions

How do I reduce token usage in ChatGPT and Codex?

Start a new chat for a new task. Keep context and instructions focused. Use a suitable model and effort level, then measure the complete result.

Do fewer tokens always cost less?

No. Cost depends on the model, token type, tools, and billing route. A workflow can use more tokens while recording lower model cost.

Do fewer tokens lower my ChatGPT subscription price?

No. A fixed subscription price stays the same. Lower consumption can preserve included usage or reduce eligible credit and API spend.

Should I use /compact or start a new chat?

Start a new chat when the task changes. Use compaction when the same task needs continuity, because compaction must process existing history.

Do subagents save tokens?

They can keep verbose output outside the main context, but each subagent uses its own tokens. Measure total workflow usage, not one conversation.

How do I check Codex usage?

Use /status for active session information. Use the ChatGPT usage dashboard for current account limits, credits, and reset times.

Does Halv guarantee a fixed token reduction?

No. The result varies by task and context. Halv reports measured token changes, and users should compare complete task outcomes.