HeyMark
Content

Blog

What is a context window in AI, and what happens when it fills up?

9 min read

A context window is all the text an AI model can have in view while it generates a response, including that response itself. In a chat with Claude or ChatGPT, that covers your messages, the earlier replies, the files you attached, the instructions and the tools you have connected. It has a maximum size. When a conversation gets close to that limit, depending on the product, the assistant either summarizes the earlier part so it can keep going, or tells you the conversation is full and offers to continue in a new one. And well before the limit, it can already start making worse use of what it has.

An example: December’s calendar in a single conversation

Fictional example. Paula runs social media for Masa Madre, a neighborhood bakery. On Monday she opens a conversation with her AI assistant to plan December’s content, and she keeps it going all week:

  • At the start she attaches the brand guidelines as a PDF and November’s metrics export as a CSV.
  • She has her team’s calendar and file folder connected.
  • She asks for 30 post ideas.
  • On Tuesday, with the ideas approved, she writes down her rules: “no emojis, and the Christmas bread 2-for-1 is Tuesdays only.”
  • Then she asks for the copy, then three versions of every long caption, and edits them one by one.

On Thursday she asks for the final copy for Christmas week. Two captions come back with emojis, and one announces the 2-for-1 “all weekend long.” The rules are still there in Tuesday’s message, but they now sit in the middle of a huge amount of text. Further down you’ll see why that can happen even though the assistant “has” the whole conversation.

This is what was taking up room in Paula’s context window:

What takes up space In Paula’s conversation What the documentation says
Each of her messages The rules, the requests, the edits The whole history counts, plus the current message
Each assistant reply The 30 ideas, the copy and every discarded version Replies count, including the one being written
Attached files The PDF guidelines and the metrics CSV Images and documents count like the rest of the message
Connected tools The calendar and folder tools, even when she isn’t using them in a given message Tool definitions count, and so does what the tools return
The model’s reasoning If the model “thinks” before answering In Claude, reasoning counts; whether earlier reasoning blocks are kept depends on the model

The right-hand column summarizes Claude’s documentation on context windows and OpenAI’s on conversation state, both checked on December 1, 2026. The heaviest item in the example is the discarded versions: Paula no longer uses them, but they’re still there.

What a context window is, exactly

Anthropic, the company that develops Claude, defines it in its documentation as “all the text a language model can reference when generating a response, including the response itself.” It points out that this is separate from the data the model was trained on: it works as the model’s “working memory.” OpenAI describes it as the maximum number of tokens that can be used in a single request, adding up input, output and, for some models, reasoning tokens.

A token is the unit the model splits text into. OpenAI’s help article on tokens gives a rough rule for English: 100 tokens are about 75 words. In other languages the ratio between characters, words and tokens changes, and the article gives no figure for Spanish. How they are counted and billed is covered in what tokens are in AI.

The size depends on the model and the product. On December 1, 2026, Claude’s documentation listed models with 1-million-token windows and said the rest have 200,000. In the Claude app, the size depends on the model and where you use it (chat, Claude Code or Cowork), and in some cases on your plan, according to the help article on context window size on paid plans. These numbers change with every new model: check the current table for the one you use.

Why the space is limited

Anthropic explains it in its post “Effective context engineering for AI agents” (September 29, 2025): in the architecture these models use, every token can relate to every other token, so n tokens produce n² relationships. With more text, the model’s attention gets spread across far more relationships. That’s why the post suggests treating context as a finite resource with diminishing returns.

What happens when the context window is full

It depends on the product. Here is what Claude and ChatGPT document today.

In Claude. The help article on usage and length limits explains that when a conversation approaches the limit, Claude summarizes earlier messages so it can keep going. The full chat history is preserved, and Claude can still refer to it after the summary. While this happens, you may sometimes see Claude “organizing its thoughts.” There’s one requirement: code execution has to be turned on (the help article on the context window in paid plans describes it for those plans). Even so, in rare cases (such as a very large first message) you can still hit the limit. And long conversations that trigger this summarizing use up more of your usage limit. The same article notes that part of the window is always reserved for Claude’s reply.

