[BUG] Opus 4.7 [1M]: /context shows 200k denominator instead of 1M on Max plan.
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?
Description
When running Claude Code with Opus 4.7 in the explicit 1M context variant
(claude-opus-4-7[1m]), the /context command shows the total context
budget as 200k instead of 1M. The top of the /context output
correctly identifies the model as "Opus 4.7 (1M context)" and the model ID
as claude-opus-4-7[1m], but the token counter underneath reads28.8k/200k tokens (14%).
This looks like a UI display bug in /context — the denominator appears
hardcoded to 200k and doesn't reflect the actual 1M context window of the
pinned model. Same class of bug previously reported for Opus 4.6 in #34143.
Environment
- Claude Code version: 2.1.112
- Model:
claude-opus-4-7[1m] - Plan: Claude Max
- Effort: xhigh
- OS: macOS (Apple Silicon)
- Shell: zsh (oh-my-zsh)
- Node version manager: asdf
Configuration
# ~/.zshrc
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7[1m]'
Steps to reproduce
- On a Claude Max plan, set
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7[1m]' - Start a fresh Claude Code session:
claude --dangerously-skip-permissions - Run
/context
Expected
/context should show the denominator as 1M (or 1000k) since the model
was explicitly pinned to the 1M variant and the Claude Max plan includes
1M context for Opus 4.7 per the support docs.
Actual
/context reports 28.8k/200k tokens (14%) despite the model line
explicitly stating "Opus 4.7 (1M context)".
Screenshot
<img width="529" height="372" alt="Image" src="https://github.com/user-attachments/assets/8da907ea-c90d-493c-9d6a-6b4d6919099f" />
Related
- #34143 — same symptom for Opus 4.6 on v2.1.75
Impact
Low-severity cosmetic bug — the actual request capacity appears to work
correctly (needs independent verification that the 1M limit is actually
enforced at the API layer), but the /context meter is misleading and
makes it hard for users to gauge how much headroom they have on large
codebases or long sessions.
What Should Happen?
On Claude Max with Opus 4.7, I pinned the 1M-context variant via:
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7[1m]'
The /context command confirms the model is loaded correctly — the top line reads "Opus 4.7 (1M context)" and "claude-opus-4-7[1m]". However, the token meter directly underneath shows "28.8k/200k tokens (14%)" — the denominator is stuck at 200k instead of 1M.
Error Messages/Logs
The `/context` denominator should read "1M" (or "1000k") when the model is the pinned 1M variant (`claude-opus-4-7[1m]`), matching the "(1M context)" label shown on the model line above it.
On a Max plan with this env var set, the full 1M context window should be reflected in the meter so users can correctly gauge remaining headroom on large codebases or long sessions.
Steps to Reproduce
- Be on a Claude Max plan (also reportedly affects Team/Enterprise).
- Add to ~/.zshrc:
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-7[1m]'
- Reload shell: source ~/.zshrc
- Start Claude Code: claude --dangerously-skip-permissions
- Verify model pinned correctly: top of
/contextoutput reads "Opus 4.7 (1M context)" and "claude-opus-4-7[1m]". - Observe the token counter line directly below: "28.8k/200k tokens (14%)" — denominator is 200k instead of 1M.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.112
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