Feature: Long-context (≈1M) support for Claude Sonnet 4 in Claude Code

Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Aug 15, 2025 · closed Jan 18, 2026

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.

View original on GitHub ↗

11 Comments

github-actions[bot] · 1 year ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5644
  2. 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

gaiar · 1 year ago
Found 2 possible duplicate issues: 1. Feature Request: Enable 1M Context Window for Claude Code #5644 2. 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 · 1 year ago
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.

Adamcf123 · 1 year ago

Anthropic have not made enough money on the double price of api usage on 1M model

behrangsa · 10 months ago

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-07 beta header. Long context pricing applies to requests exceeding 200K tokens.

---

  • Source: <https://docs.claude.com/en/docs/about-claude/models/overview>
christianvuye · 9 months ago

Would love to have 1M context on Claude Web too for projects!

github-actions[bot] · 8 months ago

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.

MikeFeith · 8 months ago

Any updates?

andriihrachov · 8 months ago

upvote

github-actions[bot] · 7 months ago

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.

github-actions[bot] · 7 months ago

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.