# Codex usage limits: why they drain and how to use fewer tokens

> Source: https://minniai.com/learn/codex-usage-limits (canonical HTML page)

[Guides](https://minniai.com/learn)


Codex usage on a ChatGPT plan is metered in windows. OpenAI gives its estimates per five-hour period for Plus and Business plans, says Pro plans currently have no five-hour limit, and says weekly limits may also apply. Local messages and cloud tasks share one allowance. What uses it up is not the number of prompts but how much work and context each one carries, so the way to make it last is to send less each turn.

Updated 2026-11-11

## How Codex limits work

These points are from [OpenAI’s Codex pricing page](https://developers.openai.com/codex/pricing) as it read in November 2026. Limits change often, so check that page for your plan before you rely on a detail.

| Question | What OpenAI says |
| --- | --- |
| Is there a five-hour window? | Estimates are given per five-hour period for Plus and Business. Pro plans currently have no five-hour limit. |
| Is there a weekly limit? | Weekly limits may also apply. |
| Do local and cloud share a limit? | Yes. Local messages and cloud chats share your plan’s usage allowance, and cloud tasks may use more of it than local messages. |
| What happens when it runs out? | If you have credits, they let you keep working after the included limits. Plus and Pro users can buy more. |
| Do fast modes cost more? | Yes. The faster modes draw on your limits at a higher rate than the standard mode. |

## How to check what is left

In a Codex CLI session, run `/status` to see your remaining limits. The usage dashboard in your ChatGPT account lists the current limits and their reset times. OpenAI suggests looking at it every week or two, so a change in your limits does not surprise you in the middle of a task.

## Why the allowance drains

OpenAI says how far a plan goes depends on the model you use and on the size and complexity of each task. Context, reasoning, tool use and caching all count. It also warns that prompt length alone is not a reliable estimate: a short prompt can start a long run of file reads, commands and reasoning.

Two things ride along with every request, whatever you ask:

- **Your AGENTS.md chain.** Codex builds it once when a session starts: your user file, then one file per folder from the repo root down to your working directory. From then on it is part of the context for the whole session.
- **The conversation.** Earlier messages and the output of every command and tool call stay in context until the session ends or is compacted.

So a session that has been open all day, with a long AGENTS.md and several MCP servers attached, spends a large share of each request on things you did not type.

## How to make the limit last longer

OpenAI’s own advice on the pricing page comes down to five habits:

- **Keep prompts focused.** Give Codex only the files that matter, and narrow the sources or the date range when it has to search.
- **Say what you want back.** Name the audience, the format and the length, and separate the required work from the nice-to-have.
- **Shorten AGENTS.md.** For a larger project, nest smaller files inside the folders they apply to instead of one long file at the root.
- **Limit MCP servers.** Disable the ones you are not using.
- **Pick the mode on purpose.** The standard mode draws less than the fast ones, and a local message can use less than a cloud task.

Two more that follow from how sessions work: start a new session when you switch to unrelated work, and ask for the end of a long log, not the whole file. Each of these, with the reasons, is in [How to reduce Codex token usage](https://minniai.com/learn/reduce-codex-token-usage).

## The AGENTS.md part

Codex reads AGENTS.md files up to a combined cap, `project_doc_max_bytes`, 32 KiB by default, and stops adding files once the chain reaches it. Nothing in the chain loads on demand, so every byte under the cap is sent with each request. [AGENTS.md too large](https://minniai.com/learn/agents-md-too-large) covers the cap and how to get back under it.

[MinniMemoryMCP](https://minniai.com/minnimemorymcp) works in Codex. `init` maps the chain: each file, its size, whether it loads and the cap in force. When the chain is over the cap, `apply` splits it into a small part that stays in AGENTS.md and files Codex opens only when a task needs them, with every line kept and one `undo` to put it all back. A file Codex already loads whole is left as it is unless you force the split, because in our tests splitting a small file cost recall.

Our measured result is from Claude Code, where the same split applies to CLAUDE.md: Measured 15 November 2026: at API rates, a Claude Code session on our test memory cost $0.47 before MinniMemoryMCP 1.6.0 and $0.29 after on average, 37.7% less (each of the three sessions 33.9% to 40.0% less). A blind judge found 80 of 87 answers correct before and 81 after. The run counts cost and tokens; how much longer a plan window lasts depends on your own work. The method is on the [Evidence page](https://minniai.com/evidence).

Using Claude Code as well? See [Claude Code usage limit reached](https://minniai.com/learn/claude-code-usage-limit-reached).

Try MinniMemoryMCP

Free, runs on your computer, and every change can be undone. It maps the AGENTS.md chain Codex loads and trims it when it is over the cap. The [product page](https://minniai.com/minnimemorymcp) and the [docs](https://minniai.com/minnimemorymcp/docs#install-codex) cover the rest.

install it for Codex

```
$ npm i -g minnimemory
$ minnimemory install --host codex
```

## More guides

- [How to reduce Claude Code token usage](https://minniai.com/learn/reduce-claude-code-token-usage) Where the tokens go each turn, and eight ways to spend fewer.

Updated 2026-11-16 · Minni AI

- [Claude Code usage limit reached: what to do, and how to hit it less](https://minniai.com/learn/claude-code-usage-limit-reached) What each limit message means, what to do now, and how to send less every turn.

Updated 2026-11-16 · Minni AI

- [CLAUDE.md too long: what Claude Code does with it, and how to split it](https://minniai.com/learn/claude-md-too-long) What a long CLAUDE.md costs, the real size limits, and four ways to cut it.

Updated 2026-11-16 · Minni AI

- [Claude Code context window keeps filling up: why it compacts, and what to do](https://minniai.com/learn/claude-code-context-window-full) What fills the window, what compaction keeps, and how to compact less often.

Updated 2026-11-16 · Minni AI

- [How to reduce Codex token usage](https://minniai.com/learn/reduce-codex-token-usage) Where Codex spends tokens, and seven ways to spend fewer.

Updated 2026-11-16 · Minni AI

- [AGENTS.md too large: what Codex cuts off and how to split it](https://minniai.com/learn/agents-md-too-large) The 32 KiB cap, how to see which files load, and five ways back under it.

Updated 2026-11-11 · Minni AI

- [How to lower a Claude Code or Codex API bill](https://minniai.com/learn/lower-claude-code-codex-api-bill) What a coding agent bills on an API key, and the levers that move it.

Updated 2026-11-16 · Minni AI

- [Why Claude Code sessions get expensive](https://minniai.com/learn/why-claude-code-sessions-get-expensive) Every turn re-sends the whole session. What makes that grow.

Updated 2026-11-05 · Minni AI

- [Claude Code memory: CLAUDE.md vs MinniMemoryMCP](https://minniai.com/learn/claude-code-memory-claude-md-vs-minnimemorymcp) What belongs in CLAUDE.md, and splitting the rest out by hand or with a tool.

Updated 2026-11-16 · Minni AI

- [MinniMemoryMCP vs Mem0, Zep, supermemory and Letta](https://minniai.com/learn/minnimemorymcp-vs-mem0-zep-supermemory-letta) Four tools add memory to an agent. MinniMemoryMCP cuts what the agent already loads. When each fits.

Updated 2026-11-16 · Minni AI

- [How Claude Code remembers across sessions](https://minniai.com/learn/claude-code-memory-across-sessions) What carries over between sessions, what does not, and how to keep it small.

Updated 2026-11-16 · Minni AI

- [Where Claude Code keeps its memory](https://minniai.com/learn/claude-code-memory-directory) Every memory path on your machine, what each file is for, and which ones load every turn.

Updated 2026-11-07 · Minni AI

- [How to run a coding agent on free, open models](https://minniai.com/learn/run-a-coding-agent-on-free-open-models) What a free key gets you, what a local model can do, and where the tokens go.

Updated 2026-10-25 · Minni AI

- [Get a free NVIDIA API key for a coding agent](https://minniai.com/learn/free-nvidia-api-key-for-a-coding-agent) Where the key comes from, where to keep it, and how to run a coding agent on it.

Updated 2026-11-07 · Minni AI

- [What a Windows PC optimization agent should and should not touch](https://minniai.com/learn/what-a-pc-optimization-agent-should-touch) The settings worth changing, the ones that are placebo, and the ones that break things.

Updated 2026-10-25 · Minni AI

---

Index for agents: https://minniai.com/llms.txt. Doing a task: https://minniai.com/agents.md
