Hashlogics
Glossary

What is a context window?

Your assistant answers well for twenty minutes, then forgets the rule you set at the start. This is why.

Context window

context lengthcontext limit

A context window is all the text a language model can refer to while writing a reply, counted in tokens and including that reply. Anthropic calls it working memory. It is separate from what the model learned in training, and it is refilled on every request.

Everything you send counts. Anthropic's docs are specific about this. The system prompt, every message, tool results, images, files and your tool definitions all take space. So does the answer being written.

Sizes vary by model. Claude Opus 5 and Claude Sonnet 5 carry a one-million-token window on the Claude API. Sonnet 4.5 carries 200,000. A token is roughly three quarters of a word in English, so the numbers are large but not unlimited.

Why it matters

What happens when you exceed it

Two different things go wrong, and they look nothing alike. If the input alone is over the limit, Anthropic's API rejects the request with a 400 error reading "prompt is too long". Nothing runs. That failure is loud, and loud is the good case.

The other case is quieter. On Claude 4.5 models and newer, a request whose input plus requested output could overflow is still accepted. If generation then hits the ceiling, it stops and reports the stop reason model_context_window_exceeded. Your user sees an answer that ends halfway through a sentence.

Chat products often hide both by dropping the oldest messages. Nothing errors. The instruction you gave at the start is simply gone.

Where the space goesLive
  1. SystemYour rules, sent every turn.
  2. ToolsEvery schema you defined.
  3. HistoryGrows with each exchange.
  4. DocumentsPasted text, images, PDFs.
  5. AnswerThe reply counts too.

History is the only one that grows on its own. A conversation fails on turn forty with the same prompt that worked on turn two.

Questions, answered
01Does a bigger context window remove the need for RAG?

No. Retrieval still wins when the source material is larger than any window, changes often, or carries access rules. A million tokens is generous, but a document store is not bounded and permissions have to be applied before text reaches the model.

02How many words fit in a context window?

Roughly 750,000 words in a one-million-token window, taking a token as about three quarters of an English word. Treat that as an estimate. Code, punctuation and other languages split up differently. Anthropic offers a token counting API to measure a request before you send it.

03Why does my AI assistant forget earlier instructions?

The conversation outgrew the window and older turns were dropped to make room. Products that manage context on a first-in, first-out basis do this silently. Repeating standing rules in the system prompt each turn is the usual fix, since that part is resent every time.

Verified
Start

Anyone can ship the agent. We answer the pager.

We build AI agents and automation, then stay on under an agreed service level. A senior engineer reads every brief, and your call gets scheduled within 24 hours.

What happens next

  1. 01

    You send a brief or book a call

    Two minutes, whichever you prefer.

  2. 02

    A senior engineer replies within 24 hours

    Not a sales rep.

  3. 03

    Honest scoping, in writing

    And if we’re not the right fit, we say so.

Abdul Basit, CEO of Hashlogics

“I started Hashlogics because too many teams ship a demo, get paid, and disappear. We build to a standard we’d run ourselves — and we stay to keep it running.”

Abdul Basit · CEO · a direct line

Not ready to talk? Take the checklist.

12 questions to ask any AI agency before you sign. They separate a demo shop from a team that ships to production.

Get the checklist

Free · no newsletter