[BUG] Claude Code defaults to 1M context on fresh session with no workaround on Pro plan

Open 💬 62 comments Opened May 24, 2026 by kev124-hub

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?

Here's a clean bug report summary you can paste directly into GitHub:

---

Title: Claude Code defaults to 1M context on fresh session with no workaround on Pro plan

Plan: Pro ($20/month)
OS: macOS
Interface: Claude Code desktop app
Claude Code version: Latest

Description:
On a brand new session with no files open and no prior context, Claude Code throws the following error immediately:

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 never requested 1M context. Session usage was at 0% (5-hour window: 5%, 7-day: 11%) when the error occurred.

Steps to reproduce:

  1. Open Claude Code desktop app on Pro plan
  2. Start a fresh session
  3. Error appears immediately without any prompt or file loaded

Attempted workarounds — none resolved it:

  • claude --model claude-sonnet-4-5 — same error
  • claude --model claude-sonnet-4-6 — same error
  • claude logoutclaude login with Pro credentials only — same error

Expected behavior: Standard context window used by default on a fresh session. Pro plan should not require usage credits for standard context.

Actual behavior: 1M context is selected automatically with no way to override it via --model flag.

---

That's everything they need to reproduce it. Post it at github.com/anthropics/claude-code/issues.

What Should Happen?

Standard context window used by default on a fresh session. Pro plan should not require usage credits for standard context.

Error Messages/Logs

Usage limit reached
You've reached your usage limit. Try again after your limit resets.
View details
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

Steps to Reproduce

  1. Open Claude Code desktop app on Pro plan
  2. Start a fresh session
  3. Error appears immediately without any prompt or file loaded

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

claude --version returns usage error

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

62 Comments

ALISAEED-1 · 1 month ago

Same issue. Pro plan, 13% session / 43% weekly when error fires.

1uuuNuuu1 · 1 month ago

I purchased a Claude Sonnet subscription with a 200k token context limit. However:

Problem: When using Sonnet 4.6 in Claude Code, the system automatically forces 1M context window instead of respecting my 200k subscription limit
Error: System shows "Usage limit reached" because my plan only includes 200k
Impact: I cannot use the product I paid for
Current "solutions":
Pay extra for usage credits (additional charge)
Downgrade to Haiku (not what I purchased)
Expected behavior:

Either allow me to explicitly limit context to 200k (my subscription limit)
Or use the 1M context within my subscription (as Max/Max 20x plans do)
Precedent:
Per Issue #53477, Max and Max 20x subscribers now get 1M context included. Why not apply the same logic to all subscription tiers?

System Info:

Claude Code on macOS
Model: Claude Sonnet 4.6
Plan: 200k context subscription

dsrigyan-dev · 1 month ago

What the hell, I am facing the same issue and lost my token without using it.Neither able to work nor is my quota available, I cant work on older model I need sonet or opus both are throwing same error, whats nees to be done

wilsonnggp · 1 month ago

Has anyone found a fix for this?

jamesfebin · 1 month ago

Same issue here. Still unresolved as of today. This bug burned through my paid credits. Requesting some workaround.

rieltgood-stack · 1 month ago

Same issue on Pro plan, VS Code extension, Linux server

murveit · 1 month ago

I had a very similar issue--was working on a long-standing session. All of a sudden it told me

API Error: Usage credits required for 1M context. Run /model to switch to standard context.

but, of course, there was no option to switch to standard context, and I had done nothing to switch to 1M context. Basically my session was hosed. I could not run /compact either. I noticed that it said my context was 145%.

My work-around was to /quit, and then restart with haiku. claude --continue MY_SESSION --model claude-haiku-4-5-20251001 In that new haiku session I was able to run /compact. Then I quit and ran claude --continue MY_SESSION --model claude-sonnet-4-6. Perhaps I could have done all that inside my original session (e.g. change model to haiku and then compact and then change model back to sonnet).

frank-r-peters · 1 month ago

Similar error here:

API Error: Usage credits required for 1M context · run /usage-credits to turn them on,
or /model to switch to standard context
in the midst of a rather long session.

Every following interaction produced the same message.

Observed state:

  • /usage — not out of tokens (subscription allocation available)
  • /usage-credits — feature reported as on
  • account had a usage-credits balance ($4+)

