[BUG] **Bug: VS Code extension forces 1M context on Pro plan — CLAUDE_CODE_DISABLE_1M_CONTEXT has no effect**
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?
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-20250514in settings.json → no effectterminal.integrated.env.windows: { CLAUDE_CODE_DISABLE_1M_CONTEXT: 1 }→ no effect[Environment]::SetEnvironmentVariable("CLAUDE_CODE_DISABLE_1M_CONTEXT", "1", "User")at system level → no effectclaudeCode.environmentVariables: [{name: CLAUDE_CODE_DISABLE_1M_CONTEXT, value: 1}]→ no effect- Full PC restart after each attempt → no effect
claude auth statusconfirms 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
- Login with Claude Pro account (claude.ai, firstParty)
- Open a PHP project in VS Code
- Open Claude Code panel (graphical, not terminal)
- 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_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