How is the 5-hour window counted?

Codex opens a fixed 5-hour window at your first message after the previous one ends. Claude runs a rolling 5-hour session. Neither is a fixed number of messages.

The wiki is available in English and Simplified Chinese. Showing English.

Codex

A fixed window that opens with your first message after the previous one ends.

What fits in a window is not a fixed message count: model, context size, reasoning, tool use, retrieval and caching all change how much a task takes, so you can hit the 5-hour limit before five hours have passed while weekly allowance remains. The reset time is shown at chatgpt.com/codex/settings/usage and by /status in the CLI. Business Premium seats have no 5-hour limit.

What the official docs say

The five-hour limit determines how much usage is included in each window. A new window starts when you send your first message in Work or Codex after the previous window ends.
OpenAI Help Center · Managing usage with GPT-6 Astra in Work and Codex
You may reach the five-hour limit before five hours have passed, even if you still have weekly usage remaining. Check Settings → Usage for your current allowance and reset times. Limits vary by plan.
OpenAI Help Center · Managing usage with GPT-6 Astra in Work and Codex
These estimates are not fixed message limits; check your usage dashboard for current limits and reset times.
OpenAI Developers · Codex pricing
Premium seats have 5x the included usage of Standard seats, with the benefit of no 5-hour limit so users can maximize uninterrupted session time
OpenAI Help Center · ChatGPT Business models and limits

Claude

A rolling 5-hour session; the exact reset time is in Settings › Usage and /usage.

Anthropic calls it a rolling five-hour session window and gives no fixed message count: message length, attachments, conversation length, model, effort level and tools all count. Usage lands on the session and the weekly allowance at the same time. Anthropic does not document which moment opens a window; Claude Code shows the reset time as a field (five_hour.resets_at) and drops the window when it passes.

What the official docs say

Your session-based usage limit will reset every five hours.
Claude Help Center · What is the Pro plan?
Every plan has usage limits that reset on a rolling five-hour session window, and paid plans add weekly limits on top.
claude.com · Pricing FAQ
How much you can do depends on the length and complexity of your conversations, the model you choose, and the features you use, so there's no fixed message count.
claude.com · Pricing FAQ
Usage counts against the session and weekly allowances at the same time. A single burst of heavy activity, such as a large workflow fanout, can exhaust the weekly allowance before the session window resets.
Claude Code docs · Error reference
Claude Code drops a window once its resets_at time passes.
Claude Code docs · Customize your status line

In practice

  • The countdown that matters is in your account, not on this site: Settings → Usage / Settings › Usage.
  • A big burst (a long agent run, a fanout) can empty a window in minutes; the clock does not slow down for it.

Quotes checked against the live docs on 2026-09-15.

Answers rest on official OpenAI and Anthropic documentation, quoted and linked on each page · Not endorsed by either.