Starting a new session eventually fixed the problem, but some context was lost.

ariefwijaya · 1 month ago

Same issue on Max plan, VS Code extension, MacOS. works when starting new chat but lost context

dattadream · 1 month ago

Hi, I'm on the Claude Pro plan and have been using Claude Code with Sonnet without any issues until recently. After a recent update, Claude Code now defaults to the 1M context window and throws this error on every session:

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context

I tried setting the model explicitly in settings.json with "model": "claude-sonnet-4-6" but the error persists. The only workaround I found is switching to Haiku, which is not acceptable for development work.

This was working fine before — I never changed anything on my end. It seems like a recent change defaulted all sessions to 1M context without giving Pro users a way to opt out and keep using Sonnet with standard context.

Please either:

  • Allow Pro users to use Sonnet with standard 200K context without requiring usage credits, or
  • Provide a working configuration option to disable 1M context

This is blocking normal usage for Pro plan subscribers.

punitsingh2 · 1 month ago

same issue i am also facing , i dont find way to overirde

cliffarn · 1 month ago

Same issue. Using in VSCode. Windows.
Done the same workaround attempts but still same error

Is it still the same for you guys after the next 5h session?
Or is it locked all the time?

dekoboko-studio · 1 month ago

I'm having the same issue. Fixes mentioned here don't seem to be working for me.

greywolfie · 1 month ago

Same on 2.1.156, Pro, Windows, Sonnet 4.6. CLAUDE_CODE_DISABLE_1M_CONTEXT=1 set and /context confirms 200K, but the error still blocks all input on startup — and the credits purchase dialog has no confirm button, on both desktop and web

Please escalate to a human. I am completely blocked on both desktop and web, this matches open GitHub issues #62063 / #61921 / #63761, and the credits purchase dialog has no confirm button so I cannot resolve it myself.

mrkylegp · 1 month ago

Also getting this bug, arch linux, claude code in CLI. Only clearing context with /clear fixes it. Autocompact doesn't seem to work for this particular claude session either.

abdulahad2008 · 1 month ago

Hey,

Try installing Antigravity (or another alternative, but not Claude Code) and then run the following command.

First, locate and update this file:

/Users/jet/.claude/settings.json

cat ~/.claude/settings.json 2>/dev/null | python3 -c "
import json, sys
data = {}
try: data = json.load(sys.stdin)
except: pass
data.setdefault('env', {})['CLAUDE_CODE_DISABLE_1M_CONTEXT'] = '1'
print(json.dumps(data, indent=2))
" > /tmp/claude_settings_tmp.json && mv /tmp/claude_settings_tmp.json ~/.claude/settings.jsonS
ScarletThe4EyedCuda · 1 month ago

I ran into this last night. Windows 11, using PowerShell. Same issue as everyone else.

I turned off autoUpdates and reverted to 2.1.149 and that fixed it.

settings.json
{
"autoUpdatesChannel": "latest",
"theme": "dark",
"autoUpdates": false,
"env": {
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
}
}

revert to 2.1.149 -

npm install -g @anthropic-ai/claude-code@2.1.149

Then closed all windows, opened them up and I was able to work again. YMMV.

gerardogrimaldi · 1 month ago
I ran into this last night. Windows 11, using PowerShell. Same issue as everyone else. I turned off autoUpdates and reverted to 2.1.149 and that fixed it. settings.json { "autoUpdatesChannel": "latest", "theme": "dark", "autoUpdates": false, "env": { "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" } } revert to 2.1.149 - npm install -g @anthropic-ai/claude-code@2.1.149 Then closed all windows, opened them up and I was able to work again. YMMV.

Thanks man, you saved my day!

Sajeyks · 1 month ago

Is anyone working on this? I have more than enough credits, but the model keeps stalling:

``Error: Error during compaction: 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``

Wasilewskiii · 1 month ago
I ran into this last night. Windows 11, using PowerShell. Same issue as everyone else. I turned off autoUpdates and reverted to 2.1.149 and that fixed it. settings.json { "autoUpdatesChannel": "latest", "theme": "dark", "autoUpdates": false, "env": { "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" } } revert to 2.1.149 - npm install -g @anthropic-ai/claude-code@2.1.149 Then closed all windows, opened them up and I was able to work again. YMMV.

