Claude Code and Codex usage limits, explained.

Both Claude Code and Codex meter how much you use them over rolling time windows. Here is how those windows work, when they reset, and how to keep your remaining budget in view.

How usage windows work

Instead of a single monthly cap, Claude Code and Codex track usage over rolling windows. Each agent reports how much of the current window you have used and when it resets. The exact amount you get depends on your plan with Anthropic or OpenAI, but the shape is the same: a short window for bursts and a longer window for the week.

The catch is that these numbers live in the terminal, where they are easy to miss until you hit the wall. Knowing how the windows behave, and keeping them in view, is what stops a long run from stalling at the worst moment.

The 5-hour window

The 5-hour window is your short-term budget. It is a rolling window, so it does not reset on the clock hour; it resets roughly five hours after the usage that opened it. When you push hard in a single sitting, this is the limit you tend to meet first. Both Claude Code and Codex expose a 5-hour window with a resets-in countdown so you can see when capacity comes back.

The 7-day window

The 7-day window is your longer-term budget. It paces heavy weeks: even if your 5-hour window is fine, a busy stretch can draw down the weekly window. Claude Code and Codex report the day and time the 7-day window refills, so you can plan a big migration or a batch of parallel sessions around it rather than into it.

Do Claude Code and Codex limits work the same way?

Closely. Both meter usage over a short rolling window and a weekly window, and both report how much is left and when it resets. The plans, pricing, and exact allowances differ between Anthropic and OpenAI, so treat the numbers each tool reports as the source of truth. AgentPeek reads those reported values for each agent rather than guessing, and shows a clear placeholder when a value is stale or unavailable.

How to see your remaining budget

You can read usage from the terminal, but that is pull, not push: you only see it when you stop and ask. AgentPeek pins both windows where you already look. The token usage tracker stacks a 5-hour and 7-day bar per agent in the notch or menu bar, updated as you work, with reset countdowns for each. Run several sessions at once and each carries its own usage, so you can see which agent is eating your budget.

How to avoid hitting a limit mid-task

Set a threshold and let AgentPeek warn you before you run out. Budget alerts fire when usage crosses a level you choose, anywhere from 50% to 100%, for both the 5-hour and 7-day windows and for both Claude Code and Codex. Instead of discovering a limit when an agent stops, you get a heads-up with enough room to wrap up or shift work to a window that still has capacity.

Frequently asked questions

Claude Code meters usage over a rolling 5-hour window and a 7-day window. The exact amount depends on your Anthropic plan, but each agent reports how much of the current window is used and when it resets.
The 5-hour window is rolling, so it resets about five hours after the usage that opened it. The 7-day window refills on a day and time the tool reports. AgentPeek shows both as a countdown and a refill time.
Codex uses the same kind of short and weekly windows, but the plans and exact allowances differ from Anthropic's. AgentPeek reads the values each tool reports, so the numbers stay accurate per agent.
Watch both windows live and set a budget alert. AgentPeek can warn you when usage crosses a threshold from 50% to 100% on either window, so you get a heads-up before an agent stops.

Never get rate-limit surprised.

Free for 2 days, then a $15 one time license. Activate once during onboarding.

Download for Mac