Home / Guides / Codex context window
Codex context window vs usage limits
Codex has two meters, and they run out for different reasons. The context window is how much one conversation can hold: GPT-6.1 Sol keeps 500,000 tokens by default. Type /status in the Codex CLI to see how much of it is left, and /compact to summarize the chat and free it. Usage limits are what your ChatGPT plan allows across all your sessions: on Plus and Standard Business a five-hour allowance and weekly limits, on Pro no five-hour limit for now. They refill on their own clock, whatever you do with the context.
The two are linked in one direction. OpenAI says sessions that make the agent hold more context use significantly more of your allowance per message, so a conversation that has grown long eats into the five-hour limit faster than a fresh one doing the same work.
Checked 31 Oct 2026 against OpenAI's Codex models page, Codex pricing and the slash command reference · By Soren Starck
| Context window | Usage limits | |
|---|---|---|
| What it measures | How many tokens one conversation can hold: the chat so far, plus what Codex loads with it, such as AGENTS.md files and MCP tools | How much work your ChatGPT plan allows, shared by your local sessions and cloud chats |
| How big | GPT-6.1 Sol: 500,000 tokens by default in Codex | Plus and Standard Business: an estimated 15 to 160 local GPT-6.1 Sol messages per five hours, plus weekly limits. Pro: no five-hour limit for now |
| Where you see it | /status (remaining context capacity), or context stats in the footer via /statusline | /status in the CLI, or the usage page at chatgpt.com/codex/settings/usage |
| When it fills | Codex compacts the history on its own, or you run /compact; /new starts an empty context | The turn in progress finishes; then you wait for the reset, or buy credits on Plus and Pro |
| When it comes back | Right away, in a new or compacted chat | On the five-hour and weekly windows, at the times your usage page shows |
SessionWatcherWatch the five-hour and weekly limits
without typing /status.
Native app for the Mac menu bar and the Windows taskbar. Track Claude, Codex and 20 more tools' usage, costs, and rate limits in real time.


“Fast, simple, and does exactly what it should. Definitely worth it.”
@nicojerome on GitHub
macOS 14+. Free for 7 days, no credit card.




On Windows? Codex usage in the Windows taskbar: the same limits and alerts on Windows 10 and 11.
How do I show context window usage in Codex?
Type /status in the Codex CLI. It prints the session's configuration and token usage: the active model, the approval policy, the writable roots and the remaining context capacity. The same command shows your remaining usage limits during a session, so it answers both questions at once.
To keep the context on screen instead, run /statusline. It lets you pick and order the footer items, context stats and rate limits among them, and saves the choice to tui.status_line in config.toml.
How big is the Codex context window?
OpenAI gives one number on its Codex models page: GPT-6.1 Sol uses a default context window of 500,000 tokens in Codex and ChatGPT Work. The page does not state a window for GPT-6 Astra, GPT-6.1 Terra or GPT-6 Luna. Inside a session, /status tells you what the model you picked has left.
The CLI has two settings for it in config.toml, both documented in the configuration reference: model_context_window, the context window tokens available to the active model, and model_auto_compact_token_limit, the token count at which Codex compacts the history by itself. Left unset, both follow the model's defaults.
What happens when the Codex context window fills up?
Codex compacts the history on its own once it reaches the auto-compaction threshold. You can do it earlier:
/compactsummarizes the visible chat to free tokens, so Codex keeps the key points of a long run./newstarts a new chat with an empty context in the same CLI session;/clearalso clears the terminal./recapwrites a summary of the conversation without compacting it, when you only want to catch up.
None of these touches your usage limits. They refill on the five-hour and weekly windows, and the Codex usage page shows when each one resets.
Do Codex usage limits count the context?
Indirectly, yes. OpenAI's pricing page says the number of messages you can send depends on the model, the size and complexity of the task and whether it runs locally or in the cloud, and that model choice, context, reasoning, tool use, retrieval and caching all change how much a message costs. Its estimate for Plus and Standard Business is 15 to 160 local GPT-6.1 Sol messages per five hours. The range is that wide because messages are not the same size of work, and a long context is one of the things that makes them bigger.
GPT-6.1 Sol has no long-context surcharge when it draws on a subscription in Codex. The extra cost of a long session comes from the tokens it carries, not from a higher rate. When you reach a limit during a turn, Codex finishes that turn; after it, you wait for the reset, and on Plus and Pro you can buy credits instead. The limits, their history and the reset rules are in Codex rate limits explained.
How to make both last longer
- Run /compact after a long stretch of work, or /new when the next task does not need the old conversation.
- Give Codex the files that matter instead of the whole repository, and narrow sources or date ranges.
- Keep AGENTS.md short; in a large project, nest smaller AGENTS.md files in the folders they cover.
- Turn off MCP servers you are not using. OpenAI says every MCP server adds context to your messages and uses more of your limit.
- Match the model to the task. GPT-6 Luna gets an estimated 350 to 3,000 local messages per five hours on Plus, against 15 to 160 for GPT-6.1 Sol.
Keeping the usage limits in view
/status is a snapshot: you have to stop and ask. The usage page is a tab you have to open. Every other way to read your Codex usage is in how to check Codex usage.
SessionWatcher keeps each limit OpenAI reports, five-hour and weekly, in the Mac menu bar or the Windows taskbar, with the time to each reset, and warns you at 70% and 90% by default. Its Codex token usage view adds your local token totals, an estimated API-equivalent cost and the sessions that used the most.
SessionWatcherKnow where your Codex limits stand
before a long session runs them out.
Native app for the Mac menu bar and the Windows taskbar. Track Claude, Codex and 20 more tools' usage, costs, and rate limits in real time.


“Fast, simple, and does exactly what it should. Definitely worth it.”
@nicojerome on GitHub
macOS 14+. Free for 7 days, no credit card.




Frequently asked questions
How do I see how much context is left in Codex?
Type /status in the Codex CLI. It shows the active model, approval policy, writable roots and remaining context capacity. To keep it on screen, run /statusline and add the context stats item to the footer.
Is the Codex context window the same as the usage limit?
No. The context window is how much one conversation can hold; GPT-6.1 Sol holds 500,000 tokens by default. Usage limits are what your ChatGPT plan allows across all your sessions: a five-hour allowance on Plus and Standard Business (none on Pro for now) and weekly limits.
Does a long context use up my Codex limits faster?
Yes. OpenAI says larger projects, long-running tasks and extended sessions that make the agent hold more context use significantly more of your allowance per message. GPT-6.1 Sol has no long-context surcharge on a subscription, but each message in a full context carries more tokens.
Does /compact reset my Codex usage limit?
No. /compact summarizes the conversation to free context space so the session can go on. Your usage limits refill on their own five-hour and weekly windows; the usage page at chatgpt.com/codex/settings/usage shows when.
Can I change the Codex context window?
config.toml has model_context_window, the context window tokens available to the active model, and model_auto_compact_token_limit, the token count that triggers automatic compaction. Left unset, Codex uses the model defaults.
Sources
All read on 31 Oct 2026:
- Codex models: the models and GPT-6.1 Sol's default context window of 500,000 tokens.
- Codex pricing: what drives usage, the five-hour estimates for Plus and Standard Business, Pro without a five-hour limit, what happens at the limit, and the tips for making it last.
- Codex CLI slash commands: /status, /statusline, /compact, /new, /clear and /recap.
- Codex configuration reference: model_context_window and model_auto_compact_token_limit.

