How Codex 5-hour and weekly limits work, and how to start the window before work
Short version
- On Plus and standard Business plans, Codex limits usage per 5-hour window, and weekly limits can apply on top. OpenAI says Pro plans currently have no 5-hour limit.
- The 5-hour window is not tied to the clock. It starts with your first request after a reset, and resets 5 hours later.
- If you usually hit the limit late morning, starting the window two hours before work moves the reset to midday, so a fresh window covers your afternoon.
- You can start it by hand, with a cron job, or with TokenKick, which checks that the window is actually fresh, aims at your work hours, and logs every request.
The two Codex windows
Codex reports usage against up to two windows. Codex's own app-server reports each window's length in minutes: 300 for the session window, 10,080 for the weekly one.
| Window | Length | Who has it |
|---|---|---|
| Session | 5 hours | Plus and standard Business plans. OpenAI's pricing page says Pro "currently" has no 5-hour limit; Enterprise and Edu with flexible pricing have no fixed rate limits. |
| Weekly | 7 days | OpenAI says weekly limits "may also apply". On the Plus and Pro accounts we've checked, Codex reports a weekly window. |
Local Codex CLI messages and Codex cloud tasks draw from the same allowance, and cloud tasks can use more of it per request. OpenAI publishes the per-plan numbers only as rough ranges that depend on the model and the task, so treat your own usage view as the source of truth.
When does the 5-hour window start?
Not at a fixed time of day. After a reset, the window sits unused until you send a request. That first request starts the countdown, and the window resets 5 hours later.
OpenAI's docs don't spell this rule out, but Codex's own usage data shows it: a freshly reset session window reports 0% used, and its reset time isn't fixed until the first request arrives. This is why the time you send your first message decides when your next reset lands.
How to check your current window
- Inside the Codex CLI, run
/status. It shows the usage and reset time for each window. - With several accounts, launch Codex with each account's home, for example
CODEX_HOME=~/.codex-work codex, then run/status. - With TokenKick installed,
tk status --refresh --codexreads every configured account at once.
Why the start time matters
Say you work 09:00 to 17:00 and usually run out of session quota around 11:30.
- First request at 09:00: the window resets at 14:00. You wait from 11:30 to 14:00.
- Window started at 07:00: it resets at 12:00. You wait half an hour, and a full fresh window covers 12:00 to 17:00.
Starting early doesn't add quota. The weekly limit is the same either way, and the 07:00 window spends two hours idle before you sit down. It only helps if the session limit, not the weekly one, is what stops you. If you rarely hit the 5-hour limit, the start time barely matters.
Three ways to start the window early
1. By hand
Send any tiny prompt from the Codex CLI, for example from your phone over SSH, at the time you want the window to start. It works, but it relies on you remembering every day.
2. A cron job
A scheduled codex exec call can send the tiny prompt for you. Use the cheapest model your plan offers and low reasoning effort, so the request costs as little as possible:
# crontab -e · weekdays at 07:00. Cron has a minimal PATH: use the full path from `which codex`.
0 7 * * 1-5 CODEX_HOME=$HOME/.codex /path/to/codex exec --skip-git-repo-check --ephemeral -s read-only -m <small-model> -c model_reasoning_effort=low "Reply with OK"
Things to know before you rely on it:
- It fires even when the window is already running or you're on a plan without a 5-hour window, so some requests do nothing useful.
- It doesn't check whether the window actually started. Right after a request, Codex sometimes reports an ambiguous almost-full session for a while.
- On a Mac, cron doesn't run while the machine sleeps. A
launchdjob withStartCalendarIntervalruns the missed job on wake instead, which may be too late. - Each Codex account needs its own
CODEX_HOME, otherwise the request runs under whichever account that home is signed in to.
3. TokenKick
TokenKick is a free, open-source CLI that does the same thing with checks around it. It reads each account's real window state, only sends a request (a "kick") when a window is fresh, and can aim kicks at your working hours.
pipx install tokenkick
tk setup # finds your Codex homes and Claude Code logins
tk status --refresh --codex # current windows, reset times, and labels
tk auto enable "<label>" # asks you to type ENABLE to confirm first
tk schedule set --account "<label>" --weekdays 09:00-17:00
tk daemon --background # keeps checking; needs the machine awake
tk history # every kick, with timestamps and evidence
For Codex specifically, TokenKick:
- reads usage from Codex's own app-server for each account's
CODEX_HOME, so accounts don't get mixed up; - detects plans without a 5-hour window and skips session kicks there, keeping weekly tracking;
- picks the cheapest available model at the lowest effort and never escalates on its own;
- re-checks 15 minutes after a kick and only marks it confirmed when Codex's reset clock matches, so an ambiguous kick shows as unconfirmed rather than as a success;
- caps retries and records each attempt in
tk history.
With a 09:00–17:00 schedule, TokenKick starts the first window at 07:00 so the reset lands at 12:00, the same plan as the example above. The Claude Code scheduling guide explains that calculation step by step.
Limits and honest caveats
- A kick spends a little quota. It's a real request, kept as small as possible, because a fake one wouldn't start anything.
- It doesn't raise your limits. Weekly limits and per-window allowances stay exactly as your plan defines them.
- Provider terms. OpenAI may treat automated or scheduled requests differently from manual use. Automation in TokenKick is off until you opt in for each account, and it's your call.
- The machine has to be on. A sleeping laptop can't send anything. Always-on coverage needs a Mac mini, home server, or VPS.
- Limits change. Check OpenAI's pricing page for your plan's current rules.
Sources
- OpenAI: Codex pricing and usage limits (checked 13 October 2026)
- OpenAI: Codex app-server rate-limit fields
- TokenKick provider notes: how Codex windows are read and verified