By Sagar Shankaran, Founder of CallSphere
Design context for Claude agents the right way — what belongs in the window, what to exclude, and why curation beats stuffing for accuracy and cost.
Key takeaways
Ask an experienced Claude engineer what most determines whether an agent works, and you will rarely hear "the prompt." You will hear "the context." Everything the model knows in a given turn lives in its context window, and the difference between a sharp agent and a confused, expensive one is almost always what made it into that window and what was wisely kept out. Even with Claude Code's roughly one-million-token capacity, more is not better — the entire window is reprocessed every turn, so each token you add costs latency, money, and a little reasoning clarity. Context design is the discipline of spending that budget well.
The intuition that a bigger window means a smarter agent is the most expensive mistake in this field. There are three concrete costs. First, money and latency: the model reads the whole window on every single turn, so a multi-turn agent re-pays for bloated context many times over. Second, dilution: when the few facts that matter are buried among thousands of marginally relevant tokens, the model's attention is split and accuracy drops. Third, false confidence: irrelevant or stale material in context can lead the model to cite or act on the wrong thing because it was "right there."
Context engineering is the practice of deciding what information enters a model's context window, in what form, and what is deliberately excluded, so the model has exactly what it needs and no more. Framed that way, the goal is obvious: a small, high-signal window beats a large, noisy one almost every time.
Think of the window as ordered layers, from most stable to most volatile. The stable layers go first because Claude's prompt caching can reuse a long, unchanging prefix at a fraction of the cost. The volatile layers — the user's current request and freshly retrieved facts — go last. The diagram shows how a single turn assembles its window and where the gates that keep it lean live.
flowchart TD
A["Incoming turn"] --> B["Stable prefix: role, constraints, tool schemas"]
B --> C["Skills loaded only if task-relevant"]
C --> D{"Need external facts?"}
D -->|Yes| E["Retrieve top-k relevant chunks"]
D -->|No| F["Skip retrieval"]
E --> G["Compact prior turns into summary"]
F --> G
G --> H["Append current user request"]
H --> I["Send curated window to Claude"]
Each branch is a decision about inclusion. Skills load only when relevant, so a thirty-tool capability set does not sit in every prompt. Retrieval is conditional and top-k bounded. Prior turns get compacted into a running summary rather than carried verbatim. The result is a window that stays roughly constant in size even as a long session accumulates history.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
Three things earn a permanent place. The role and constraints — who the agent is and the hard rules it must never break — anchor behavior and are the first thing you check when something goes wrong. The tool schemas the agent might need this turn, because the model can only call what it can see. And the current request plus its directly relevant facts: the specific order, the specific policy clause, the specific file section the task touches. Everything in this group is high-signal by construction.
A useful test for any candidate addition: would removing it change the correct answer for this turn? If not, it probably does not belong in the window right now. It can live in a tool, a skill, or a retrieval index and be pulled in only when a turn actually needs it.
The harder discipline is exclusion. Leave out entire reference documents when a paragraph will do. Leave out raw tool dumps — a handler that returns ten thousand rows should be summarized to the relevant few before its output enters context. Leave out stale conversation history that a summary already captures. Leave out duplicate or near-duplicate sources that add tokens without adding facts. And be cautious with anything the model might over-trust: outdated policy text or a half-finished draft sitting in context can quietly steer an answer wrong.
This is where subagents become a context tool, not just a scaling tool. When a subtask is unavoidably noisy — exploring many files, trying several queries — run it in a subagent with its own window and let it return a tight summary. The orchestrator's context never sees the noise, only the conclusion.
Two windows can contain the exact same tokens and produce different answers depending on how those tokens are arranged. The model reads top to bottom, and material near the instruction it is currently following tends to weigh more heavily. The practical rule is to place the most decision-relevant facts close to the task statement, not buried three thousand tokens up. If an agent keeps ignoring a constraint, check where the constraint sits — a rule stranded at the top of a long window competes with everything after it.
This is why the stable-to-volatile layout is more than a caching trick. Putting the current request and its directly relevant facts last means they sit right where the model's attention is sharpest as it composes a response. It also pairs cleanly with retrieval: the chunks you pull for this turn belong near the question they answer, not interleaved with reference material from earlier turns. When you debug a context problem, ask two questions in order — is the right fact present, and is it in the right place? The second question is the one most teams forget to ask.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
| Material | Default | Why |
|---|---|---|
| Role & hard constraints | Include (front) | Anchors behavior, cacheable |
| Relevant tool schemas | Include | Model can only call what it sees |
| Top-k retrieved facts | Include (back) | High signal for this turn |
| Full reference docs | Exclude | Retrieve the relevant slice instead |
| Raw tool dumps | Exclude | Summarize to what matters |
| Stale history | Exclude | Replace with a running summary |
Because the whole window is reprocessed every turn, large context means higher cost and latency on each iteration and weaker focus on the facts that matter. Capacity is a ceiling, not a target — use the smallest window that answers the question well.
Compact older turns into a running summary and keep only recent, relevant exchanges verbatim. The summary preserves what the agent learned without paying for the full transcript on every turn.
Replacing document-stuffing with narrow retrieval. Pulling the few relevant chunks instead of whole sources usually improves accuracy and cuts cost at the same time — the rare change that helps on both axes.
Watch token counts per turn and latency as a session grows. If they climb steadily while answer quality flattens or dips, the window is accumulating noise. Add turn compaction and tighten retrieval until per-turn token use stabilizes — a healthy agent's context size should plateau, not grow without bound across a long conversation.
CallSphere applies this context discipline to voice and chat agents, giving each call exactly the customer facts and tools it needs and nothing that would slow it down. Hear curated context in action at callsphere.ai.
Source & attribution: This is an independent, original explainer inspired by Anthropic's coverage on the Claude blog. Claude, Claude Code, Claude Cowork, Claude Opus, and the Model Context Protocol are products and trademarks of Anthropic. CallSphere is not affiliated with or endorsed by Anthropic.

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
Anthropic's Claude Fable 5 and Mythos 5 explained: pricing, availability, frontier benchmarks, the dual-model safeguard architecture, and what they mean for AI agents.
Where Claude Code, MCP, and multi-agent systems are taking GTM engineering next, and how to prepare your team now for standing and multi-agent workflows.
Where Claude Cowork and the Claude agent ecosystem are heading next — standing agents, MCP, skills as a moat — and the concrete moves to prepare your team now.
The metrics, leading signals, and anti-metrics that prove Claude Cowork is working — acceptance rate, time-to-outcome, and why usage counts mislead.
Shipping an agentic GTM workflow is easy; proving it works is hard. The metrics, signals, and eval loops that show a Claude Code rebuild is paying off.
A realistic end-to-end Claude Cowork use case: a quarterly vendor-spend review from vague ask to shipped deliverable, with every agentic step shown.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI