[BUG] /context command shows /200k instead of /1M on Windows CLI when using Opus 4.6/4.7

Resolved 💬 3 comments Opened May 7, 2026 by Rmathis42 Closed May 11, 2026

Preflight Checklist

  • [x] I have searched existing issues — found a similar one for VS Code (#36757) but this is platform:windows + CLI, not VS Code
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Running /context in the Windows native CLI (PowerShell / Git Bash) on Opus 4.6 (and Opus 4.7) shows the total context cap as 200k tokens, not the actual 1M token context window the model supports.

Example output from /context:

Tokens: 120.9k / 200k (60%)

This is misleading because:

  1. The actual model context window is 1M tokens
  2. The "Free space" and "Autocompact buffer" percentages are calculated against the 200k display ceiling, so they trigger / appear far earlier than they should
  3. Users see "60% used" when actually at ~12% of the real context window

What Should Happen?

/context should display the model's actual context window — / 1M for Opus 4.6 and 4.7 — and the autocompact buffer / free space should be calculated against that.

Steps to Reproduce

  1. Use Claude Code CLI on Windows (native, no WSL) — Git Bash or PowerShell
  2. Select model Opus 4.6 or Opus 4.7 (1M context) (default) via /model
  3. Run /context
  4. Observe total shown as / 200k instead of / 1M

Environment

  • OS: Windows 11 Home 10.0.26200
  • Shell: Git Bash + PowerShell
  • Claude Code: latest (CLI, native install)
  • Model: Opus 4.6 / Opus 4.7 (1M context) (default)
  • IDE: None (terminal CLI, not VS Code)

Related

  • #36757 — same symptom in VS Code extension (different platform)
  • #36014 — autocompact triggers early on 1M model (related root cause: effectiveWindow capped at 200k)

Claude Model

Opus

Is this a regression?

Unknown — first time noticing on a long V8 development session.

View original on GitHub ↗

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