claude-code - 💡(How to fix) Fix [BUG] **Bug: VS Code extension forces 1M context on Pro plan — CLAUDE_CODE_DISABLE_1M_CONTEXT has no effect**

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

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

Code Example

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

---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Bug: VS Code extension forces 1M context on Pro plan with no way to disable it

Environment

  • OS: Windows 11
  • Claude Code version: 2.1.158
  • VS Code extension: Claude Code for VS Code (latest)
  • Plan: Claude Pro ($20/month)
  • Login method: claude.ai (firstParty)

Description The VS Code extension systematically triggers the 1M context window, which is not included in the Pro plan. This results in a permanent error:

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

The extension is completely unusable as a result.

What I tried

  • claudeCode.modelId: claude-sonnet-4-20250514 in settings.json → no effect
  • terminal.integrated.env.windows: { CLAUDE_CODE_DISABLE_1M_CONTEXT: 1 } → no effect
  • [Environment]::SetEnvironmentVariable("CLAUDE_CODE_DISABLE_1M_CONTEXT", "1", "User") at system level → no effect
  • claudeCode.environmentVariables: [{name: CLAUDE_CODE_DISABLE_1M_CONTEXT, value: 1}] → no effect
  • Full PC restart after each attempt → no effect
  • claude auth status confirms correct Pro account login, no API key set

What works Launching claude --model sonnet from the integrated terminal works fine. The problem is specific to the graphical VS Code extension panel.

Expected behavior The extension should default to standard 200k context on Pro plan, or provide a working UI option to select it.

Related issues

  • #39401 — model picker only shows 1M variants
  • #30033 — silent 1M default causing billing issues

What Should Happen?

Claude devrait fonctionner

Error Messages/Logs

Steps to Reproduce

  1. Login with Claude Pro account (claude.ai, firstParty)
  2. Open a PHP project in VS Code
  3. Open Claude Code panel (graphical, not terminal)
  4. Send any message

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.158

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] **Bug: VS Code extension forces 1M context on Pro plan — CLAUDE_CODE_DISABLE_1M_CONTEXT has no effect**