Practical technical guides / Recent development: arXiv 2611.08902 (6 November 2026), prefix-cache collapse in agent serving

A Burst of Agent Sessions Can Leave a Prefix Cache Missing Every Turn: Why a Session Cap Restores Reuse

A 6 November 2026 paper found a 200-session burst left serving engines at zero prefix-cache hits in all 30 runs; a session cap prevented it. The loop, and how to size a cap.

By Sandeep Belgavi · Published 2026-11-10

How a burst traps a prefix cache
Original explanatory diagram; synthetic values where shown.

A 6 November 2026 paper found a 200-session burst left serving engines at zero prefix-cache hits in all 30 runs; a session cap prevented it. The loop, and how to size a cap.

A load you served yesterday

Agent workloads lean on prefix caching. Each turn of an agent session sends the previous context plus the new tool output, so if the serving engine still holds the key-value (KV) state for the previous turn, it prefills only the new tokens. That is what makes long agent sessions affordable.

A preprint submitted on 6 November 2026 by Akshat Valse and Ali Jannesari, "Inside the Trap: A Renewal Law for Prefix-Cache Collapse in LLM Agent Serving" (arXiv 2611.08902v1), describes how this can fail. A burst of new sessions can push an engine into a state where every turn misses the cache and the backlog does not drain, at a load the same engine served without trouble before the burst. The paper also reports a remedy that held in every test the authors ran: a client-side cap on concurrent sessions.

This article explains the feedback loop, summarises what the paper measured and under which conditions, and turns it into practical steps for anyone serving agents behind a prefix cache. The figures are the paper's; the companion model and interactive lab are original and reproduce the mechanism, not the paper's numbers. Sources are dated on or before 10 November 2026.

The feedback loop

The paper's own workload makes the asymmetry concrete. In its synthetic sessions, a turn that hits the cache prefills about 551 tokens and a turn that misses prefills about 11,100, and a session's prefill work with every turn missing is about 16 times the work with every follow-up hitting.

The loop then goes like this:

  1. While a session waits for a tool call (about 5 seconds on average in the paper's workload), its KV sits idle in the pool.
  2. A burst of new sessions arrives. Admitting their prompts needs KV space, so the engine evicts idle KV, least recently used first.
  3. Sessions return from their tool calls and find their prefix gone. Each miss prefills the whole context, which takes many times longer than a hit.
  4. Longer service means a longer queue, so the gap between a session's turns grows. A longer gap means its KV is idle for longer and more likely to be evicted before it returns.
  5. The engine settles into a state where nearly every turn misses, at a load it handled when most turns hit.

The trap is stable because the cause (long gaps between turns) and the effect (misses that make service slow) feed each other. Removing the trigger does not end it.

What the paper measured

The tests ran SGLang 0.5.22 and vLLM 0.32.0 serving Qwen2.5-7B-Instruct or Llama-3.1-8B-Instruct on one A100 80GB or one H200 NVL, mostly with the KV pool capped at 300,000 tokens, with synthetic sessions (random token ids, no shared prefixes, exponential 5-second tool times). Each paired test ran three arms on the same arrival plan: a burst of 200 sessions within 60 seconds at 1,200 seconds, the same stream without the burst, and the burst behind a client-side session cap from the start.

The reported outcomes:

  • In the five registered paired tests, the burst left the engine at zero cache hits until the end of the run in all 30 burst runs, 7,500 seconds after the burst, at arrival rates every matched no-burst run carried for the full 8,700 seconds.
  • A client-side session cap, sized by the authors from each cell's calibration, prevented the trap in all 30 capped runs, at the cost of admission delay at the client (405 to 471 seconds on average in the main test).
  • Engaged inside an established trap, a session cap rescued 9 of 9 trapped runs at the same offered load without shedding a session, and the engine stayed healthy after the cap was removed. Refusing new arrivals also drained traps, but only by shedding 355 to 378 sessions.
  • A dose-response test placed the boundary between bursts of 40 and 60 sessions in every seed. A tool slowdown with no burst could also trap the engine.
  • The trap outlived its trigger: across about 100 trapped hours, no run under request-level first-come-first-served scheduling escaped on its own, and in runs where every burst session had already left, later turns still had essentially no hits.

The authors are explicit about the limits: synthetic sessions, dense 7 to 8 billion parameter models, one GPU per engine, and a theory of an idealised trapped state that they do not prove the engine converges to. Their analysis also warns that the throughput measured inside a trap overstates the load at which it would recover, so cutting arrivals to just below the trapped throughput need not clear it.

The mechanism in a small model

The companion model is deliberately simple: one server prefills one turn at a time, sessions of 12 turns grow by 650 tokens per turn from a 4,000-token start, tool calls average 5 seconds, the KV pool holds 300,000 tokens, and eviction is LRU over whole sessions. With those settings the server can finish about 1.25 sessions per second when follow-up turns hit and about 0.21 when every turn misses.

Model run (one hour, 0.5 sessions per second)Follow-up hit fraction in the last 5 minutesSessions in the system at the end
No burst1.027
200-session burst at 900 s01,339
Burst, cap of 40 sessions from the start0.99927
Burst, cap of 40 engaged at 1,800 s0.97240, with 261 waiting at the client
Burst, cap of 50 engaged at 1,800 s0.23250, with 923 waiting at the client

The same load is healthy or trapped depending only on history. A cap prevents the trap and, engaged later, rescues it, because it limits how many sessions compete for KV at once: with at most 40 sessions in the system their KV fits, turns hit again, service gets fast, and the backlog at the client drains. A cap of 50 is too loose for this pool, which is the practical lesson: the cap must be sized from the pool, not chosen by feel. The interactive lab lets you change every input and watch the per-window hit fraction.

Practical steps

Measure the right things. Track the share of follow-up turns that hit the prefix cache, separately from first turns, and the time between a session's turns. Most engines expose cache hit metrics; a falling follow-up hit rate with a growing inter-turn gap is the signature of the trap. Prefill tokens per second rising while completed sessions fall is another.

Know your all-miss capacity. Measure, or estimate, how many sessions per second the engine completes when every turn misses (the paper measures it with the radix cache disabled). Treat any steady load above it as running on the cache's goodwill: fine in the good state, unrecoverable once trapped.

Cap concurrent sessions at the client or gateway. Admit a new session only when the count of active sessions is below a cap, and let others wait in a queue you control. A session holds its slot through its tool calls, because the point is to keep its KV useful. Size the cap so that the KV of all admitted sessions at their typical length fits in the pool with room for prefill; in the companion model, 40 sessions of about 7,700 tokens on average need roughly the 300,000-token pool and the cap works, while 50 overshoot it and the cap does not rescue the trap.

class SessionGate:
    def __init__(self, cap):
        self.cap, self.active, self.waiting = cap, set(), collections.deque()

    def request_start(self, session_id):
        if len(self.active) < self.cap:
            self.active.add(session_id)
            return True
        self.waiting.append(session_id)
        return False

    def finish(self, session_id):
        self.active.discard(session_id)
        while self.waiting and len(self.active) < self.cap:
            self.active.add(self.waiting.popleft())   # admit in arrival order

Smooth bursts at the source. Batch jobs that start hundreds of agent sessions at once (a nightly review of every open CASE record, for example) should ramp up rather than start together. A ramp is a cap with a schedule.

Have a recovery runbook. If the follow-up hit rate collapses and stays down, engage the cap rather than only cutting arrivals; the paper's rescue tests and the model agree that restoring reuse is what ends the trap. Expect client-side waiting while the backlog clears and say so in the user interface.

Tradeoffs

A cap moves waiting from the engine to the client. Users wait before their session starts instead of waiting on every turn, which is usually better for agents and worse for very short interactive sessions. A cap set too low wastes capacity in the good state; set too high it does not protect the pool. Engines with smarter scheduling (the paper notes SGLang's longest-prefix-match ordering escaped in some runs) reduce but do not remove the need, and the cap is cheap to add outside the engine.

When this does not apply

Single-turn workloads, sessions whose prefixes are shared across users (a long common system prompt is handled differently from per-session context) and deployments whose KV pool is far larger than the working set of active sessions are unlikely to see this. The trap needs many multi-turn sessions, tool waits long enough for eviction to matter, and a pool that is not much larger than what the active sessions need.

Interactive experiment

Prefix cache trap: a session burst, LRU eviction and a session cap. Synthetic browser-local fixtures, adjustable inputs, decision traces and JSON export.

Primary references and authorship

Sources dated on or before 10 November 2026. Original explanation and synthetic examples by Sandeep Belgavi. Companion code: Sandeep-BA/agent-decision-lab/examples/python/prefix_cache_trap_model. Views are my own and do not represent any employer, past or present.