Gloss Key Takeaways
  1. Bigger context windows don’t reliably make agents better; treating the prompt window as “memory” is a category error that can reduce accuracy while raising cost.
  2. Long prompts still suffer from “lost in the middle,” where facts placed in the middle 40–60% of the context see recall drop by roughly 25–40%, even on frontier models.
  3. Targeted retrieval (e.g., pulling the dozen relevant files into a 64k window) can outperform million-token prompting, with reported gains like bug-fix accuracy rising from 71% to 84%.
  4. Economically, ultra-long windows can burn compute comparable to many retrieval-augmented runs, making them hard to justify at production scale.
  5. What actually persists is a structured memory stack—symbol/repo graphs, decision logs, and shared notes/scratchpads—rather than ever-larger prompts.

Your Agent's Context Window Is Not Its Memory

A long card catalog cabinet of small labeled wooden drawers, warm directional light, one drawer pulled open to show neatly filed index cards, standing in for structured retrieval instead of one giant open box

One team swapped a 2-million-token model for 64k tokens plus structured retrieval and watched bug-fix accuracy climb from 71 to 84 percent.

The middle 40 to 60 percent of a long prompt still loses a quarter to 40 percent of its recall, even on the frontier models shipping this year.

The asset worth keeping was never the window. It is the symbol graph, the decision log, and the shared notes that outlive a single session.

The arms race nobody is bragging about anymore

For two years the headline number was context window size. A model went from 32k to 200k to a million tokens, and the assumption rode along: more room in the prompt means a smarter agent. Buy the biggest window, paste in the whole repo, let the model sort it out.

That assumption stopped holding sometime this spring. The newer reports out of teams running coding agents in production all point the same direction. Bigger windows are not making agents better at the work. In several cases they are making them worse, and more expensive, at the same time.

This is not a knock on long-context models. The capability is real and useful for specific jobs. It is a correction to how we have been using it. Treating the context window as the agent's memory was always a category error. We just had enough headroom to get away with it for a while.

Lost in the middle did not go away

The clearest failure mode has a name now: lost in the middle. Put a fact at the very start or the very end of a long prompt and the model recalls it well. Put it in the middle 40 to 60 percent and recall drops by 25 to 40 percent. Frontier 2026 models narrowed that gap. They did not close it.

So when you stuff a million tokens of codebase into the window, you are not giving the agent perfect recall of a million tokens. You are giving it sharp recall of the edges and a soft, lossy blur across the bulk of what you handed it. The function the agent actually needs to edit is usually somewhere in that blur.

Targeted retrieval avoids the problem by construction. Pull the twelve files that matter, drop them in a 64k window, and every one of them sits in the high-recall zone. One model-lab evaluation found hybrid graph plus vector retrieval at 64k tokens beating pure 1-million-token context by 20 to 40 percent on multi-file benchmarks. Less context, more correctness. That is the whole story in one line.

The economics make the case even harder

There is a cost argument layered under the accuracy one. A 2-million-token window burns roughly the same compute as a hundred targeted retrieval-augmented edits, with no measurable correctness gain to show for it. You are paying frontier-window prices to make the agent worse at finding things.

For a single demo that does not matter. For an agent running thousands of times a day across a team, it is the difference between a tool you can afford to leave running and one you ration. The teams shipping fastest in 2026 are not the ones with the biggest prompts. They are the ones who figured out what to leave out.

What actually replaces the window

The pattern that keeps showing up is a four-layer memory stack. None of these layers is a bigger prompt. All of them are structure that persists.

A repo graph that knows symbols, imports, tests, and call sites. This is what lets the agent retrieve the right twelve files instead of guessing or grepping. It is the difference between an agent that understands your codebase and one that reads it cold every morning.

A decision memory that captures why the code looks the way it does. The architectural calls, the rejected approaches, the constraints that are not visible in any single file. This is the layer most teams skip, and it is the one that stops the agent from confidently reintroducing a bug you already fixed and documented six weeks ago.

An agent scratchpad that survives a single workflow handoff. When one agent finishes a step and passes work to the next, the reasoning should travel with it. Without this, every handoff is a fresh start and the chain forgets its own middle.

A permissioned team memory so a new agent inherits what colleagues already learned. Onboarding a person takes weeks because context is expensive to transfer. Onboarding an agent should not repeat that cost every session.

Notice that none of this is exotic. A graph index, a decision log, a scratchpad, a shared store. The hard part was never the technology. It was admitting that the window was the wrong place to keep any of it.

Memory is now something you can measure

The other shift worth naming is that agent memory stopped being a vibe and became a benchmark. There are now standardized tests for it. The current strong scores land around 92 on conversational recall and 94 on long-session recall at roughly 6,900 tokens per query. That last number is the point. High recall at low token cost is exactly the inverse of the brute-force window approach.

The honest caveat is that this still degrades at real scale. Temporal reasoning that scores 64 at a million tokens drops to 48 at ten million. Memory staleness, cross-session identity, and treating change as evolution rather than replacement are all open problems. Nobody has solved persistent memory. But the field has at least agreed on what to measure, which is how you can tell a problem has moved from hype to engineering.

What to do with this

If you are choosing a coding agent or building one, stop scoring it on window size. Ask what it remembers between sessions and how it decides what to retrieve. A 64k agent with a good repo graph and a decision log will quietly outwork a million-token agent that starts every task from zero.

The window is working memory. It is where the agent thinks, not where it knows. Confusing the two is the most expensive mistake in agent design right now, and it is the easiest one to stop making.


Marco Kotrotsos writes about real-world AI for practitioners. More at acdigest.substack.com.

Gloss What This Means For You

If you’re building or buying an agent, optimize for retrieval and durable memory instead of the biggest context window. Invest in a repo/symbol graph so the agent can fetch the right files, and keep a decision log so it remembers why past choices were made and doesn’t reintroduce old bugs. Treat the context window as a working set: keep it small, relevant, and refreshed, and let persistent structure carry knowledge across sessions.