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

Resolved 💬 11 comments Opened Aug 15, 2025 by gaiar 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 ↗

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