[Bug] Sonnet 5 incorrectly limited to 200K context instead of native 1M window
Status Open
Reported on v2.1.222
Maintainer reply None cached
Activity 1 comment · opened Aug 5, 2026
Bug Description
Title: Sonnet 5 is incorrectly limited to 200K context on a Claude subscription
Claude Code is treating Claude Sonnet 5 as a 200K-context model instead of using its native 1M context window.
Environment:
- Claude Code: v2.1.222
- Commit: fbf49312c284
- Installation: npm-global
- Platform: darwin-arm64
- Authentication: Claude subscription, not API
- Opus 5 with 1M context works correctly on the same account
Steps to reproduce:
- Start a completely new Claude Code session:
claude --model claude-sonnet-5
- Run
/context.
Actual result:/context reports:
- Model: Sonnet 5
- Model ID:
claude-sonnet-5 - Context window:
42.2k/200k tokens
Expected result:
Sonnet 5 should use its native 1M context window, approximately 967K usable tokens in Claude Code, without requiring a [1m] suffix or usage credits.
Additional findings:
- The issue reproduces in a fresh session launched from
/tmp. CLAUDE_CODE_DISABLE_1M_CONTEXTis not set.DISABLE_AUTO_COMPACT,DISABLE_COMPACT,CLAUDE_CODE_MAX_CONTEXT_TOKENS,CLAUDE_CODE_AUTO_COMPACT_WINDOW,ANTHROPIC_BASE_URL,ANTHROPIC_MODEL, andANTHROPIC_DEFAULT_SONNET_MODELare all unset.claude doctorreports no installation issues./model sonnetcorrectly resolves to Sonnet 5./model sonnet[1m]incorrectly returns: “Sonnet with 1M context is not available for your account.”- This is not only a display issue. The session actually stops with
Context limit reachedwhen approaching the reported 200K limit. - Opus 5 with 1M context works normally on the same subscription and installation.
It appears that Sonnet 5 is being evaluated using the legacy Sonnet extended-context entitlement path instead of being recognized as a native 1M-context model.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.222
- Feedback ID: 42913dd8-4da2-4128-bca0-1b0d2a1770aa
Errors
[]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