Home / Guides / Codex Rate Limits
Codex Rate Limits Explained: The 5-Hour Window
Everything you need to know about OpenAI Codex rate limits — how the rolling 5-hour window works, what happens when you hit it, and how to prevent lockouts.
Last updated March 2026 · By Soren Starck
What Are Codex Rate Limits?
OpenAI Codex enforces rate limits that cap how much you can use the tool within a given time period. These limits exist to manage server capacity and ensure fair usage across all users.
The key concept is the 5-hour rolling window. Unlike a simple daily cap that resets at midnight, Codex uses a sliding window — the tokens you used exactly 5 hours ago start becoming available again, continuously.
How the 5-Hour Rolling Window Works
Think of it as a conveyor belt. Tokens you spend enter one end of a 5-hour belt. When they reach the other end (5 hours later), they fall off and become available again.
Example Timeline
| Time | Action | Usage |
|---|---|---|
| 9:00 AM | Start coding session | 0% |
| 10:00 AM | Heavy refactoring work | 40% |
| 11:30 AM | Bug fixing session | 75% |
| 12:15 PM | Rate limit hit — locked out | 100% |
| 2:00 PM | 9 AM usage rolls off — partial capacity returns | ~60% |
| 3:00 PM | 10 AM usage rolls off — more capacity | ~35% |
What Happens When You Hit the Limit
When you exceed your Codex rate limit:
- Codex stops responding — your requests are rejected
- No clear ETA — you don't know when you can resume
- No advance warning — there's no built-in notification before you hit the cap
- Lost momentum — you break your coding flow and lose context
This is where monitoring becomes critical. If you can see your usage approaching the limit, you can pace your work or wrap up your current task before getting locked out.
Never get surprised by rate limits again.
SessionWatcher for Codex shows your real-time usage and sends macOS notifications before you hit the limit. $1.99 one-time, no subscription.
How to Monitor Your Codex Rate Limits
SessionWatcher for Codex is a native macOS menu bar app built specifically for this problem. It tracks:
- Real-time token count in the current 5-hour window
- Percentage of limit used — see 60%, 80%, 90% at a glance
- Window countdown — when your oldest usage rolls off
- Cost tracking — real-time API spend
- macOS notifications — alerts before you hit the limit
Tips for Managing Codex Rate Limits
- Monitor your usage in real-time — knowing where you stand prevents surprises. SessionWatcher makes this effortless.
- Front-load complex tasks — do your heaviest token-consuming work early in your 5-hour window.
- Be specific in prompts — more targeted prompts use fewer tokens and get better results.
- Pace your usage — if you're at 70% with 3 hours left in your window, consider lighter tasks.
- Plan around resets — if you know when older usage rolls off, you can time your heavy work accordingly.
Frequently Asked Questions
What are Codex rate limits?
Codex rate limits are usage caps on a rolling 5-hour window. They limit the number of tokens you can use within any 5-hour period. When you hit the limit, Codex stops responding until older usage rolls off.
How long until my Codex rate limit resets?
It's not a fixed reset — it's a rolling window. The tokens you used 5 hours ago start becoming available continuously. SessionWatcher tracks this in real-time and shows you exactly when capacity frees up.
How do I avoid hitting Codex rate limits?
Monitor your usage in real-time with SessionWatcher ($1.99 one-time). It shows your current token count, window countdown, and sends notifications before you reach the limit.