LegionEdge
All blog posts
Research notesApr 22, 20261 min read

Measuring context waste in production agents

Most context windows are mostly filler. Instrumenting the waste was step one toward 50x compression.

CategoryResearch notes
PublishedApr 22, 2026
Reading time1 min
Sections01
SourceEngineering blog
00

Overview

Before we built context compression, we measured context waste — and the numbers were worse than we guessed. In the production agent traffic we instrumented for our MCP field study, the median request spent under a fifth of its tokens on content that influenced the output.

Where does the rest go? Three places, in order: tool definitions re-sent on every request, conversation history that's long since stopped mattering, and structural boilerplate — markup, schemas, formatting — that models need to see once, not every turn.

The interesting methodological problem is attribution: how do you know a token didn't matter? We use ablation probes — re-run a sampled request with a span removed and measure output divergence. It's expensive, so we sample, but it turns "context feels bloated" into a number you can regress against.

That number is what made the efficiency case concrete. Waste percentages this high mean you don't need smarter models to cut inference cost dramatically — you need better plumbing between the application and the model. Better AI, less compute.

The instrumentation approach is written up in the field study, and the compression work it motivated is published alongside it. If you run agents in production, measure your waste first — the fix follows from the numbers.

Want the build notes as they happen?

The blog is written by the engineers shipping Nokuva, Tavoc, and Foltrac — deep dives land here as the work does, and the authors answer questions.