freedzhost.cloud

The context floor: where an agent's tokens really go

Level IntermediateEstimated time 1 hRead first Claude Code, two ways: on the subscription and on your own modelsA word you don't know? Glossary

Everyone tries to save tokens by trimming what the agent reads: shorter files, smaller tool outputs. We measured before cutting. Those savings act on about 1 % of the bill. The other 99 % is a floor you pay at every turn, and you can measure it in five minutes.

How these figures were obtained. Measured on our own machines (see the protocol), usually a single run, with speeds as reported by the server itself; we do not publish raw logs. Treat them as orders of magnitude on this hardware, not as guarantees on yours. Figures from outside are labelled with their source.

What you get. A clear map of where your context goes, a method you can reuse on any agent, and the one lever that counts: on our setup, a single tool server cost 17.6 % of every run, and removing it cost nothing.

Tokens billed for one runfloor × 11 turns: about 340,000the actual conversation: 4,408
One agent run of 11 turns, measured: 345,811 input tokens billed. The conversation itself weighed 4,408 tokens. The rest is the floor, 30,939 tokens of system prompt and tool descriptions, sent again at every turn.

1. The floor

Before your first word, an agent sends the model its system prompt and the description of every tool it can call. We call that the floor. Measure it with a trivial prompt ("say ok") and read the input tokens the server reports. Ours: 30,939 tokens, a fifth of the model's window, gone before any work.

2. Why it dominates the bill

The floor is sent again at every turn. A run of 11 tool calls costs 11 floors: about 340,000 tokens. We measured 345,811. The whole transcript of that run, everything the agent actually read and wrote, weighed 4,408. The arithmetic closes: the floor explains about 98 % of the bill.

Trimming file reads acts on the 4,408. Trimming the floor acts on 30,939 × the number of turns. Measure before choosing your battle.

3. Find what is in it, by substitution

Change one thing, measure again, put it back. For Claude Code, start it with an empty tool server list (--strict-mcp-config with an empty config):

4. The method, so the numbers hold

  1. One variable per measurement.
  2. Three runs at least; report the median and the min–max.
  3. The same starting point every time: test pull requests are closed, never merged.
  4. A failed run is data: keep it.

Traps

A test task that is already done gives "no changes" three times and looks like a bug. Check that your witness task is not already in the main branch.

Estimates lie: we had priced the sub-agents at about 2,700 tokens from their file size, then measured zero. A file size is not a context cost; only the server's counter is a fact.

Found this useful? Tell us what to measure next.