Skip to content

Interview question · Context Engineering & Caching

Your agent has a 200k-token window and falls apart at 55k. Why, and what do you change?

The candidate who says 'use a bigger window' has answered a different question. The window is not full; it is noisy. Find what the 55k is made of, then make it smaller and cleaner.

mediumEssentialNewUpdated Nov 2026

TL;DR: Accuracy falls with the length and noise of the context, not with how close it is to the limit, so a quarter-full window can already be failing. Find out what the 55k is made of (usually stale tool results, near-duplicate records and logs), then reduce it with the least lossy tools: cap results at the source, clear used results, keep current facts in notes, isolate exploration in subagents, and measure where success starts to drop so the thresholds sit below it.

How to approach it

Ask what "falls apart" looks like in traces (repeated work, forgotten instructions, confusing two records) and what the context is made of at the point it starts. Then state the core idea before proposing fixes: the effective budget is set by quality, not by the advertised window.

A strong answer

Why it happens at 55k. Three effects grow with context length long before any hard limit: attention spreads over more tokens, look-alike facts compete with the right one, and facts in the middle of a long input are used less reliably ("Lost in the Middle", Liu et al., 2023). Long-context benchmarks such as RULER have found effective lengths well short of advertised windows. An agent's context is mostly tool output, which is exactly the noisy, repetitive kind.

Find what the 55k is. Break the context at the failure point into parts:

system prompt          3,000
tool definitions      12,000
conversation           9,000
tool results          31,000   ← 22 results; 17 already used and not needed again
notes                      0
total                 55,000

The window is just over a quarter full, but more than half of it is results the agent has finished with, including two versions of the same order record from turn 3 and turn 19.

Reduce it, cheapest first.

  1. Cap at the source. Tools return trimmed, paginated results; no single result over a few thousand tokens.
  2. Clear used results. Replace results the agent has acted on with placeholders that keep the call and say how to refetch. Here that removes about 24,000 tokens.
  3. Carry current facts in notes. A short notes block holds the current order state, decisions and open tasks, so the stale turn-3 record is not the agent's only source.
  4. Isolate exploration. If the agent reads many files or pages to find one thing, have a subagent do the reading and return findings.
  5. Compact the conversation rarely, at a later threshold, under a contract of what must survive.

Set thresholds from measurement. Pad your own tasks with realistic noise from traces at several sizes, run each several times, and find where success starts to fall. Put the clearing threshold below that point. For this agent it might be "clear at 40k", far below any window limit.

What interviewers probe next

"Why not just move to a 1M-token model?" The noise grows with the window, quality still falls with length, and every kept token is reread each turn at higher cost. It postpones the hard limit and fixes nothing.

"How would you know the change worked?" The same padded-context experiment before and after, plus production metrics: repeated identical tool calls per run, task success on long runs, tokens per successful task.

"The agent forgets an instruction from the first message. Same cause?" Yes, and the fix is to lift lasting constraints out of the conversation into the run's fixed state, rendered at the edges of every request.

What if?

What if · interview follow-ups

Hold your answer as the constraints change

Your agent degrades after 55k tokens of a 200k window. Most of the context is old tool results.

  1. Start here

    What if the agent does need to reread an old file later?

How it's scored

Weak: Proposes a larger context window, or a prompt instruction to "pay attention to earlier information".

Hire: Explains that quality falls with length and noise, identifies tool results as the bulk, and clears or compacts them.

Strong Hire: Breaks the context into parts at the failure point, applies reductions cheapest first (cap, clear, notes, subagents, rare compaction), sets thresholds from a realistic padded-context experiment with repeated runs, and protects the cache by batching reductions.

Common mistakes

  • Assuming a context is safe until it is nearly full.
  • Testing with random filler text, which hides the effect of look-alike facts.
  • Compacting the conversation first, the lossiest step, when clearing tool results would have been enough.
  • Leaving lasting instructions in the first user message where they end up mid-context.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 6, and the site remembers where you stopped in each one.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in raises your free answers from 5 to 6 per topic, adds an applied lesson in every topic and easy practice tests, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

Nobody has commented. Post a correction or another way to answer.