My brother from another mother. I love you.

mrkylegp · 1 month ago
I ran into this last night. Windows 11, using PowerShell. Same issue as everyone else. I turned off autoUpdates and reverted to 2.1.149 and that fixed it. settings.json { "autoUpdatesChannel": "latest", "theme": "dark", "autoUpdates": false, "env": { "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" } } revert to 2.1.149 - npm install -g @anthropic-ai/claude-code@2.1.149 Then closed all windows, opened them up and I was able to work again. YMMV.

Legend, this worked for me too on arch. It's definitely a bug somewhere beyond 2.1.149 as now it works perfectly after downgrading.

ovisopa · 1 month ago

I'm quite dissapointed on 4.8, I tried it since yesterday, in one hour of chating with it, it already reached the 5h limit twice (it reset the limit after 30 minutes, but than again when I continued chating with it, about a new algorithm we should use in a app to smoth out the GPS Elevation noisy numbers it reached the limit again, and I already had an algorithm to median 5 gps points, and I asked it to make a smarter algorithm...)

Anyway, today I encountered this issue too, THANKS @ScarletThe4EyedCuda for the sollution!

I first changed the model to 4.6, than downgraded the VS Code Claude Code extension to 2.1.152 and manually edited the settings.json to this :

{
"effortLevel": "medium",
"env": {
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
}
}

It works again now

artenais · 1 month ago

This seems to happen in claude app too in the code mode. Switching to opus 4.8 is the only way to continue.

kemoboy · 1 month ago

Any solution for this?

bladerunner2020 · 1 month ago

I have a similar issue. I use the Max plan ($100). My default model is set to Sonnet 4.6. During the session, at some point, it seems to switch automatically to Sonnet [1m]. If I use /model, it shows the right model — not 1m. I need to restart the session, losing all the context.

Landbuzz · 1 month ago

Same here - PLEASE FIX ---- PLEASE FIX ------PLEASE FIX

This is what is happening.....

I am a Claude Pro subscriber and my Claude Code workflow in VS Code has been completely broken by a recent update that silently changed the default model to one requiring a 1M context window — without any notification or warning.

I have spent several hours attempting every documented workaround:

  • Using the --model flag
  • Setting the model via /model in Claude Code
  • Editing ~/.claude/settings.json to add CLAUDE_CODE_DISABLE_1M_CONTEXT=1
  • Setting the environment variable at Windows system level via PowerShell

None of these have worked. My session usage was at 0% when the error first appeared, so this is not a genuine usage limit issue — it is a bug.

This is referenced in GitHub issues #62063 and #62199, which confirm other Pro users are experiencing exactly the same problem.

I am paying for a Pro subscription and cannot use the product I am paying for, through no fault of my own. I would like this escalated and resolved urgently, and I would appreciate confirmation that my usage has not been unfairly consumed as a result of this bug.

Thank you.

ScarletThe4EyedCuda · 1 month ago

@Landbuzz Your comment says you tried everything above, but you didn't mention of you downgraded to 2.1.149.

From a terminal -
npm install -g @anthropic-ai/claude-code@2.1.149

It appears that versions after 2.1.149 ignore the environment variable, so until this is fixed you have to turn off updates and stay on 2.1.149.

I'm not using VS, but after doing the commands in my post above, I have had no issues and 2 other people have commented that this worked for them as well. YMMV

chrismackintosh · 1 month ago

This popped up for me in several sessions yesterday using Sonnet 4.6 in Cowork. Some of the sessions resolved themselves after 30 minutes or so, but I have one that is currently stuck:

Something went wrong.
Try sending your message again. If it keeps happening, share feedback so we can investigate.

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.
You can restart the conversation from an earlier message.

Max plan, 31% used.

hornetmadness · 1 month ago

I walked the version back to 2.1.153 and its still having this problem.

dangbt · 1 month ago

any update?

CCSNH-NicolePhillips · 1 month ago
I walked the version back to 2.1.153 and its still having this problem.

Degrading had worked for me yesterday, now its back. I also had audo reload on and did not notice Claude was actively just taking money from my bank account. I even attempted a refund and it was refused due to their no refund credit policy. Which is disgusting because if I did not get this error it could have easily drained my bank account.

