Selected model (Sonnet) not applied to session — /context shows Opus 1M, causing 200k overflow errors

Resolved 💬 2 comments Opened Jun 5, 2026 by tkawamura0617 Closed Jun 8, 2026

Bug Description

On the VSCode extension (Max 20x plan), the selected model is not applied to the session.

Symptom 1 — Selected model vs. actual model mismatch
Model picker shows standard Sonnet (claude-sonnet-4-6) selected, and /status confirms "Using Sonnet 4.6 (from .claude/settings.json)". However, /context reports the session running as claude-opus-4-8 with a 1.0M token window. Reproduced across multiple separate sessions.

Symptom 2 — Auto-compact does not work in 200k standard context
With Sonnet selected, once context exceeds 200k the session stops with "API Error: Usage credits required for 1M context". Auto-compact does not fire proactively. Manual /compact does not bring it under 200k — after compaction, Messages still shows 243.5k (121.8%). Switching to Opus allows continuation, but Sonnet cannot continue. Likely related to #48893.

Symptom 3 — /context token display inconsistent with breakdown
The /context header shows "0 / 200.0k tokens (0%)" while the category breakdown sums to well over 100k (e.g. Messages alone exceeding the window). Header value does not match the breakdown. Likely related to #50204.

Impact
Users intending to run on Sonnet unknowingly incur Opus-level consumption. The weekly limit dashboard shows a gap between "All models" (69%) and "Sonnet only" (56%), confirming non-Sonnet usage despite Sonnet being selected.

Steps to Reproduce

  1. Set "model": "claude-sonnet-4-6" in ~/.claude/settings.json
  2. Open VSCode extension, confirm Sonnet selected via /status
  3. Run a long session; observe /context reporting claude-opus-4-8 / 1.0M
  4. When context exceeds 200k, session stops with the 1M usage-credits error

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.1.163
  • Feedback ID: 86aae84f-3572-4939-a36c-39442ed25781

Errors

[]

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