Claude Sonnet 4 now supports 1M tokens of context
TL;DR Highlight
Sonnet 4 context grows 5x to 1M tokens, with higher pricing above 200K
Who Should Read
A backend developer using the Claude API for large codebase analysis or long-running agents who worries about context limits and cost
Core Mechanics
- Context window is 5x larger
- Sonnet 4 now supports up to 1M tokens of context.
- You can fit a codebase of over 75,000 lines or dozens of research papers in one request.
- It's a public beta with conditions
- On the Claude Developer Platform it opens first to Tier 4 and custom rate limit customers.
- Broader availability rolls out over the coming weeks.
- It is also available on Amazon Bedrock and Google Cloud Vertex AI.
- Pricing changes above 200K tokens
- Prompts up to 200K cost $3 input and $15 output per million tokens.
- Prompts over 200K cost $6 input and $22.50 output per million tokens.
- Cost-saving options exist
- Prompt caching (reusing a stored, repeated prompt prefix) reduces latency and cost.
- Combining the 1M context with batch processing saves an additional 50%.
- Three use cases are highlighted
- Large-scale code analysis loads source, tests, and docs together.
- Document synthesis covers contracts, papers, and technical specs.
- Context-aware agents keep coherence across hundreds of tool calls.
Community Reactions
- Opinion that price is the key
- Some said that even if you can load a whole codebase, the higher price means you should still manage context.
- Without evals on how well the model stays on track, the value is unclear.
- Opinion that longer context means more distraction
- One commenter said more context makes the LLM easier to distract and lowers output quality.
- They worry about Claude Code in auto mode running right up to auto compact.
- Experience doubting actual recall
- One user said even the existing 200K window forgot earlier content before reaching 32K.
- They said you need to verify the 1M claim yourself.
- Another believed Gemini's 1M recall is better.
- Claude Code tips and settings
- One tip: double escape rewinds to a context-filled checkpoint without respending those tokens.
- A commenter said you can enable it in Claude Code with ANTHROPIC_BETAS="context-1m-2025-08-07" claude.
- Another pointed out Tier 4's 500K tokens/min rate limit makes this usable by few people.
How to Apply
- Run a bug-check prompt on your current diff
- Load today's branch diff and related files into context.
- Paste the codeExample prompt and ask for bugs and correctness issues.
- Recalculate cost around the 200K boundary
- Pull average input token counts from your logs.
- Apply $6 input and $22.50 output to the share above 200K and recompute monthly cost.
- Design caching and batch together
- Mark the repeated prefix such as codebase or docs for prompt caching.
- Run analyses that don't need real-time answers as batch to aim for the 50% savings.
- Compare full-context against RAG on the same questions
- Run 20 identical questions through full-context loading and your current RAG.
- Compare accuracy and cost to decide which to use.
Try It
# Paste into Claude or Claude Code (after loading the diff and related files into context)
Check the changes (diff) below for bugs.
[diff]
{{diff}}
Request:
1. Prioritize subtle bugs that would cost hours of time or deployments later.
2. For each item, give the file name, why it's a problem, and a suggested fix.
3. Also point out extra things to think through for correctness.
4. Mark anything you're unsure about as 'uncertain'.Terminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls