AI Codex
Foundation Models & LLMs

Context Window

Also: context length, token limit

The context window is how much text Claude can hold in its attention at once — your conversation history, any documents you've shared, system instructions, and Claude's own responses. Once you hit the limit, older content gets pushed out. Claude 3.7 Sonnet has a 200,000-token context window, which is roughly 150,000 words. Long contexts let Claude analyse full documents or maintain long conversations — but they also cost more and can sometimes cause Claude to lose focus on earlier material.

In practice

You paste a 200-page document into Claude and it reads the whole thing. You paste a 1,000-page document and it can only see part of it. The context window is the maximum amount of text Claude can hold in mind at once — everything in one conversation. Longer context windows mean Claude can work with bigger documents and longer conversations without forgetting earlier parts.

Related concepts

Where Context Window shows up

5 articles

The context window shapes what Claude can and can't do in any given conversation. Here is how to work with it.

Implementation guide·The context window in practice: what it means for how you work·5 min

Persistent memory for chatbots is not a Claude feature — it is an architecture decision. Here is how to build it correctly.

Implementation guide·Building a Claude chatbot that remembers users across sessions·8 min

In-memory arrays disappear on page reload. How to persist conversation history to Supabase, load it back on session resume, and prune context intelligently.

Implementation guide·Database-backed conversation history with Supabase and Claude·8 min

200,000 tokens sounds enormous. In practice, how you use that space changes everything about the quality of your outputs.

Role-Specific·How to think about Claude's context window (and when it actually matters)·4 min

Context window is the single number that shapes everything about how Claude thinks with you — and most people are using only a fraction of it.

Core Definition·The whiteboard every AI conversation shares·5 min