85 agentic tools audited for security incidents · Talk to the lab →
MotionticBook a call
Glossary

What is a context window?

A context window is the maximum number of tokens a language model can take in and produce in one request, covering the system prompt, tool definitions, conversation history, retrieved data and the response itself.

Anthropic's documentation describes the context window as the model's working memory: all the text it can refer to while generating a response, including the response. It is separate from what the model learned in training. Anything not in the window on a given request does not exist for the model on that request.

Windows have grown fast. As of November 2026, Claude's current models, OpenAI's GPT-6 family and Google's Gemini 4 Argon all offer about a million tokens. The same Anthropic page adds the caveat that matters more: as token count grows, accuracy and recall degrade, which Anthropic and others call context rot.

What counts toward the window

  • Instructions

    The system prompt and any loaded instruction files or skills.

  • Tool definitions

    Every tool's name, description and schema, sent on every request. A large tool list can use a lot of the window before the task starts.

  • History and results

    Every earlier message, tool call and tool result in the conversation, including images and documents.

  • The output

    The response being generated, including any thinking tokens. Anthropic's docs count all of these, and cached tokens still occupy the window even though they cost less.

What happens at the limit

On the Claude API, a prompt that alone exceeds the window is rejected with a "prompt is too long" error. On Claude 4.5 models and newer, a request whose input plus maximum output exceeds the window is accepted, and generation stops with a model_context_window_exceeded stop reason if it reaches the limit.

Long prompts can also cost more per token. Anthropic charges a higher rate on Claude Haiku 5.5 for prompts above 100,000 tokens, and OpenAI's docs list GPT-6 Astra prompts above 272,000 input tokens at twice the input price and 1.5 times the output price.

Why a bigger window is not the fix

Chroma's Context Rot study (July 2025) found that reliability falls as input length grows, across 18 models. Anthropic's "Effective context engineering for AI agents" (September 2025) frames context as an attention budget: every token spent on stale tool output or unused instructions is attention not spent on the task.

For agents this decides the architecture. Long runs keep the window lean through compaction, which summarises older turns, context editing, which clears stale tool results, tool search, which loads tool definitions on demand, and subagents that return short summaries instead of their full transcripts.

How Motiontic's engineers apply it

Motiontic's engineers budget the window per task: what must be present on every call, what can be fetched on demand, and what should live outside it in files or a database. Token use per step is logged in traces, so a step that bloats the context shows up before it degrades answers.

Context windows of current flagship and workhorse models (as of November 2026)

Context windows of current flagship and workhorse models (as of November 2026)
ModelContext windowMaximum outputNote
Claude Opus 5.5, Sonnet 5.5, Haiku 5.51M tokens128K tokensHaiku 5.5 prompts above 100K cost more
Claude Sonnet 4.5200K tokensn/aRetires 30 November 2026
GPT-6 Astra1.05M tokens (922K input)128K tokensPrompts above 272K input cost more
GPT-6.1 Sol1.05M tokens128K tokensCodex uses a 500K default
Gemini 4 Argon1,048,576 tokens65,536 by defaultLonger output with long decode

Common questions

What is a context window in AI?

The maximum amount of text, measured in tokens, that a language model can read and write in a single request. It includes instructions, tool definitions, the conversation so far, retrieved data and the response.

Does a larger context window mean better answers?

Not by itself. Recall and accuracy degrade as input grows, an effect called context rot. A smaller, well-chosen context often beats a full window, and costs less.

What happens when an agent runs out of context?

The request fails or the output is cut off. Agent harnesses avoid this with compaction, clearing old tool results, loading tools on demand and moving long-lived state into files or a database outside the window.

Is the context window the same as memory?

It is short-term working memory for one request. Anything that must persist across sessions has to be stored outside the window and loaded back when needed.

Running agents that have to hold up?

Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.