AI Agents · 10 min read

Why Context Windows Changed What AI Agents Can Do

context windows - Why Context Windows Changed What AI Agents Can Do

Context windows are the single architectural variable that most determines what an AI agent can accomplish in one session. When context windows were small, agents were glorified autocomplete. Now that they span hundreds of thousands of tokens, agents can hold an entire workflow in memory — and that changes the economics of what you can automate.

What a Context Window Actually Is

A context window is the total amount of text — instructions, conversation history, documents, tool outputs — that a model can read and reason over in a single inference call. Think of it as working memory. Everything outside the window is invisible to the model at that moment. Early commercial models had windows of 4,000 tokens, roughly three pages of text. Current frontier models support 128,000 to 200,000 tokens — closer to a full business novel. Context windows are measured in tokens, not words; one token is roughly 0.75 words in English.

How Small Context Windows Capped Agent Usefulness

When context windows were tight, every agent design was a workaround. You had to chunk documents, summarise aggressively, and pray the model retained the right details after compression. The practical result was that agents could answer questions about a document but could not reason across a full contract, a full CRM history, or a full support thread. They forgot the beginning of a conversation by the time they reached the end.

The Chunking Tax

Chunking is not free. Every retrieval step adds latency, adds a failure point, and introduces the risk that the relevant passage was not retrieved. Operations teams building on early RAG pipelines spent enormous engineering time tuning chunk size, overlap, and embedding models — just to compensate for a context limit that the model vendor eventually solved at the infrastructure level. That engineering effort is now largely unnecessary for many use cases.

What Agents Could Not Do Before 2023

  • Read an entire legal contract and flag every clause that deviates from a template.
  • Hold a multi-turn sales conversation and remember what the prospect said in turn one when writing the follow-up in turn twenty.
  • Process a full customer support history before drafting a resolution.
  • Ingest a 50-page RFP and generate a compliant response in one pass.
  • Reason across an entire codebase to diagnose a bug rather than a single file.

Each of these tasks required either a human or a brittle multi-step pipeline. Context windows being small was not a minor inconvenience — it was the architectural ceiling on what agents were worth deploying.

What Large Context Windows Make Possible

Large context windows do not just make existing tasks faster. They make qualitatively different tasks possible. An agent that can hold 200,000 tokens can ingest a full client onboarding packet — NDA, SOW, intake form, prior email thread — and produce a project brief without a human touching it. That is not an incremental improvement. That is a role that previously required a junior account manager.

Single-Pass Document Reasoning

The most immediate operational unlock is single-pass document reasoning. Instead of retrieving fragments, the agent reads the whole thing. Accuracy improves because the model sees context it would otherwise miss: a clause on page 40 that contradicts a definition on page 3, a pricing footnote that changes the headline number, a scope exception buried in an appendix. Retrieval-augmented generation is still useful for very large corpora, but for individual documents under roughly 150 pages, loading the full text into the context window is now the simpler and often more accurate approach.

Stateful Multi-Step Workflows

Context windows also change how you architect multi-step workflows. When context was scarce, you had to externalise state — write intermediate results to a database, retrieve them for the next step, manage the handoff. With large context windows, an agent can carry its own working state through a long task: draft, review, revise, check against constraints, and finalise — all in one session. This is how agent orchestration becomes genuinely useful rather than just theoretically elegant.

The Economics of Longer Context

Longer context costs more per call. That is the honest trade-off. Pricing for frontier models is typically per million input tokens, and a 150,000-token call costs roughly 30–40 times more than a 4,000-token call at the same per-token rate. But the comparison is wrong if you frame it that way. The right comparison is: what did the old approach cost, including engineering time, retrieval infrastructure, error rates, and human review?

Approach Context Window Engineering Overhead Accuracy Risk Cost Driver
Chunked RAG pipeline 4K–16K tokens High (chunking, embedding, retrieval tuning) High (missed context) Infrastructure + human review
Full-document context 100K–200K tokens Low (load and call) Low (full visibility) Token cost per call

For most operations workflows, the full-document approach wins on total cost once you account for the engineering and error-correction overhead of the alternative. The token bill is visible; the engineering debt is not, which is why teams consistently underestimate the true cost of the chunked approach.

Context Windows and Agent Architecture

Understanding context windows changes how you design agents from the ground up. The system prompt, the user message, the tool call history, and the tool responses all compete for space inside the window. A poorly designed agent burns most of its context on a verbose system prompt and has little room left for the actual document it needs to reason over. Good agent architecture is partly an exercise in context budgeting.