In ChatGPT. According to OpenAI’s help article on the “conversation full” notices, on the Free plan you may see “Context window full” or “Chat memory full” when a conversation fills up, even when you reopen a chat without having seen any earlier warning. Both your messages and ChatGPT’s replies take up space, and deleting saved memories doesn’t free up room in the chat. If you see “You’ve reached the maximum length for this conversation,” you can branch the conversation from an earlier reply on the web. You can also start a new chat; if the notice offers a summary, you can use it to continue, but the article warns that it may leave out details.

If you work with the API. In Claude, if the input alone already exceeds the window, the API returns an error (“prompt is too long”). If the reply hits the limit while it’s being generated, Claude 4.5 models and later stop with the reason model_context_window_exceeded. For long conversations, the documentation recommends server-side compaction, which automatically summarizes earlier parts (in beta for Claude 4.6 and later models). OpenAI’s documentation warns that tokens beyond the limit may be truncated in the response.

A summary isn't the same as remembering

A summary, whether automatic or written by you, keeps what the summary chose to keep. Paula’s “Tuesdays only” is exactly the kind of small detail that can get lost. If something is a rule, restate it when you ask for the final copy.

Why a bigger context window isn’t always better

Claude’s documentation says it plainly: a larger window lets the model handle longer, more complex prompts, but more context isn’t automatically better. As the token count grows, accuracy and recall degrade. It calls this context rot, and concludes that curating what’s in the context matters just as much as how much space is available.

An academic study describes one specific form of the problem. In “Lost in the Middle: How Language Models Use Long Contexts” (Liu et al., 2023, accepted in Transactions of the Association for Computational Linguistics), the authors tested language models on questions whose answer sat somewhere in a long text. Performance was typically best when the relevant information was at the beginning or the end, and dropped when it was in the middle, even for models built for long contexts. The models in the study are from 2023, and current ones may behave differently, but Claude’s documentation today still warns that accuracy falls as length grows.

That explains Paula’s Thursday (our inference): her rules didn’t disappear, but they ended up buried under dozens of caption versions, and the model gave them less weight. When a model is missing a fact or loses sight of it, it fills the gap with something plausible, which is how many AI hallucinations in brand content start.

What to do in practice

These are our recommendations, based on the sources above:

  1. One conversation per job. Planning the month, writing this week’s copy and answering a complaint are different conversations. When you close one, ask the assistant for a summary of what was decided, check it yourself (a summary can leave out details) and paste it at the start of the next one.
  2. Put what repeats in a fixed place. Your brand guidelines and promo rules shouldn’t depend on a message from days ago. In Claude, the help article recommends using Projects, which load only the relevant content into the window through RAG, the technique that searches your documents before answering, keeping project instructions short and removing files you no longer use.
  3. Attach what you’ll actually use. If you only need November’s reel reach, a CSV with those columns takes less room than the full export.
  4. Disconnect what this conversation doesn’t need. Claude’s help article says tools and connectors are token-intensive and suggests turning them off when you don’t need them.
  5. Rules at the end, too. If a rule is critical, restate it in the same message where you ask for the final copy, and check prices, dates and conditions before you post.
  6. If the notice appears, don’t keep pushing in the same conversation. Branch from an earlier reply, or start a new one with your checked summary.

HeyMark and the context window

You can use HeyMark from Claude or ChatGPT through MCP: the assistant looks up your calendar, your inbox and your analytics when you ask, and leaves the work ready in HeyMark, instead of you pasting exports into the chat. Like any connector, its tools also take up room in the conversation, so point 4 applies: turn it on where you’ll use it. What your assistant can do with it is on HeyMark’s MCP page, and what an MCP server is, in what MCP in AI is and what it’s for.

Plan your next post in HeyMark.

Keep the idea, review the draft with your team, and see how it performed in the accounts you connected.