[BUG] API Error: Usage credits required for 1M context
Open 💬 88 comments Opened May 28, 2026 by Zamhinio94
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
<img width="491" height="367" alt="Image" src="https://github.com/user-attachments/assets/fa2aa408-3e55-4e38-a7b1-1124bb96e6fb" />
<img width="604" height="734" alt="Image" src="https://github.com/user-attachments/assets/5703128b-b7a1-4444-9c18-4bf8f9bf3324" />
89 Comments
@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
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.
Same issue here, I just did that and all my balance instantly went to Minus from like 40€
<img width="1022" height="328" alt="Image" src="https://github.com/user-attachments/assets/2a0a9134-e36f-48e9-8670-a85991be09e1" />
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
<img width="2304" height="1296" alt="Image" src="https://github.com/user-attachments/assets/4475ca3d-85e2-45fc-8ce1-331ce5e5ea39" />
and this one today
<img width="395" height="596" alt="Image" src="https://github.com/user-attachments/assets/f9ce6c01-b4a4-46d9-9e92-6d869d91ee91" />
Has anyone since found the solution ?
Start the new session
i already tried restarting claude code multiple times
Did you try closing the current Claude tab and opening a fresh tab?
<img width="218" height="109" alt="Image" src="https://github.com/user-attachments/assets/598ed298-07f5-4e58-bfbf-657026d2214d" />
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.
same issue here.
i have this helloClaude responded: API Error: Usage credits required for 1M context · turn on usage credits at claude.API Error: Usage credits required for 1M context · turn on usage credits at claude.ai/settings/usage, or use --model to switch to standard contextAPI Error: Usage credits required for 1M context · turn on usage credits at claude.ai/settings/usage, or use --model to switch to standard context
Same issue. Burned $40 in a couple hours despite having a paid subscription and Current session 0% Weekly limits 18% used
It works for me
I am having the same issue. I spent to money to add credits. Since then I still get the error message and burnt my credits. Did not purchase any more but started a new session. Lost some context. Tried to raise a support ticket request but the automated process is like a moat...
had the same issue from the vscode plugin. Worked well once I updated vscode. Can it be an issue with the client?
my current version is 2.1.104
Same here, all should be most recent version. urgent fix needed
VSCode:
Version: 1.123.0 (user setup)
Commit: 6a44c352bd24569c417e530095901b649960f9f8
Date: 2026-06-03T11:29:03+02:00
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Windows_NT x64 10.0.19045
Claude:
Identifier anthropic.claude-code
Version 2.1.161
Last Updated 5 hours ago
Same issue, even
/compactdoesnt work.what's the fix/workaround?
I think this will be billing issue. Today, my plan is renewal. after renewal, it getting following error. but my plan is max with 7% usage.
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
any one recently billing cycle.
I faced the same issue in CC and happened as I hit 75% session limit.
Same issue here. The only workaround i found was changing the model to opus and running /compact, then continuing the chat normally using sonnet - Cost about 13% of the 5h usage
Same issue here, no workaround, please help me with a fix
same issue here ! workaround: start a new session..
Current workaround is to start a new session, copying and pasting what you need from previous one.
I am also running into this. The only fix I have found is to toggle extra usage on, /compact, then toggle it off. Are we going to be reimbursed for this?! This used almost $60 of extra usage
This needs to get fixed. It makes Sonnet 4.6 almost unusable
=
I have also encountered this bug with Sonnet. I have tried logging out and logging back in. I have tried uninstalling and reinstalling. Every time I encounter this error it is on a fresh session, not an old one. So no the issue is not that I am actually using too many tokens or context. Opus works fine but I cannot use that 100% of the time.
I am facing the exact same issue since this morning. My weekly limit is at 3%, my monthly credit limit is at 84% and I get shown the error message above. It does not make a difference on whether I use Opus or Sonnet. I tried all the workarounds, nothing helped.
This needs to get fixed ASAP, please.
Yesterday I renew my subscription to Pro and hit the sssion limit after couple of hours and get the same error. Try to continue today and stuck with the same message.
Tried the suggested workaround: start a new session.. with /export session for context. Open the new session and continue.
Thanks for workaround.
The only concern is what @ADeravi said in the thread above.
I'm getting a little frustrated with this, still can't do anything in Claude Code and my usage is literally at 0.
<img width="977" height="635" alt="Image" src="https://github.com/user-attachments/assets/60f6c99c-22e0-4561-ba4d-983895f48b8b" />
"Out of usage credits" - how?
Same issue here
100% of context was used. /clear worked for me, ofcourse I lost all the memory ..
+1
+
+1 same here
+1 here
+1 here
+1 here
The only workaround I've found is to buy some more tokens and compact - but it keeps happening and I've spent more than I'm willing to.
same issue, arent there any workaround for this?
Changing the model to Haiku, then using /compact, then switching back the model seems to work for me, not sure for how long however.
What i did is changed to latest 4.8 and then do a task and switched back to default and it looks working.
I managed to fix it for myself. From what i think, this error happens when Claude is trying to load big files, and because of that, it gives the Usage credits required for 1M context. I'm using Claude code in VS Code, and the solution that worked for me is setting up Claude so he only loads files he really has to. I did this using .claudeignore (here I've put everything that Claude doesn't need for the current task), and also instead of sending him reference or design files directly in chat, I put them in his workspace. I highly recommend using normal Claude to build prompts so they give clear instructions and save context. Also, after each bigger task, switch to a new session. Since I started doing this, Claude has been working normally. Hope this helps
The work round seems to be simple just when you start seeing the orange
circle to say that your session is getting long use compact or start a new
session. The problem seems to be that the message will not auto compact so
once that orange circle fills up and then disappears you will get that
error that you need a better model to handle that message. It’s too big.
On Thu, Jun 4, 2026 at 11:52 AM ɖǟʀɛɖɛʋɨʟ @.***> wrote:
i seem to have the problem in new tasks, too....
the /compact with HAIKU plus Closing the App and reopening it helped (see comment from @andrejpolacek123)
same here
please fix this
+1
+1
+1
+1
+1
Same issue here, clearing the chat seems to be the only solution but it will lead to losing all context
the fix i found for now is just compact your sessions before you hit that
limit. auto compact is not working so once your message gets so big that
your pro usage can not process it, it wants to use your extra credits or a
diff model to do it. Best practice is compact manually often or start new
session often. have not had a usage limit message since.
On Thu, Jun 4, 2026 at 11:07 PM Yogeshwar CM @.***>
wrote:
Switching to Opus / haiku models also works guys.
same
I also switched to Haiku to compact my session and then switched back to Sonnet
+1
what i had to do was switch to opus and turn on the usage credits, once that was done i told VS to create a handoff document in folder i had been using. i then opened a new window and told vs to read the document. seemed to work. i was using regular sonnet before but somehow this got swapped to 1m. something in VS swapping messed up the window i was using
+1
@dody44-hub Thanks for your helpful update.
This error is usually triggered by 1M context being active, which is billed separately from your weekly limit — that is why it fires even when your weekly usage is low.
Per the official model docs (code.claude.com/docs/en/model-config → "Extended context"):
So if Sonnet (the default on Pro / Team Standard) is running with a 1M window, each request is billed to usage credits, and with no credits you get "Usage credits required for 1M context" — independent of your weekly allowance.
Why
/clearand restarts do not fix it: as of v2.1.153,/modelsaves your choice to themodelfield in your user settings and reloads it on every new session. Ifopus[1m]/sonnet[1m]ever got selected (or[1m]is pinned inANTHROPIC_DEFAULT_OPUS_MODEL/ANTHROPIC_DEFAULT_SONNET_MODEL), the 1M variant keeps coming back.Verified fix:
CLAUDE_CODE_DISABLE_1M_CONTEXT=1— this removes all 1M variants from the picker (official, model-config docs).~/.claude/settings.jsonmodelfield and strip any[1m]suffix (e.g."sonnet[1m]"→"sonnet"or"default"). Also check project / managed settings — those take precedence and reapply on launch.ANTHROPIC_DEFAULT_OPUS_MODEL/ANTHROPIC_DEFAULT_SONNET_MODELenv vars for a trailing[1m]and remove it./model→ pick a non-[1m]model → Enter to save it as the new default.Caveats (being honest): Cowork / claude.ai web (see #65756) does not go through the CLI process, so the env var above will not reach it — that variant looks platform-side. And if the error fires before model selection in some setups, the above will not catch it and it is a support case.
Source: code.claude.com/docs/en/model-config ("Extended context" and "Setting your model").
+1
I am having this issue. It is happening more frequently and the last time I was not able to clear it. I was using the clear command to resolve it but that caused me to use extra tokens and I the memory was lost so I had to start over on a complex task. Now I can't use Cowork at all. Is there a solution that I can use to resolve this problem?
Looks like they finally fixed it. Just hope they pay us back all the extra
usage credits it burned up
On Sun, Jun 7, 2026 at 2:56 PM bperry07920 @.***> wrote:
Same issue here, please fix this.
So far this has worked for me:
export CLAUDE_CODE_DISABLE_1M_CONTEXT=1
Run the command inside the project in which you are using Claude, and in the same terminal run Claude.
Works unless you're using Claude Cowork, which this also applies to.
Same issue here, please we need fix!
Just hit this for the first time this morning using
claude-code:2.1.153 (Claude Code). Here's my~/.claude/settings.json:I exited
claudeand relaunched. Error remains.This is great, but doesnt help for cowork, which is where a lot of us are getting this issue from.
Recovery when deadlocked with opusplan (Pro plan, macOS, 2.1.170):
/model→ switch to plain Opus 4.8 (not plan mode) →/compact— compact succeeds. Switch back to opusplan after.autoCompactEnabled: truedoes not prevent this — auto-compact itself hits the same error on opusplan sessions.This is unacceptable.
Claude Code 2.1.178
i get: 'API Error: Usage credits required for 1M context' all the time.
I basically cant work as there is no way around this.
How can this ciritcal issue not be addressed yet ?!?!?
Meanwhile, Boris Cherny: "I don't write prompts anymore, I have loops running that prompt Claude... My job is to write loops. I uninstalled my IDE, I wasn't using it."
@bcherny, would you mind creating a loop to fix a critical issue in your software?
The workaround is to log out, log back in, and access
/resume. It should work again after that.All I did was /model and selected a model then it worked again. Not sure why it needed since I had been using it all day then just stopped and I was only at 10% usage.
Was having sonnet 1M by default.
I switched to Opus and it worked for me to continue working.
Switching to another Anthropic account worked for me