# Claude Sonnet 4 now supports a 1 million token context window

Anthropic says the larger window can handle full codebases, long documents and more demanding agent workflows.

Anthropic says Claude Sonnet 4 now supports up to 1 million tokens of context, a fivefold increase that changes what the model can do in a single request. The company says the longer window is available on the Anthropic API and can also be used through Amazon Bedrock and Google Cloud’s Vertex AI. For developers, the key implication is simple: tasks that once had to be broken into multiple calls can now stay in one coherent session.

That matters most when the work is large and structurally connected. Anthropic says the expanded context can handle entire codebases, extensive document sets and agents that need to maintain coherence across hundreds of tool calls. In practice, that means a model can keep more source files, more instructions and more intermediate results in mind without losing the thread. For software teams, that could reduce the amount of prompt slicing and glue code needed to coordinate long analysis jobs.

The company is also making the point in familiar developer terms. It says the longer context can handle codebases with more than 75,000 lines or dozens of research papers in a single request. Those examples matter because they make the scale concrete. A 1 million token window is not just a larger number; it is enough room to change how an assistant is used for audits, synthesis and agentic work that depends on seeing the whole picture.

There is a cost side to that expansion, and Anthropic says pricing adjusts for prompts over 200,000 tokens because of the extra compute required. That detail is important because long context is not just a feature toggle. It is a resource trade-off, and the economics still matter when teams are deciding whether to feed a model a huge corpus or split the workload across smaller requests. Anthropic also points to prompt caching as a way to reduce latency and cost for long-context use.

The public beta framing is also notable. Long context support is now in public beta on the Claude Developer Platform, which suggests Anthropic wants developers to start treating it as a production-capable capability rather than a lab demo. That is especially relevant for teams building coding assistants, research tools or document analyzers, because those are the workflows most likely to benefit from having the full source material available at once.

The larger strategic point is that model makers are competing on more than benchmark scores. Context length is becoming a practical differentiator because it changes the shape of real tasks. A model that can hold an entire repository, multiple policy documents or a large batch of transcripts is more useful in settings where recall and continuity matter. Anthropic is clearly betting that larger context windows will unlock those use cases.

For users, the takeaway is straightforward. Claude Sonnet 4 can now look at much more material before it has to summarize, compress or forget parts of the input. That will not make every workflow better, and the pricing details mean the feature will not be equally cheap for everyone, but it does expand the design space for AI tools that need to work across large bodies of text.