I had switched to Claude as the ai itself is substantially better than copilot. It does not seem they care as no updates, no hotfixes, nothing from Anthropic.

mmozafarian · 1 month ago

Same issue with Session 34% used and Weekly limit 17% used. On VS Code Ext. with Sonnet 4.6 - OS: Windows 11

CCSNH-NicolePhillips · 1 month ago

Temporary work around:

Add { "effortLevel": "medium", "env": { "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" } } to the settings.json

Add at least $1 to your usage banks and turn it on.

downgrade: From a terminal -
npm install -g @anthropic-ai/claude-code@2.1.149

Here is the important step, because whats happening is its auto pushing us to 1m after we get further than the 200k limit, you need to compact the chat. manually write in claude chat /compact.

restart vscode (ideally the entire laptop)
Before next command turn usage credits OFF

ScarletThe4EyedCuda · 1 month ago

Don't forget to turn off auto updates. It seems anything above 2.1.149 is ignoring the env var.

hackiesack · 1 month ago

Getting the same error here, just upgraded from the $20 to $100 plan and barely getting to use 30% of it before i continue. Tried resolving with Fin chat bot... updated, uninstalled, reinstalled. nothing

draftingfjp-lang · 1 month ago

Im having the same issue and it somehow burned through all of my credits with a couple of prompts after I managed to switch to Opus 4.6 to get it to work.

praskavi · 1 month ago

having same issue, only used 34% , weekly limit 11% used

punitsingh2 · 1 month ago

i am struggling since past 3-4 days i tryied all possible suggested solution but didn't worked, but still VS code not getting option to changes directly the models but claud desktop we have option to change model so today i tried to change to opus 4.8 then its working now.

But this kind of issue very disappointing even if you daily limit and weekly also why we should go through this ?

graggashley-del · 1 month ago
### 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? Here's a clean bug report summary you can paste directly into GitHub: Title: Claude Code defaults to 1M context on fresh session with no workaround on Pro plan Plan: Pro ($20/month) OS: macOS Interface: Claude Code desktop app Claude Code version: Latest Description: On a brand new session with no files open and no prior context, Claude Code throws the following error immediately: 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 never requested 1M context. Session usage was at 0% (5-hour window: 5%, 7-day: 11%) when the error occurred. Steps to reproduce: 1. Open Claude Code desktop app on Pro plan 2. Start a fresh session 3. Error appears immediately without any prompt or file loaded Attempted workarounds — none resolved it: claude --model claude-sonnet-4-5 — same error claude --model claude-sonnet-4-6 — same error claude logoutclaude login with Pro credentials only — same error Expected behavior: Standard context window used by default on a fresh session. Pro plan should not require usage credits for standard context. Actual behavior: 1M context is selected automatically with no way to override it via --model flag. That's everything they need to reproduce it. Post it at github.com/anthropics/claude-code/issues. ### What Should Happen? Standard context window used by default on a fresh session. Pro plan should not require usage credits for standard context. ### Error Messages/Logs Usage limit reached You've reached your usage limit. Try again after your limit resets. View details 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 ### Steps to Reproduce 1. Open Claude Code desktop app on Pro plan 2. Start a fresh session 3. Error appears immediately without any prompt or file loaded ### Claude Model Sonnet (default) ### Is this a regression? Yes, this worked in a previous version ### Last Working Version _No response_ ### Claude Code Version claude --version returns usage error ### Platform Anthropic API ### Operating System macOS ### Terminal/Shell Terminal.app (macOS) ### Additional Information _No response_
graggashley-del · 1 month ago

Bug: Desktop app defaults to 1M context, blocking Pro users with no working workaround

Platform: macOS, Claude Desktop 1.9659.4, Claude Code 2.1.160
Plan: Pro

What's happening: Every Claude Code session in the desktop app immediately throws "Usage credits required for 1M context" — even on a fresh session with zero usage. I never requested 1M context.
What I've tried with no fix:

Cleared app cache
Signed out and back in
Set model in ~/.claude/settings.json
Run claude config set model claude-sonnet-4-6
The desktop app ignores all of these and still defaults to 1M context

Impact: Completely unable to use Claude Code in the desktop app. Cannot access or continue work on local project files. The browser version of claude.ai is not a viable workaround because it cannot access local files.
Reference: Duplicate of #62063 and #63896 — this is affecting multiple Pro users on Mac.

