[BUG] API Error: Usage credits required for 1M context
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Keep getting the 'API Error: Usage credits required for 1M context' error - however I still have usage remaining and it has not been more than usual amounts...
What Should Happen?
Claude should not give this error and work successfully
Error Messages/Logs
'API Error: Usage credits required for 1M context'
Steps to Reproduce
n/a
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
2.1.121
Claude Code Version
2.1.121
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
@claude grateful for help
same here
Bug Description On Max 20x plan with latest Claude Code (v2.1.154), I get: "API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context"
This appears even though 1M context is documented as included in Max plans with no extra usage required. The client seems to default to the 1M long-context tier instead of routing standard (<200K) requests to the standard tier.
Environment
- Plan: Max 20x ($200/mo)
- Claude Code version: 2.1.154 (latest on npm)
- OS: [Windows / macOS / Linux — à compléter]
- Model selected: [Opus / Sonnet — à compléter]
Expected behavior Requests under 200K tokens should use the standard tier and succeed without usage credits, since 1M context is included in my Max plan.
Actual behavior Every request is gated behind the 1M usage-credits requirement, blocking the session. Updating doesn't help (already on latest version).
Workaround /model → standard context lets work continue, but 1M (included in Max) remains unusable.
Same issue here. The setting keeps the 1M token option disabled, but the issue still happens. Opening a new thread fixed it for a few hours, but the same error eventually came back. The issue is; Desktop's context is tied to your Anthropic account, not local machine config.
This worked for me:
Turn off “usage credits to keep using Claude if you hit a limit”, then quit and reopen the app.
After that, turn it back on, quit and reopen the app again, then continue the chat.
Same issue here, I just did that and all my balance instantly went to Minus from like 40€
I am facing similar issue and I see similar bugs but no response.
I am experiencing the exact same issue. I have tried every single troubleshooting step and workaround mentioned here and in the documentation, but none of them resolved the problem.
To make matters worse, during my last session, this persistent error triggered an automated loop that rapidly and completely depleted all of my paid tokens within minutes, without me even making any substantial usage or writing much code.
This is a critical system-side glitch that is costing users real credits. Please investigate and fix this context/billing loop as soon as possible.
메시지를 다시 보내 보세요. 계속 발생하면 저희가 조사할 수 있도록 피드백을 공유해 주세요.
API Error: Usage credits required for 1M context · turn on usage credits at claude.ai/settings/usage, or use --model to switch to standard context 이전 메시지부터 대화를 다시 시작할 수 있습니다.
i also have this error randomly. usage limit is 0% yet cannot do anything. not sure whats going on
I am also having this error. Usage limit and session limits remaining but cant use anything
face the same issue.
This cost me all my extra usage credits. somehow claude changes modes and starts using 1m context. silently used all my extra usage credits then i got this error, so i looked at usage, not near my limit, then i see all my extra credits gone. fails to auto compact message maybe? does not show token meter during error but i assume it something to do with that. so it changed to 1m context to handle the large message. first of all it needs to auto compact, second, if that fails, needs to warn user before auto switching to diff model context, third, do not use extra usage without user approval.
this is the one that cost me all my credits
and this one today
Has anyone since found the solution ?
Start the new session
i already tried restarting claude code multiple times
i already tried restarting claude code multiple times
Did you try closing the current Claude tab and opening a fresh tab?
i tried that multiple times also everything i found so far regarding this problem on github and like 10 different solutions claude gave me but nothing worked.
I am losing money now :( since all my additional credits are gone and I made the mistake of doing /usage-credits thinking it will be smart to only use additional credits once my free allowance for the Pro plan is done.
I can confirm that for me 'Terminate claude code' and restarting the same has resolved the issue.
I had to open a new chat tab, but thats what eventually let me use claude again, though I lost the context
Same issue here. The workaround is pretty clunky: run /export, then start a new session.