Guides · Updated October 22, 2026

Claude Code usage limit reached: why it happens and how to monitor it

“You’ve hit your session limit” in the middle of a task usually means one long or looping session used far more of your plan than it looked like. This guide covers which limits Claude Code has on Pro and Max, what each message means, why usage climbs faster than you expect, how to keep an eye on it while you work, and how to stop a runaway session before it eats your week.

The limits on a Claude subscription

From Anthropic’s Claude Code with Pro or Max and usage limits help articles:

Team and Enterprise seats work the same way: a per-seat allowance with a rolling five-hour window and a weekly window, shared with Claude chat and Cowork, sized by seat tier (Manage costs). On an API key there is no plan limit at all; you are billed per token, and the controls are in the spending limit guide.

Which limit did you hit?

The message tells you. From Claude Code’s error reference:

MessageWhat it meansDoes /model help?
You've hit your session limit · resets 3:45pmThe 5-hour window is used upNo, it is shared across models
You've hit your weekly limit · resets Mon 12:00amThe weekly allowance is used upNo
You've hit your Opus limit / Sonnet limitA limit for that model family onlyYes: switch to a model outside that family
You've hit your monthly spend limit (and the individual, org and team variants)You are past the plan and on usage credits, and the credits hit a spend limitNo; raise the limit or wait for the plan reset
Server is temporarily limiting requests (not your usage limit)A short server-side throttle, retried automaticallyNot needed; it isn’t your quota

A context or auto-compact warning is also not a usage limit: the conversation is close to the size where Claude Code summarizes older history.

Why usage climbs faster than you expect

Claude Code sends your full conversation with every request, and each tool call sends another request carrying the results. Anthropic’s cost docs list the usual reasons a session that has been open for hours draws more than your activity suggests:

And the one the docs can’t list: an agent stuck retrying the same failing command. Every retry re-sends the growing context, so a loop gets more expensive with each turn.

How to monitor it while you work

#!/bin/bash
# ~/.claude/statusline.sh  (chmod +x), then in ~/.claude/settings.json:
# "statusLine": { "type": "command", "command": "~/.claude/statusline.sh" }
input=$(cat)
FIVE_H=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty')
WEEK=$(echo "$input" | jq -r '.rate_limits.seven_day.used_percentage // empty')
OUT=""
[ -n "$FIVE_H" ] && OUT="5h: $(printf '%.0f' "$FIVE_H")%"
[ -n "$WEEK" ] && OUT="${OUT:+$OUT }7d: $(printf '%.0f' "$WEEK")%"
echo "${OUT:-no plan data yet}"

In the Desktop app, the usage ring next to the model picker shows the same thing.

What to do when you hit it

Before you continue, look at what the session was doing. Automatic continue means a session that was looping when it ran out will pick up the loop again after the reset, and spend the next window the same way.

Use less of your limit per task

Stop runaway sessions before they eat the week

Plan limits stop you after the usage is gone. To stop one bad session early, the check has to run on every step. Claude Code’s PreToolUse hook does that, and LoopGuard is an open-source (MIT) CLI that installs one. It reads the session transcript Claude Code already writes (subagent transcripts included), prices the tokens at API list prices, and on every tool call checks a per-session cap, a daily cap and loop heuristics. No proxy and no API key, so it works on Pro and Max.

npm i -g loopguard-cli          # puts `loopguard` on your PATH
loopguard init --agent claude   # adds PreToolUse + Stop hooks to ~/.claude/settings.json (backed up first)

loopguard config set sessionCapUsd 10   # estimated $ per session (default 25)
loopguard config set dailyCapUsd 40     # estimated $ per local day, all guarded agents (default 100)
loopguard report --by session           # what your recent sessions would have cost at API prices

Be clear about what this measures. On a subscription you aren’t billed per token, and Anthropic doesn’t publish how many tokens a 5-hour window holds, so LoopGuard does not read your plan percentage. The dollar figure is an estimate at API list prices: a consistent measure of how heavy a session is, which you can calibrate against /usage after a few days (for example, if $15 of estimated spend is roughly your 5-hour window, set sessionCapUsd below that). Checks run when Claude calls a tool or finishes a turn, so a cap can be passed by up to one turn.

Related

LoopGuard on GitHub · Pricing