I am at 0% of my session usage and 3% of my weekly limit. Honestly so annoyed. It burned through my usage credits.

sebhgtz · 1 month ago

Same issue:
Reproducing this on macOS. Claude Code version 2.1.6 , VS Code version 1.122.1 (Universal), Pro plan.
Error occurs on fresh sessions with no files open. The --model flag does not resolve it. Setting CLAUDE_CODE_DISABLE_1M_CONTEXT=1 and ANTHROPIC_DEFAULT_SONNET_MODEL via environment variables also does not resolve it. The error persists across all attempted workarounds.

enzorossi11 · 1 month ago

Adding myself to the pile, because this is genuinely infuriating. I was on standard Sonnet 4.6 (200k). I never asked for 1M context, never selected it, never wanted it. The session quietly blew past 200k — my meter hit 369.9k (185%) — because auto-compaction just... didn't run. Then everything locked up with "Usage credits required for 1M context."

So let me get this straight: the feature that's supposed to keep me inside 200k is the exact thing that secretly demands a 1M model, and when that's gated it doesn't fall back — it dies and drags the whole session down with it. And while it was busy failing, it chewed through prepaid credits I actually paid for, on requests that were erroring out. Your own docs say failed requests aren't billed. So why am I down credits?

This is #64544 / #63896 / #63634 / #62063 all over again. It's been reported for weeks. Please fix the compaction fallback instead of letting a broken feature quietly drain people's credit balances.

Environment:

  • Claude Code version: latest
  • OS: win11
  • Model: claude-sonnet-4-6 (standard 200k — never touched 1M)
  • Billing: prepaid usage credits
simonpridgeon77-hue · 1 month ago

Also adding myself to the list - 2% useage on session and weekly - but not letting me continue with project

graggashley-del · 1 month ago

I have a work around. It might not work for everyone and to be clear... I am not a coder. If you go to Claude chat and ask it to make sure all your work is committed and saved for what you are working on in Claude code it will. Then make sure the files are saved properly (claude helped me use terminal to find and verify). Then ask for a prompt to restart the work after a /clear command. You can try to start a new session and give it the prompt, but I found success doing a /clear command in claude code and providing the documentation I created with Claude Chat.

CCSNH-NicolePhillips · 1 month ago
I have a work around. It might not work for everyone and to be clear... I am not a coder. If you go to Claude chat and ask it to make sure all your work is committed and saved for what you are working on in Claude code it will. Then make sure the files are saved properly (claude helped me use terminal to find and verify). Then ask for a prompt to restart the work after a /clear command. You can try to start a new session and give it the prompt, but I found success doing a /clear command in claude code and providing the documentation I created with Claude Chat.

This works for very simple projects. I am a software engineer and most of our code is hundreds of thousands lines long. A simple commit and pull does not bring back all the technical memory. If you continue with your new chat once it hits the 200k token limit it will switch again automatically to 1m token usage.

graggashley-del · 1 month ago
> I have a work around. It might not work for everyone and to be clear... I am not a coder. If you go to Claude chat and ask it to make sure all your work is committed and saved for what you are working on in Claude code it will. Then make sure the files are saved properly (claude helped me use terminal to find and verify). Then ask for a prompt to restart the work after a /clear command. You can try to start a new session and give it the prompt, but I found success doing a /clear command in claude code and providing the documentation I created with Claude Chat. This works for very simple projects. I am a software engineer and most of our code is hundreds of thousands lines long. A simple commit and pull does not bring back all the technical memory. If you continue with your new chat once it hits the 200k token limit it will switch again automatically to 1m token usage.

Thank you for clarifying for people. Not sure I liked the slight of "very simple" but yes. It is just an app. It does a lot but isn't anything huge.

glaufen · 1 month ago

Same issue--appreciate the clarification(s). Has anyone actually found a way to get the Mac desktop app to revert to the 200K context window instead of demanding 1M?

nilesh-yadav-cio · 1 month ago

I have been facing same issue and charged 4 time unnecessary. Please fix this issue ASAP

m13v · 1 month ago

--model sets the model, not the context tier. that's why it can't clear 1M.

kemoboy · 1 month ago

