- In short
- Context window management is the discipline of deciding what information belongs in the context window and in what order, so the model keeps the facts and instructions it needs. The window is a bounded budget: only content relevant to the current step should occupy it, critical instructions belong where the model reliably attends, and as a task grows the context must be curated rather than allowed to accumulate.
Context is a budget you spend, not a bucket you fill
Once you know that a Claude model reads and writes text as tokens inside a bounded context window, the next skill is deciding what to put in that window. Context window management is exactly that decision: choosing which information belongs in the window, and in what order, so the model keeps the facts and instructions it needs for the step it is doing right now. The Claude Certified Developer - Foundations (CCDV-F) exam treats this as the opening knowledge point of context engineering, because every later technique for controlling drift, bloat, and isolation rests on it.
The mental model to carry into the exam is that the window is a budget. Every token you place in it competes with every other token for the model's attention. That reframes the goal. You are not trying to give the model as much information as possible; you are trying to give it the relevant information and nothing that dilutes it. Content that does not serve the current step is not neutral, it is a cost, because it takes up room and pulls attention away from what matters.
- Context window management
- The discipline of deciding what information belongs in the context window, and in what order, so the model reliably keeps the instructions and facts it needs. The window is a bounded budget, so relevant content is curated in and irrelevant content is kept out.
Only the relevant subset earns a place
The first principle is selection. Only information relevant to the current step should occupy the window. That sounds obvious, but the tempting failure is the opposite: because more context feels safer, developers pour in every document, every prior result, and every reference they have, on the theory that the model can sort out what it needs. It usually cannot, at least not for free. Irrelevant material competes for attention and can actively mislead the model toward the wrong part of the task.
The exam tests this directly. The classic trap is filling the window with everything available instead of the relevant subset. A scenario will describe an agent that is given a large dossier of loosely related material and then performs worse, not better, and you are expected to recognise that the volume of context is the problem. The corrective instinct is subtractive: ask what the model actually needs to complete this step, include that, and leave the rest out. Curation beats accumulation.
Placement: put critical content where the model attends
Selecting the right content is only half the job. The second principle is placement: critical instructions and facts have to sit where the model reliably attends to them. Attention across a long context is not uniform. Material at the very start and the very end of a context tends to be read reliably, while content stranded in the middle of a long body of text is more easily missed. That is why the burying-in-the-middle failure is its own exam trap, separate from the volume trap.
The practical rule is to give durable, must-not-miss instructions a privileged position rather than dropping them wherever they happened to be written. In practice this means the system prompt for persistent behaviour, and a position close to the current request for the specific constraints of this step. The point connects directly to instruction clarity and placement: clear wording does not help if the instruction sits somewhere the model glosses over. A precise instruction buried in the middle of a ten-thousand-token transcript is, for reliability purposes, a weak instruction.
Curate as the task grows
The third principle is temporal. A short prompt rarely needs management, but tasks grow. A conversation accumulates turns, an agent accumulates tool results, and a long job accumulates intermediate work. Left alone, all of that just piles up in the window until the relevant early instructions are drowned or pushed out entirely. The principle is that as a task grows, context must be curated rather than allowed to accumulate.
Curation is an active, ongoing choice, not a one-time setup. It means periodically asking what in the window is still earning its place and what has become stale, then trimming accordingly. This is the doorway to the next two knowledge points. Keeping accumulation under control through pruning tool output and compacting older turns is how you curate within a single context, and holding a subtask's detail in a separate context through isolation with subagents is how you keep it out of the main window in the first place. Both are curation strategies; this knowledge point is the principle they serve.
Worked example
An engineer builds an agent that answers questions about a customer account. To be safe, they load the customer's entire five-year history plus a long policy manual into every request, and place the one rule that matters, never disclose another customer's data, in a comment halfway through the policy text.
The agent starts confidently but degrades. On simple questions it wanders into irrelevant history, and in one case it references data from an adjacent account, the exact thing the safety rule was meant to prevent.
Both failures are context management failures. The first is the volume trap: five years of history and a full policy manual are almost entirely irrelevant to any single question, so they dilute attention and steer the model toward tangents. The relevant subset for a given question is usually a handful of recent records, not the whole archive.
The second is the placement trap. The one rule that truly mattered was buried in the middle of a long document, precisely where a model is least likely to attend to it reliably. Moving that rule into the system prompt, where durable behaviour belongs, and loading only the records relevant to the current question, fixes both problems at once. Same model, same data available, but a curated budget instead of a full bucket.
How this is tested on the CCDV-F exam
Questions on this knowledge point are scenario-based and diagnostic. The exam describes a Claude application that behaves worse as more context is added, or that ignores an instruction it was clearly given, and asks you to name the cause. The two traps map to the two principles. When performance falls off because everything was loaded in, the fault is filling the window with the whole set instead of the relevant subset. When a stated instruction is ignored, the likely fault is that it was buried in the middle of a long context where the model did not reliably attend to it.
The distractors usually suggest treating the symptom the wrong way: use a bigger model, or add even more context to "clarify." The exam wants the context-engineering answer instead. Reduce the window to the relevant subset, and move critical instructions to a position the model reliably reads. If you can hold those two moves and the idea that context is a budget you curate as the task grows, you have what this knowledge point assesses.
Misconception
More context is always safer, so I should load everything the model might conceivably need.
What's actually true
Misconception
As long as an instruction is somewhere in the context, the model will follow it.
What's actually true
Where this leads
Context window management is the foundation the rest of task statement 6.1 builds on. Once you treat the window as a budget, preventing context drift and bloat becomes the set of techniques for keeping that budget clean over time, and context isolation through subagents becomes the way to keep a subtask's detail out of the budget entirely. Lock in the principle here and those two apply-level knowledge points have something firm to stand on.
An agent answers well on short questions but gives vague, off-target answers once a developer starts attaching a large library of reference documents to every request. What is the best explanation and fix?
People also ask
What is context window management?
Why does the placement of instructions matter?
Should I put everything into the context window?
Watch and learn
Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.
No videos curated for this concept yet
We are still curating the best official and community videos for this topic.
References & primary sources
Master this concept with Archie
Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.