Skip to content

[Bug] Sonnet 5 incorrectly limited to 200K context instead of native 1M window #84310

Description

@amo-llc

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:

  1. Start a completely new Claude Code session:
    claude --model claude-sonnet-5
  2. 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_CONTEXT is not set.
  • DISABLE_AUTO_COMPACT, DISABLE_COMPACT, CLAUDE_CODE_MAX_CONTEXT_TOKENS, CLAUDE_CODE_AUTO_COMPACT_WINDOW, ANTHROPIC_BASE_URL, ANTHROPIC_MODEL, and ANTHROPIC_DEFAULT_SONNET_MODEL are all unset.
  • claude doctor reports no installation issues.
  • /model sonnet correctly 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 reached when 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

[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions