Claude Sonnet 4 has been upgraded, and it can now remember up to 1 million tokens of context, but only when it's used via API. This could change in the future.

This is 5x more than the previous limit. It also means that Claude now supports remembering over 75,000 lines of code, or even hundreds of documents in a single session.

Previously, you were required to submit details to Claude in small chunks, but that also meant Claude would forget the context as it hit the limit. With up to a 1 million context limit, you can build better apps, and Claude can remember more of your code than ever.

It is worth noting that the 1 million context limit is limited to Sonnet 4. Opus 4.1 still has the old limitations because it's an expensive model.

Only API gets 1 million tokens context limit

The ne

See Full Page