@anthropic-xabi @ah-anthropic @km-anthropic @np-anthropic @wim-anthropic Hello? Does anybody at atrophic gives two flying f's about this problem? I'm delaying multiple projects because of this, I can't work on it and it costs me and my company money. -_- This is causing real problems and it costs us money.

ovisopa · 1 month ago

Anyone noticed that since the 1M context bug claude code is using all the extra credits even no limits ware reached (5h or 7d)?

I had my limits low, never touched any limit in the last 2 days but yesterday on my home windows pc I received the 1M context error, and when I checked the ussage was at 118% of the $20 extra bucks added now 2 days ago.

I had to increase the limit once more .. and I could finally work again, untill increasing the limit there was no trick I knew that bypassed the error, I tried everything I tried on the Mac and it worked, but it did not work on my PC untill I increased the extra credits limit (with only $1)

danxalot · 1 month ago

This has burnt through my pro plan subscription horrendeously for over a week now, i do not want nor did i subscribe for your extra, token-burning attempts. i'm currently in the middle of expensive GPU train - it's not just the claude subscription i'm losing. PUT A SWITCH IN THE DESKTOP APP TO PREVENT THIS FROM HAPPENING UNTIL YOU'RE ABLE TO FIX IT YOURSELVES - YOU'RE IMPACTING REAL WORKLOADS - but here's the kicker - they haven't got massive subscriptions. This is dire - at least Google responded by fixing everyone's credits with Antigravity - this is astonishingly hard-faced and a pretty shocking customer service attitude. it's shocking that your customers' subscriptions are getting drained by a bug in your own products that you're flat-out refusing to address.

murveit · 1 month ago

FWIW, switching models to compact does continue to work for me.

<img width="849" height="255" alt="Image" src="https://github.com/user-attachments/assets/5ad1bdc6-bd27-4eb7-9e3c-29e544544a5c" />

changikc-beep · 1 month ago
FWIW, switching models to compact does continue to work for me. <img alt="Image" width="849" height="255" src="https://private-user-images.githubusercontent.com/32718390/603162942-5ad1bdc6-bd27-4eb7-9e3c-29e544544a5c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODA2MjI2NzIsIm5iZiI6MTc4MDYyMjM3MiwicGF0aCI6Ii8zMjcxODM5MC82MDMxNjI5NDItNWFkMWJkYzYtYmQyNy00ZWI3LTllM2MtMjllNTQ0NTQ0YTVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjA1VDAxMTkzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ2NzI4YTIxZjExYjU4NDc3ZDU0NGZhM2ZhODhiZTA0ZWViOWExYTA2OTZlYzMwZGIwZjY2MzM4MTAxNjU3NTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.eh5ZWZXPsSekuafbGqLHnBDCuckrOu7KS485U-2eHZk">

You're my lifesaver. Thanks!

asiashutoku · 1 month ago
FWIW, switching models to compact does continue to work for me.

@murveit How do I do this? When I write /compact, it doesn't find any command. For /model sonnet it doesn't work neither. For both I get a message Unknown skill: ….

I'm frustrated – I pay for Pro and I can't use what was promised. Anthropic will you be giving a refund because of this error???

CCSNH-NicolePhillips · 1 month ago
> FWIW, switching models to compact does continue to work for me. @murveit How do I do this? When I write /compact, it doesn't find any command. For /model sonnet it doesn't work neither. For both I get a message Unknown skill: …. I'm frustrated – I pay for Pro and I can't use what was promised. Anthropic will you be giving a refund because of this error???

Are you using the Claude extension or copilot?

murveit · 1 month ago

I am running Claude Code on the terminal (via the CLI).

TheBlueCubeDev · 1 month ago

Hitting this on the macOS desktop app's code panel, Pro plan — same silent
1M-context behavior, with a billing twist worth adding.

Setup: Pro plan, Sonnet 4.6 selected as the model, using the embedded code
panel in the Claude desktop app for Mac (not the standalone terminal CLI).

What happened:

  • With Usage Credits enabled, Sonnet 4.6 silently ran in 1M context. There

was no "(1M context)" label anywhere — /model and the statusline looked
normal. Only /context revealed the real window.

  • Because Sonnet's 1M tier draws from Usage Credits on Pro, my credits were

silently drained to $0 before I realized 1M was even active. My plan
allowance was nearly untouched (~3%) the whole time.

  • Disabling Usage Credits dropped the window back to 200K — but my live

context was already at ~550K. With no credits left I couldn't /compact
(compaction needs a model call), so my only escape was /clear, losing the
entire session.

The core problem from a user's view: there's no way to disable 1M context
before credits are exhausted. Running out of money is effectively the only
brake, and by then you're stuck above 200K with no compaction path.

Workaround that fixed it (per #30033): adding
{ "env": { "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" } } to ~/.claude/settings.json
pins the window to 200K regardless of credit status.

Requests:

  1. Make 1M context opt-in, not a silent default — especially on Pro where it

bills against Usage Credits.

  1. Show a visible "(1M context)" indicator whenever it's active.
  2. Add a discoverable in-app/settings toggle (the env var works but isn't

findable by normal users).

  1. Don't let a session get trapped above the 200K ceiling with no way to

compact down.

Environment: Pro plan, macOS desktop app (code panel), Sonnet 4.6.

kwunder · 1 month ago

Same issue here: macOS, Claude Code Desktop App on OSX, Max plan, latest version.

New sessions fail immediately with the 1M context error — first prompt sent, zero context accumulated. The model picker shows "Sonnet 4.6 · Standard" (200k) as selected; there is no separate non-1M Sonnet option available in the Desktop App.

The error fires before any model flag or context can be processed. Enabling usage credits is not an acceptable workaround — the standard 200k model should not require them.

This makes Sonnet model in Claude Code Desktop completely unusable on the Max plan without opting into usage credits.

ScarletThe4EyedCuda · 1 month ago

Ok, I got tired of waiting for an answer. I looked at the change logs and there a few mentions of the 1M contexts, but mostly not really relevant. So I upgraded to 2.1.174 and used that for 2 days and then I saw a report that 2.1.177 was working so I tried that for the past 2 days and I see to be working again. I'm just using PowerShell so nothing fancy here. My settings.json file is here as well and again nothing fancy.

YMMV

{
"env": {
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
},
"autoUpdatesChannel": "latest",
"theme": "dark"
}

axelroesslercoaching-rgb · 24 days ago

Still reproducible on 2026-06-22 — Claude Code in Mac Desktop App, automatic compaction trigger, CLAUDE_CODE_DISABLE_1M_CONTEXT=1 ignored

Reporting a new occurrence that adds two details not yet covered in this thread:
New surface: The error occurs inside Claude Code running within the Claude Desktop App (Mac) — not the VS Code extension, not the terminal CLI.

Trigger: The error fires during automatic chat compaction (when the session gets long), not at session start and not via /compact. I did not request compaction manually.

CLAUDE_CODE_DISABLE_1M_CONTEXT=1 is set and being ignored. My ~/.claude/settings.json contains:
json"env": {
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
}

Despite this, the automatic compaction process still attempts to switch to 1M context and fails with the same error. The env variable specifically intended to prevent this is being ignored at compaction time.
Environment:

OS: macOS (Apple Silicon)
Surface: Claude Code in Claude Desktop App (built-in)
Plan: Pro
Task: Normal chat/document workflow (no Playwright, no large files)

mheins57 · 19 days ago

Same issue, with one additional detail: a long compact near session start.

Plan: Pro
Interface: Claude Code CLI (terminal), not desktop app
Context: Brand new project directory, ~8KB total across 5 small files (README, a shell script, a JSON config, two short Python hook scripts). No large seed documents.

What happened:

Opened a fresh Claude Code session in this recently created directory. After a relatively short conversation, it ran a compact operation lasting 2–3 minutes.
Then shortly afterward, failed with:

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context
Ran /model to try switching off 1M context per the suggested fix. The picker showed only: Default (Sonnet 4.6), Sonnet, Opus, Haiku, Fable (disabled) — no [1m] variant appeared anywhere in the list, so there was nothing to deselect.

This suggests the 1M context selection is happening somewhere not exposed in the /model picker at all, and that it can be triggered on a session with negligible file content and no prior conversation — the unprompted multi-minute compact on a near-empty project is what tipped me off that something unusual was happening before I'd even sent a message.

My claude code version is 2.1.195 (Claude Code). I've included a session transcript below.

2026-06-27-110358-this-session-is-being-continued-from-a-previous-c.txt