Claude Code approaching Opus usage limit: find what burned the context

Inspect /usage attribution, trim CLAUDE.md and catch capacity drops early on UsageAtlas before a hard stop.

·2 min read

Seeing a Claude Code approaching Opus usage limit warning in the middle of a refactor usually points to context size rather than the number of prompts you typed. Each turn sends the whole active conversation, tool results and system files back to the model, so an un-cleared afternoon thread makes every minor follow-up expensive against your allowance.

Check what actually used the tokens first

Before guessing, run /usage inside Claude Code. As Anthropic's cost guide explains, subscription plans display an attribution breakdown showing which skills, subagents, plugins and MCP servers accounted for recent usage, followed by concrete recommendations starting with items behind 10% or more of recent consumption.

Pressing d or w toggles between the last 24 hours and the last 7 days, and on recent builds (v2.1.305+), pressing f lets Claude Code apply supported fixes such as lowering reasoning effort automatically.

Three silent drivers behind Opus exhaustion

Culprit Why it hits late in the day Immediate check
Stale conversation history Prompt cache re-reads or misses still consume allowance Run /rename then /clear on new tasks
Inherited subagent models Subagents inherit your Opus setting unless overridden Configure model: haiku for read-heavy subagents
Bloated CLAUDE.md files Loaded at session start on every thread Keep CLAUDE.md under 200 lines; move workflows to skills

Extended thinking also counts toward output usage, and on adaptive or fixed-budget models, lowering effort with /effort trims unnecessary reasoning tokens on simple edits.

Catching the drop earlier with local desktop alerts

Relying on memory to run /usage usually fails right when you are deep in debugging. UsageAtlas monitors supported Claude Code five-hour and weekly windows in a local desktop app, displays remaining capacity and reset clocks side by side, and fires a single desktop notification per reset cycle when remaining capacity crosses a threshold you pick.

Because UsageAtlas is free, open source and local-first, it records token counts, model mix and estimated costs without uploading your prompts or responses. Note that Anthropic can adjust or delay limit windows at any time, so /usage in the terminal remains the final check before a deadline.

Recovering if you still cross the line

If you hit the model-specific Opus limit before finishing, run /model and switch to Sonnet to wrap up implementation and tests. If you hit the broader five-hour session or weekly cap instead, switching models will not unblock you, so /usage-credits (if enabled on your subscription or organization) or waiting for the reset time shown in the message are the remaining paths.

FAQ

Why did a one-line question use so much of my Opus limit?

Claude Code sends the full conversation context with every turn, and prompt caching still draws from plan limits at cached rates, so a one-line prompt in a huge session carries all earlier context.

Can moving instructions out of CLAUDE.md save Opus capacity?

Yes. Anthropic recommends keeping CLAUDE.md under 200 lines and moving specialized workflows into on-demand skills so unused instructions do not inflate every turn.

Does UsageAtlas read my source files or prompts?

No. UsageAtlas reads local usage metadata and does not read prompts or model responses.