Skip to content
AI for go-to-market

Context Window

Federico DonatoneBy · Updated October 15, 2026
Definition

A context window is the amount of text, measured in tokens, that an AI model can work with in a single request. It holds everything the model sees at once: instructions, conversation history, documents, tool results and its own answer. Anything outside the window is invisible to the model, and on the API, everything inside it is billed.

What fills a context window

Tokens are the small chunks of text a model reads, often a word or part of a word. Every request fills the window with:

  • The system prompt and any rules files.
  • The full conversation so far, including earlier answers.
  • Documents, pages and data you paste or attach.
  • Tool definitions and whatever the tools return, such as a CRM export or a web page.
  • The model's own output, including any thinking it does before answering.

Models do not remember between requests. A chat feels continuous because the app sends the whole history again with every new message. That one fact explains most of what a context window costs.

Two consequences follow for anyone building with AI. Each turn of a conversation costs more than the last, because the history keeps growing. And whatever the model needs to know, such as your ideal customer profile, your rules or yesterday's results, has to be inside the window on that request, or the model does not have it.

How the context window affects cost

On the Claude API you pay per million tokens, with separate prices for input and output. Prices from Anthropic's pricing page, checked October 12, 2026: Haiku 5.5 costs $0.10 input and $0.50 output (prompts up to 100,000 tokens), Sonnet 5.5 $2 and $10, Opus 5.5 $4 and $20, and Fable 5.1 $10 and $50.

FormulaCost per request = (Input tokens ÷ 1,000,000 × input price) + (Output tokens ÷ 1,000,000 × output price)If an agent sends 50,000 tokens of context and gets 1,000 tokens back on Sonnet 5.5, one request costs $0.10 + $0.01 = $0.11, and the same request on Opus 5.5 costs $0.22.

The trap is repetition. If an agent rereads the same 50,000 tokens on each of 40 steps, it pays for 2,000,000 input tokens, or $4 on Sonnet 5.5 before any output. That is why one long agent run can cost far more than many short questions. Prompt size can also change the rate itself: the Haiku 5.5 price above applies to prompts up to 100,000 tokens, and larger prompts pay a higher rate.

How to keep the context window small and costs down

  1. Start a new conversation for each new task instead of continuing one long thread.
  2. Summarize long histories and keep the summary, not the transcript.
  3. Send only the relevant parts of a document, not the whole file.
  4. Trim tool results to the fields the task needs, not the full CRM record.
  5. Use prompt caching when the start of your prompts repeats, since cached input is billed at a lower rate.
  6. Route simple, high-volume steps to a smaller model such as Haiku 5.5.

More context is not always better for quality either. A long prompt full of loosely related material can distract a model and make it miss the detail that matters. A tight, relevant context usually gives cheaper and better answers.

Our Claude API cost calculator shows what a given number of input and output tokens costs per request and per month on each model. For plan prices side by side, see AI pricing. For how agents keep their instructions in files instead of a long chat history, see how to build an AI agent with Claude.

Full guideFree Claude API Cost Calculator

Context Window FAQ

What happens when a context window is full?
The model cannot take in more text in that request. Depending on the app, older messages are dropped, the conversation is summarized automatically, or the request returns an error. Details from early in a long conversation can get lost, so restate key facts or start a fresh thread.
Does a bigger context window cost more?
The window size itself costs nothing. You pay for the tokens you actually send and receive, so filling a large window costs more than using a small part of it. On the Claude API, Sonnet 5.5 bills input at $2 per million tokens, per Anthropic's pricing page checked October 12, 2026.
Is a context window the same as memory?
No. The context window is short-term and covers only the current request. Anything the model should know next time has to be sent again, saved in a file it reads, or stored by the app as memory and added back into the window.

Related terms

Want these systems running inside your sales team?

Growth Cab is a go-to-market consulting firm for B2B tech companies selling $50,000+ deals. We build the outbound, LinkedIn and closing systems.

Apply to GC GTM Glossary