[BUG] Bug Report: 1M Context Model Option Enforces 200K Token Limit

Resolved 💬 10 comments Opened Nov 8, 2025 by CTGS-Innovations Closed Jan 19, 2026

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?

Bug Report: 1M Context Model Option Enforces 200K Token Limit

Environment:

  • Claude Code version: 2.0.36 (Claude Code)
  • Model: claude-sonnet-4-5-20250929[1m]
  • Model selection: "Sonnet (1M context)"
  • Platform: Linux 6.14.0-35-generic

Description:
When selecting "Sonnet (1M context)" from the model selector, the UI displays a 1M token context window (68k/1000k tokens (7%)), but the API enforces a hard 200K token limit and rejects requests that exceed it.

Steps to Reproduce:

  1. Run model selector and choose option 3: "Sonnet (1M context) - Sonnet 4.5 with 1M context"
  2. Use /context to verify - shows claude-sonnet-4-5-20250929[1m] · XXk/1000k tokens
  3. Allow conversation/context to grow beyond 200K tokens (e.g., ~206K)
  4. Attempt to send a message

Expected Behavior:
The model should accept prompts up to 1M tokens as indicated by:

  • The model selection option name: "Sonnet (1M context)"
  • The context display: /1000k tokens

Actual Behavior:
API rejects the request with:
Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 206338 tokens > 200000 maximum"},"request_id":"req_011CUwB2KCE6mNwK9CsDbh13"}

Impact:
The 1M context option is misleading - users believe they have 1M tokens available but are limited to 200K. This causes unexpected failures and confusion.

Possible Root Causes:

  1. Claude Code not properly passing the 1M context parameter to the API
  2. API endpoint doesn't support 1M despite UI option
  3. Parameter mismatch between client configuration and API enforcement

What Should Happen?

What Should Happen:

  • I selected 1M context, so I should get 1M context up to the model's actual limit
  • /context should display the real maximum (e.g., XXk/200k tokens if that's the actual limit)
  • If the API can't support 1M, don't offer it as an option or clearly indicate it's not available yet
  • I should never see a 400 error because the context tracking is lying to me about available space

Error Messages/Logs

API rejects the request with:
Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 206338 tokens > 200000 maximum"},"request_id":"req_011CUwB2KCE6mNwK9CsDbh13"}

Steps to Reproduce

Just exceed the 200k context when and you get Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 206338 tokens > 200000 maximum"},"request_id":"req_011CUwB2KCE6mNwK9CsDbh13"}

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.36 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Cursor

Additional Information

_No response_

View original on GitHub ↗

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