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.
11 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I need implementation for AWS Bedrock as well
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:
---
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
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.