You are halfway through a refactor and Claude Code stops with You’ve hit your session limit. A Claude Code usage limit on a Pro or Max plan is a usage window, not a bug: you have used your share for now, and the message tells you when it resets. Here is what each limit message means, how to check where you stand, and the habits that make your allowance last much longer.
Which limit have you actually hit?
Claude Code shows several different messages, and they don’t all mean the same thing:
You've hit your session limit: the rolling five-hour window on Pro and Max. It resets a few hours after your first message in that window, and the message shows the reset time.You've hit your weekly limit: the seven-day cap that sits on top of the five-hour window. This one hurts more, because waiting means days, not hours.You've hit your Opus limit(or Sonnet): a model-specific cap. Here, switching to a model outside that family with/modelkeeps you working. Switching models does not help with the session or weekly limits, which are shared across all models.Request rejected (429)or a retry spinner: an API rate limit, usually when you’re on a Console API key rather than a subscription. Claude Code retries temporary 429s automatically with backoff.529 Overloaded: the API is at capacity. That’s Anthropic’s problem, not your quota, and it doesn’t count against your usage.
One detail people miss: your plan limits are shared between Claude Code and the Claude apps. A long chat on claude.ai in the morning eats into the same allowance your terminal uses in the afternoon.
Check your usage before you run out
Run /usage inside Claude Code. On a subscription plan it shows your plan usage bars plus a breakdown of what has been eating your allowance:
/usage
- Attribution: the share of recent usage that went to skills, subagents, plugins and individual MCP servers.
- Recommendations: rows such as trimming an oversized CLAUDE.md or running
/compactbefore you step away. On recent versions you can pressfto have Claude Code apply the ones it can. - Press
dorwto switch between the last 24 hours and the last seven days.
The Session block at the top shows token counts and an estimated dollar figure. That matters to API users; on Pro and Max it’s not what you’re billed. For a live view, configure the status line to show context usage, and run /context to see what is filling your context window right now.
Why usage climbs faster than you expect
Claude Code sends your whole conversation with every request, and each tool call sends another request carrying its results. Prompt caching makes re-reading history cheaper, but a one-line question in a session that has been open all day still pays for the entire conversation. The usual culprits:
- Long sessions that are never cleared between unrelated tasks.
- Coming back after a break: the cache has expired, so your first message reprocesses the full context.
- Reading huge files or logs in full, or vague prompts like “improve this codebase” that trigger broad scanning.
- Background work:
/loopand scheduled tasks fire on their interval even while you’re idle, sending your context each time. - Running Opus with high effort on simple jobs. Thinking tokens count as output.
Habits that use fewer tokens
/clearbetween tasks. It costs nothing and resets the context. Use/renamefirst if you want to come back with/resume. I covered the difference in detail in Claude Code context: /compact, /clear and CLAUDE.md./compactwith instructions when you need continuity, for example/compact keep the failing test output and the API changes. Bear in mind compacting a huge context is itself a large request.- Keep CLAUDE.md lean. It loads into every session. Anthropic’s guidance is to aim for under 200 lines and move workflow-specific instructions into skills, which only load when used.
- Match the model to the job. Sonnet handles most coding; save Opus for hard architecture or multi-step reasoning. Lower
/effortfor routine edits. - Push noisy work into subagents. Test runs, log digging and doc fetching stay in the subagent’s context and only a summary comes back. Give simple subagents
model: haiku. See building a custom subagent for the file format. - Trim MCP servers. Disable ones you aren’t using via
/mcp, and prefer CLI tools likeghwhere they exist. - Be specific. “Add input validation to the login function in auth.ts” reads one file; “fix the auth” reads twenty.
- Plan first on big jobs. Shift+Tab into plan mode so a wrong approach is caught before it burns tokens, and press Esc the moment Claude heads the wrong way.
A hook can also cut a lot of waste. Instead of letting Claude read a 10,000-line test log, a PreToolUse hook can rewrite test commands so only failures come back:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "~/.claude/hooks/filter-test-output.sh" }
]
}
]
}
}
What to do when you’ve already hit the limit
- Wait for the reset. The message shows the time. Recent versions can wait and carry on the interrupted task automatically once the window resets.
- Turn on usage credits. Run
/usage-credits(signed in with your subscription) to open the Usage settings on claude.ai, where you can enable credits and set a monthly spend limit. - Upgrade. Pro to Max, or Max to Ultra, if you hit the weekly limit every week.
- Switch to an API key. A Claude Console account bills per token at API rates, with workspace spend limits to keep it in check.
If you also see responses cut short mid-file, that’s a different ceiling. See Claude Code output limits explained.

Leave a Reply
You must be logged in to post a comment.