Context Budgeting in Practice

  • System prompt: Keep it under 2,000 tokens. Every instruction that can be inferred from examples should be replaced with an example.
  • Tool outputs: Return structured, minimal JSON. A tool that returns a full HTML page when only three fields are needed wastes thousands of tokens.
  • Conversation history: For long-running agents, summarise older turns rather than carrying the full transcript. Preserve the last three to five turns verbatim.
  • Documents: Load the full document when it fits. Use retrieval only when the corpus genuinely exceeds the window.

Anthropic’s documentation on tool use and function calling covers how tool outputs are structured inside the context, which directly affects how much of your window they consume. Getting this right is not optional — it determines whether your agent degrades gracefully or hallucinates when the window fills up.

If you are evaluating whether your current agent architecture is hitting these limits, the failure patterns are usually visible before they are catastrophic. The most common architecture mistakes we see are almost always context-related: system prompts that are too long, tool outputs that are too verbose, and no strategy for what happens when the window fills mid-task.

Where Context Windows Still Break Down

Large context windows are not a solved problem. Three failure modes matter for operations leads.

Lost-in-the-middle degradation. Research consistently shows that models perform worse on information placed in the middle of a very long context compared to information at the beginning or end. If your most important constraint is buried on page 25 of a 100-page document, the model may underweight it. Mitigation: place critical instructions at the top of the context, not embedded in the document.

Latency. A 150,000-token call takes longer to process than a 4,000-token call. For synchronous, user-facing workflows, this matters. For asynchronous back-office tasks — contract review, report generation, data extraction — it usually does not. Design your agent architecture around the latency tolerance of each workflow, not a single standard.

Cost at scale. If an agent processes 10,000 documents per month at 100,000 tokens each, the token bill is real. Model costs are falling, but they are not zero. Build cost monitoring into your agent infrastructure from day one, not as an afterthought. Teams that treat agent deployment as a strategy rather than an experiment tend to catch cost overruns before they become a problem.

What Operations Leads Should Do Now

The practical implication of large context windows is that the bar for what is worth automating has dropped significantly. Tasks that required complex pipelines eighteen months ago now require a well-written system prompt and a model call. That means the bottleneck has shifted from technical feasibility to workflow identification.

  • Audit your highest-volume document-heavy workflows: contract review, RFP response, onboarding, compliance checks. These are the first candidates for full-context agents.
  • Evaluate your existing agent deployments for context waste. If you built them before 2024, they were probably designed around smaller context windows and may be over-engineered.
  • Do not assume retrieval is always necessary. For documents under 150 pages, test the full-context approach first. It is simpler and often more accurate.
  • Build cost and latency monitoring before you scale. Context windows make agents more capable; they also make runaway costs easier to miss.

If your team is ready to move from experimentation to production, the path from zero to a working agent is shorter than most operations leads expect — even without a dedicated engineering team. The deployment process is increasingly accessible, and the architectural decisions are the harder part. Context windows are now large enough that the question is rarely “can the agent do this?” and almost always “have we designed the workflow correctly?”

If you want to pressure-test your agent architecture or identify which workflows in your operation are ready for full-context automation, Studio Máté is worth a conversation.

FAQ

How large do context windows need to be for most business workflows?

For the majority of operations use cases — contract review, onboarding documents, support history, RFP responses — a 100,000-token context window is sufficient. That covers roughly 75,000 words, which is longer than most business documents. The 200,000-token models give headroom for very large files or multi-document reasoning, but 100K handles most real workflows without retrieval.

Do larger context windows make RAG obsolete?

Not entirely. Retrieval-augmented generation is still the right architecture when your corpus is genuinely large — thousands of documents, a full knowledge base, or a multi-year email archive. But for individual documents or small document sets, loading the full content into the context window is now simpler and often more accurate than retrieval. The two approaches are complementary, not competing.

What happens when an agent runs out of context mid-task?

Most models will either truncate the oldest content silently or return an error. Neither is acceptable in a production workflow. The correct mitigation is to monitor token usage during the task and trigger a summarisation step before the window fills. This should be built into the agent’s control loop, not handled as an edge case after deployment.

How do context windows affect agent cost?

Longer context windows increase the per-call token cost. At current frontier model pricing, a 150,000-token call costs roughly 30–40 times more than a 4,000-token call. However, the total cost comparison must include the engineering overhead and error rates of the alternative chunked approach. For most production workflows, the full-context approach is cheaper in total once those factors are included.

Can context windows replace human review entirely?

For well-defined, structured tasks — extracting specific data fields, flagging deviations from a template, generating a first draft — large context windows enable agents to perform at a level where human review becomes exception-handling rather than default workflow. For high-stakes decisions with significant legal or financial consequences, human review of the agent’s output remains appropriate. The goal is to make human review fast and targeted, not to eliminate judgment entirely.

← Back to all articles