Feature: Long-context (≈1M) support for Claude Sonnet 4 in Claude Code
Summary
Please add first-class support in Claude Code (CLI / IDE integrations) for Claude Sonnet 4’s 1M-token context window and expose a way to pass Anthropic beta headers—specifically context-1m-2025-08-07. This would let the tool operate on entire repos / large docs without manual chunking. – Anthropic docs: 1M context + required beta header. Anthropic
– Availability: Anthropic API + Amazon Bedrock (Vertex AI “coming soon”). Anthropic
Problem
There isn’t a straightforward, tool-level way to enable long-context when it’s available on the account/provider. Whole-repo refactors and cross-file reasoning require dropping down to raw API calls or ad-hoc configs.
Proposal
- Provide a simple toggle/setting to enable long-context mode when supported by the account/provider.
- Abstract provider-specific opt-ins behind Claude Code’s config/UI.
- Document expected limits, pricing/rate-limit considerations, and failure modes.
- Gracefully handle ineligible accounts with clear, actionable messaging instead of hard errors.
- Optional: when prompts approach the default context, nudge users to enable long-context (non-blocking).
Why this helps
Enables whole-repo operations, large-scale refactors, and multi-doc synthesis—the core Claude Code use cases—without extra glue code.
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5644
- https://github.com/anthropics/claude-code/issues/5628
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Found 2 possible duplicate issues:
- Feature Request: Enable 1M Context Window for Claude Code #5644
- Feature Request: 1M Context with Max Plans in CC #5628
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
I need implementation for AWS Bedrock as well
gaiar the just updated to 1M tokens for sonnet earlier this week
I don't get what you mean - I see updates for native Anthropic API usage, but I don't see way how to use it using AWS Bedrock.
Anthropic have not made enough money on the double price of api usage on 1M model
Now is the time to support this feature:
3 - Claude Sonnet 4.5 supports a 1M token context window when using the
context-1m-2025-08-07beta header. Long context pricing applies to requests exceeding 200K tokens.
Would love to have 1M context on Claude Web too for projects!
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Any updates?
upvote