← All field notes
Architecture · 29 November 20267 min

Inside 88 days and 3.30B tokens: why KV prefix caching is the real multiplier

Across 58,045 real coding turns, 93.9% of eligible prompt tokens hit the KV cache. Here is how prompt stability determines both local throughput and cloud bills.

When teams evaluate local LLM serving, they almost always benchmark raw decode tokens per second on a short 500-token prompt. In real coding and analyst agents, raw decode accounts for less than half of perceived waiting time. The hidden bottleneck is repeated prefill.

What 58,045 agent turns look like

Across our 88-day telemetry ledger (4 September to 1 December 2026), a single RTX 3090 workstation processed 3.30 billion tokens across 58,045 turns and 79,683 tool calls. Notice the tool breakdown:

  • 43% of all actions were shell runs (builds, compilers, test gates, git status checks).
  • 33% were file reads and targeted code searches.
  • 82.2% of output tokens went to explicit model reasoning before emitting final patches or answers.

Every tool call appends a short result to a shared multi-turn prompt whose base — system prompt, tool schemas, project map, and opened files — remains byte-identical turn after turn. Out of 3.19 billion prompt tokens, 2.97 billion (93.9% of cache-eligible tokens) were served directly as engine-reported KV cache hits, yielding an effective ingestion rate of 12,800 tok/s.

Why naive prompts break prefix reuse

Even small formatting mistakes destroy prefix caching. Injecting a changing wall-clock timestamp at the top of a system prompt, reordering tool definitions dynamically, or summarizing older messages early invalidates every downstream KV block. Keeping immutable system instructions and workspace structure pinned at the start of the conversation lets vLLM PagedAttention and SGLang RadixAttention skip redundant matrix multiplications across turns.

The cloud TTL cliff

Frontier cloud APIs offer prompt caching too, typically with a 5-minute TTL. When a developer pauses for a coffee or waits 6 minutes for an integration test suite, the cloud cache expires and the next turn triggers a full uncached cache-write charge. On dedicated private hardware, your prefix stays resident in GPU memory until evicted by active competing traffic.

Inspect all 88 days of ledger numbers →