Cached prefixes push 91% of a ReAct agent's LLM time into decode
An arXiv tracing study of Claude Code agents on Gemma and Qwen measured prefix-cache hit rates between 84.6 and 99.5 percent, which moves the serving bottleneck to how long you can keep KV blocks resident between tool calls.
The Engineer · Build desk

What happened
- The study traced ReAct-style agents end to end, running Claude Code through Harbor against Gemma and Qwen served on vLLM and correlating agent trajectories with request-level serving traces.
- Across the traced configurations, decode accounted for 91.0 to 98.6 percent of LLM time, leaving prefill a minority share of the work.
- Empirical context-cache hit ratios on input tokens ran from 84.6 to 99.5 percent, meaning most of each turn's prompt was already resident from the turn before.
- Context growth did not track turn count: SWE-bench Pro accumulated the largest contexts at 69K to 80K tokens on average while other benchmarks held the extreme turn-count tails.
- Tool calls followed a temporal order, with agents reading and exploring early in a run and shifting to execute and write behavior later.
Why it matters
- constraint The ceiling on concurrent agents becomes KV memory residency across idle tool-call gaps, so buying prefill throughput addresses a phase that barely appears in the trace.
- cost Whoever rents the GPU absorbs eviction as recomputed history that yields no new tokens, and the charge lands on the turn after the decision was made.
- decision Harness authors who compact or summarize a transcript are choosing to invalidate a cache, and that trade now has a measurable price rather than a vague one.
- capability A session's position in its trajectory becomes a usable predictor of the next tool class, which a scheduler could act on when deciding what to keep resident.
A ReAct turn arrives at the server looking almost exactly like the previous one. Same system block, same tool schemas, same transcript of earlier thoughts and observations, with one tool result appended at the end. Prefix caching keeps the KV blocks up to the point where the two prompts diverge, and that point sits near the very end. Prefill only pays for that tail, while generation carries the rest of the work, and that split is why the traced runs put nearly all LLM time in decode [3]. The paper's framing is that this is a different animal from conventional long-prompt serving [13], and the mechanism backs that up: the long prompt is already in memory.
The arithmetic across the two ends of the measured hit range is worth doing, using SWE-bench Pro's average accumulated context as the stand-in [7][8]. At a 99.5% hit ratio, an 80K-token prompt needs roughly 400 tokens of fresh prefill per turn [15]. At 84.6%, the same prompt needs about 12,300 [16]. That is thirty times the prefill work for an identical context, decided by whether the blocks were still resident [17]. A fully cold prefix is worse, because the whole 80K gets recomputed, 200 times the best case [18]. Mixing a per-benchmark context size with an across-configuration hit rate makes that illustrative rather than measured, but the shape holds at whatever context size you substitute.
For the numbers to transfer to your stack, the prompt prefix has to be byte-stable turn over turn. A clock in the system prompt will do it. So will a tool list serialized in map iteration order, or a retrieval block prepended above the transcript, because each moves the divergence point to the top and takes the hit ratio with it. The state also has to survive the gap while the tool runs, which is dead time the blocks spend holding memory without producing tokens.
The paper flags the practical limit itself. Achieving decode-dominated execution is hard because concurrent agents with long multi-turn contexts can exceed GPU capacity, and the sentence in the copy I have stops at "can exceed GPU" [5], so I will not put a number on the ceiling.
Re-entry count multiplies the exposure. On ADE-Bench, Gemma Thinking averaged 18.0 turns while Gemma Instant averaged 108.8, with one trajectory reaching 786 [9]. Six times the turns is six times the number of moments the session's state has to still be there when the model comes back [19]. A 786-turn trajectory is something only a benchmark harness would sit through.
The instrumentation that follows from this is per-session rather than per-fleet: prefix hit ratio, and the interval between an eviction and the next re-entry that needs the evicted blocks. Aggregate tokens per second will look healthy while individual agents quietly re-prefill their entire history.
What to watch
- Whether a later version of the paper quantifies the concurrency ceiling the truncated sentence points at: how many long-context sessions fit on one GPU.
- Whether vLLM or a hosted API exposes per-session prefix hit ratio and eviction events as first-class metrics rather than fleet aggregates.
- Whether harness authors publish the measured hit-ratio cost of their context compaction step.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence58
- Adoption25
- Hype gap+12
- Incentives
- Insufficient
- Confidence55
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
The paper characterizes ReAct-style agents from both the LLM-serving and tool-execution perspectives using an end-to-end tracing infrastructure across reasoning and non-reasoning Gemma and Qwen configurations on five agentic benchmarks.
- [2]
The tracing infrastructure runs Claude Code agents through Harbor, serves Gemma and Qwen models with vLLM, and correlates agent trajectories with request-level serving traces.
- [3]
Decode dominates 91.0 to 98.6 percent of LLM time in the traced agentic runs.
- [4]
Tool use has a clear temporal structure, with agents shifting from read/explore behavior early in execution to execute/write behavior later.
- [5]
The paper states that achieving decode-dominated execution in practice can be challenging because concurrent agents with long multi-turn contexts can exceed GPU capacity; the source text breaks off mid-sentence at "can exceed GPU".
- [6]
The authors focus on ReAct-style agents because they are simple, widely used, and closely match the serving loop of systems such as Claude Code, Codex and OpenClaw.
- [7]
Most input tokens are reused across turns, yielding empirical cache-hit ratios of 84.6 to 99.5 percent.
- [8]
SWE-bench Pro has the largest accumulated contexts of the suite, averaging 69K to 80K tokens, despite other workloads having more extreme turn-count tails.
- [9]
On ADE, Gemma Thinking averaged 18.0 turns versus 108.8 turns for Gemma Instant, whose maximum trajectory reached 786 turns.
- [10]
Efficient agent serving depends less on optimizing isolated long prompts and more on preserving long-lived KV cache state across turns; if this state is evicted, a decode-dominated workload can become expensive recomputation.
- [11]
The benchmark suite spans data analytics, general assistant tasks, software engineering and terminal environments using ADE-Bench, DABstep, GAIA, SWE-bench Pro and Terminal-Bench 2.0.
- [12]
Agentic workloads are long-tailed in two distinct ways: some tasks require many turns, while others accumulate large contexts with fewer turns.
- [13]
The paper concludes that agentic workloads are not simply long-prompt workloads and that agentic LLM serving is not conventional long-prompt serving given an effective context cache design.
- [14]
Everything outside decode, prefill included, accounted for 1.4 to 9.0 percent of LLM time.
- [15]
At the top of the measured hit range, an 80K-token accumulated context requires about 400 tokens of fresh prefill per turn.
- [16]
At the bottom of the measured hit range, the same 80K-token context requires about 12,300 tokens of fresh prefill per turn.
- [17]
The gap between the two ends of the measured hit range is about thirty times the per-turn prefill work for an identical context.
- [18]
Recomputing a fully evicted 80K-token context is about 200 times the prefill work of the best-case cached turn.
- [19]
Gemma Instant averaged about six times as many turns as Gemma Thinking on ADE.
Sources
1 independent publisher whose own reporting we read for this story.
- arxiv.orgAgentic AI Workload Characteristics
1 article · August 29, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.