← Yitong Li Research notes · RL systems
Research notes · November 2026

Stale KV, Long RolloutsKV-Cache Staleness in Fully Asynchronous Agentic RL

The prefix cache remembers old weights. What that does to long agentic rollouts, and what fully asynchronous RL costs when the policy itself is stale.

TL;DR
  • In async RL for multi-turn agents, most of each turn’s context is served from the prefix cache, and common stacks never invalidate that cache when weights change. A shared system-prompt KV can stay at version 0 for the whole run.
  • Stale KV whose age is bounded is harmless in every setting we measured. Stale KV whose age is unbounded causes rare, late, irreversible collapses. On a 0.6B tool-use task, 9 of 15 seeds failed within 3,000 steps against 0 of 25 for clean cache policies. On a 4B multi-turn task, 10 of 13 runs collapsed when KV could age past 64 weight updates, against 0 of 15 when the age was capped at 64 or less.
  • The fix is cheap: give the engine fresh KV after weight updates, either at every update or at least every ≤ 64 updates. Importance-sampling corrections do not help, and the served training reward does not show the failure.
  • Policy staleness behaves the same way: runs that survive pay nothing, but the share of seeds that collapse rises with lag (0% → 20% → 42% → 71% → 100% for lag 0/2/4/6/≥8 at lr 2e-6). Lowering the learning rate or scaling the model removes it, and async then buys 2.3–3× fewer GPU-hours at equal accuracy.

01Why the cache is part of the policy

Synchronous RL alternates: generate a batch, train on it, push the new weights to the inference engines, generate again. Nothing is stale, but generation and training wait for each other. Fully asynchronous RL keeps the engines generating while the trainer updates; every time new weights are pushed (a refit), the policy version goes up by one. The throughput gain is large, and so is the bookkeeping question it raises: which weights produced what?

For multi-turn agents the answer is more tangled than it looks. Each turn re-submits the whole conversation, and the inference engine serves most of it from its prefix cache: in our agent workloads, 95–99% of each turn’s input tokens are cache hits. The mainstream stacks we instrumented (NeMo-RL, open-instruct, AReaL with SGLang) keep that cache across weight updates. With version tags on every token and KV block, we confirmed that a weight update never resets the prefix cache, and that NeMo-RL’s recompute_kv_cache_after_weight_updates is a no-op while requests are running. With the default settings, the KV of the shared system prompt had an age of 297–299 versions at step 300: it was computed by the initial weights and never again. 99% of tokens attended to some stale KV, and 41% of the attention mass fell on that one stale prefix.

Policy lag

Which weights sampled the token?

The trainer at version v receives tokens sampled at v − k. Frameworks cap k (max_trajectory_age in NeMo-RL, eta in AReaL). With in-flight weight updates, one trajectory can contain tokens from several versions, so the lag has to be tracked per token.

KV age

Which weights computed the KV it attended to?

Two sources: the episode’s own earlier turns (bounded by how many versions the episode spans), and prefixes shared across episodes, like the system prompt and tool specs. If the shared prefix is never refreshed, its age grows with training and has no bound.

Servedinference engine,weights vnSystem + toolsKV from v0Earlier turns, tool outputKV from vn−3 … vn−1This turnsampled by vnKV age = nunbounded if never refreshedKV age 1–3bounded by the episode’s spanOptimisedtrainer,weights vn+2Same contextall KV recomputed by vn+2Same tokensscored by vn+2policy lag= 2 versionsThe tokens were sampled from “vn weights over mixed-age KV”, a policy the trainer never computes.Served · inference engine at vnSystem + toolsKV from v0age n, unboundedEarlier turns, tool outputKV from vn−3 … vn−1age 1–3This turnsampled by vnpolicy lag = 2 versionsOptimised · trainer at vn+2Same contextall KV recomputed by vn+2Same tokensscored by vn+2The tokens were sampled from “vn weightsover mixed-age KV”, a policy the trainernever computes.
Figure 1What a token in an agentic rollout actually conditioned on. The served policy is “new weights reading KV written by old weights”. The trainer recomputes every logprob with its own weights and fresh KV, so the gradient is computed for a policy that never generated the data. Policy lag is the gap between the two rows; KV age is the gap within the top row.

The distinction matters because the usual off-policy machinery addresses only the first kind. Importance sampling reweights tokens by πtrain/πbehaviour, which corrects for which weights sampled a token. It assumes the behaviour policy is a policy the trainer could evaluate. “Version-n weights reading a version-0 system prompt” is not one of those, and, as we show below, the two can drift apart in ways that matter.

Three ways to treat the cache at a refit

keep
Do nothing. All cached KV is reused across versions. This is the default in the stacks above, and it lets the shared prefix age with training.
flush
Fresh KV after every weight update. No KV computed by old weights is reused once new weights land. This is the clean reference, and the most expensive option (Section 6 covers a cheaper way to implement it).
per-episode salt
Put the episode ID into the cache key. Nothing is shared across episodes, so the system prompt is always fresh, but each episode’s own history is still reused across versions.

Two variants appear later: flush every N keeps the cache but clears it every N refits, so KV age never exceeds N; frozen v0 pins the shared header to the initial weights, as an amplifier.

What policy lag looks like in a real system

Frameworks record one lag number per trajectory: how many versions behind the trainer it was when it started. That is the quantity the age cap (max_trajectory_age) bounds. In all 40 runs below it sat exactly at the cap for 100% of steady-state sequences, so on its own it says nothing. What the trainer actually consumes is the lag of each token, and that depends on the hardware balance as much as on the cap.

Setup. Qwen3-8B in thinking mode on DAPO math, 16 prompts × 8 samples per step, up to 16k output tokens, NeMo-RL with vLLM, with a version tag on every sampled token. We swept five generator/trainer splits (different node counts, plus an injected trainer delay to reach the far right) × age cap 1, 2, 5, 8 × in-flight weight updates on or off. That gives 40 short runs of 12–36 steps, which measure distributions and throughput, not learning.
cap 1cap 2cap 5cap 8in-flight updates off (any cap)
Tokens exactly at the cap0%25%50%75%100%0.20.51251020← generation-boundtraining-bound →trainer time ÷ generator time per step (log)share of tokensin-flight updates off: every token exactly at the cap, for all caps and ratios (19/19 runs)cap 1, ratio 0.19: 75% of tokens at the capcap 1, ratio 0.34: 85% of tokens at the capcap 1, ratio 0.67: 92% of tokens at the capcap 1, ratio 1.21: 98% of tokens at the capcap 1, ratio 3.63: 100% of tokens at the capcap 2, ratio 0.28: 22% of tokens at the capcap 2, ratio 0.44: 57% of tokens at the capcap 2, ratio 0.88: 67% of tokens at the capcap 2, ratio 2.42: 98% of tokens at the capcap 2, ratio 6.42: 100% of tokens at the capcap 5, ratio 0.27: 0% of tokens at the capcap 5, ratio 0.78: 1% of tokens at the capcap 5, ratio 1.50: 2% of tokens at the capcap 5, ratio 5.90: 98% of tokens at the capcap 5, ratio 15.40: 100% of tokens at the capcap 8, ratio 0.27: 0% of tokens at the capcap 8, ratio 1.15: 0% of tokens at the capcap 8, ratio 2.36: 21% of tokens at the capcap 8, ratio 9.59: 85% of tokens at the capcap 8, ratio 24.19: 100% of tokens at the cap
Mean token lag, as a share of the cap0%25%50%75%100%0.20.51251020← generation-boundtraining-bound →trainer time ÷ generator time per step (log)mean lag ÷ capin-flight updates off: every token exactly at the cap, for all caps and ratios (19/19 runs)cap 1, ratio 0.19: mean lag 0.75 versions (75% of cap)cap 1, ratio 0.34: mean lag 0.85 versions (85% of cap)cap 1, ratio 0.67: mean lag 0.92 versions (92% of cap)cap 1, ratio 1.21: mean lag 0.98 versions (98% of cap)cap 1, ratio 3.63: mean lag 1.00 versions (100% of cap)cap 2, ratio 0.28: mean lag 1.08 versions (54% of cap)cap 2, ratio 0.44: mean lag 1.51 versions (75% of cap)cap 2, ratio 0.88: mean lag 1.65 versions (82% of cap)cap 2, ratio 2.42: mean lag 1.98 versions (99% of cap)cap 2, ratio 6.42: mean lag 2.00 versions (100% of cap)cap 5, ratio 0.27: mean lag 1.08 versions (22% of cap)cap 5, ratio 0.78: mean lag 2.60 versions (52% of cap)cap 5, ratio 1.50: mean lag 2.91 versions (58% of cap)cap 5, ratio 5.90: mean lag 4.98 versions (100% of cap)cap 5, ratio 15.40: mean lag 5.00 versions (100% of cap)cap 8, ratio 0.27: mean lag 1.26 versions (16% of cap)cap 8, ratio 1.15: mean lag 2.97 versions (37% of cap)cap 8, ratio 2.36: mean lag 6.43 versions (80% of cap)cap 8, ratio 9.59: mean lag 7.84 versions (98% of cap)cap 8, ratio 24.19: mean lag 8.00 versions (100% of cap)
Figure 2Per-token policy lag across operating points. With in-flight updates off, a trajectory runs on one version from start to finish and every token sits exactly at the cap, whatever the hardware. With them on, the cap is only an upper bound. When generation is the bottleneck, tokens are much fresher than the cap. Once training is the bottleneck, almost every token is pinned at it.

The same mechanism can be explored at the level of whole episodes. The simulator below keeps only the quantities that set staleness: the window η, how long episodes take and how heavy their tail is, how many episodes can generate at once, and how long a training step takes. Every change re-runs 80 training steps in the browser.

InteractivePick a preset, then move the sliders. The regime label, the summary numbers and all four charts update together. Open it on its own page.

A large cap does not by itself mean a large lag. At cap 8 on a generation-bound split, the mean token lag was 3.0 versions and no token reached the cap: the engines’ concurrent-sequence slots (128 per engine) fill before the cap binds, and extra in-flight batches just queue. The transition is sharp, and it sits where throughput is best.

cap 1cap 2cap 5cap 8envelope over caps
Seconds per step (lower is better)801201602000.20.51251020← generation-boundtraining-bound →trainer time ÷ generator time per step (log)seconds per steplower envelope: fastest cap at each ratiocap 1, ratio 0.19: 192.3 s/stepcap 1, ratio 0.34: 127.9 s/stepcap 1, ratio 0.67: 127.6 s/stepcap 1, ratio 1.21: 113.5 s/stepcap 1, ratio 3.63: 199.0 s/stepcap 2, ratio 0.28: 186.6 s/stepcap 2, ratio 0.44: 105.0 s/stepcap 2, ratio 0.88: 102.8 s/stepcap 2, ratio 2.42: 105.0 s/stepcap 2, ratio 6.42: 196.6 s/stepcap 5, ratio 0.27: 184.7 s/stepcap 5, ratio 0.78: 97.6 s/stepcap 5, ratio 1.50: 93.9 s/stepcap 5, ratio 5.90: 101.5 s/stepcap 5, ratio 15.40: 191.4 s/stepcap 8, ratio 0.27: 180.0 s/stepcap 8, ratio 1.15: 92.0 s/stepcap 8, ratio 2.36: 83.2 s/stepcap 8, ratio 9.59: 102.6 s/stepcap 8, ratio 24.19: 191.6 s/steplower envelope · 83 s
Throughput (higher is better)6k8k10k12k14k0.20.51251020← generation-boundtraining-bound →trainer time ÷ generator time per step (log)trained tokens / supper envelope: best cap at each ratiocap 1, ratio 0.19: 5,983 tokens/scap 1, ratio 0.34: 9,016 tokens/scap 1, ratio 0.67: 9,043 tokens/scap 1, ratio 1.21: 10,262 tokens/scap 1, ratio 3.63: 5,856 tokens/scap 2, ratio 0.28: 6,226 tokens/scap 2, ratio 0.44: 11,028 tokens/scap 2, ratio 0.88: 11,201 tokens/scap 2, ratio 2.42: 10,962 tokens/scap 2, ratio 6.42: 5,920 tokens/scap 5, ratio 0.27: 6,090 tokens/scap 5, ratio 0.78: 11,559 tokens/scap 5, ratio 1.50: 11,961 tokens/scap 5, ratio 5.90: 11,049 tokens/scap 5, ratio 15.40: 5,881 tokens/scap 8, ratio 0.27: 6,147 tokens/scap 8, ratio 1.15: 11,955 tokens/scap 8, ratio 2.36: 13,215 tokens/scap 8, ratio 9.59: 10,858 tokens/scap 8, ratio 24.19: 5,737 tokens/supper envelope · 13.2k
Figure 3Step time and throughput with in-flight updates on. Every cap is U-shaped, because lopsided hardware leaves one side idle. The envelope bottoms out at 83 s per step (13.2k trained tokens/s) near a ratio of 2.4, at cap 8; the best cap-1 point is 114 s. Turning in-flight updates off cost up to 64% per step at that point (83 → 136 s), and about 1% once training-bound.

So the fastest configuration is also the one where policy lag starts to bind. At cap 8, moving from a ratio of 1.2 to 2.4 cut the step time from 92 to 83 s and raised the mean token lag from 3.0 to 6.4 versions. Tuning the system for throughput pushes it toward the cap. Section 4 measures what each extra version of lag costs.

These are research notes, not a paper. They condense nine study tracks and about 800 training runs, from 0.6B to 235B parameters, on math with a Python tool, a multi-turn lookup task, terminal agents and multi-turn coding. Most arms have 3–15 seeds, horizons are 150–3,000 steps, and we tried only two or three learning rates per setting. Claims marked inference go beyond what we measured directly.

02The failure only shows up on long horizons

Setup. Qwen3-0.6B solves math problems with a multi-turn Python tool. AReaL runs fully async (lag ≤ 2) with SGLang on 2 A100s per run. Every episode shares a ≈ 300-token system + tool header. We compare keep, flush and per-episode salt, plus frozen v0. Under keep, the header is refreshed only as a side effect of job restarts. At lr 1e-6, keep got 15 seeds × 3,000 steps; the clean side got 25 seeds (20 with fresh KV, 5 with per-episode salt), most of them also run to 3,000 steps.

At lr 1e-6, which is close to what production recipes use, keep failed in 9 of 15 seeds, between steps 567 and 2,380. Frozen v₀ failed in 8 of 8. The 25 clean seeds (fresh KV and per-episode salt) had zero failures in 71.8k seed-steps. Keep versus clean: log-rank p = 6×10⁻⁶.

0%25%50%75%100%050010001500200025003000training stepseeds without a failureclean: fresh KV 0/20, per-episode salt 0/5keep: 9 of 15 seeds failed (steps 567–2380)frozen v0 header: 8 of 8 failed (steps 895–2732)keep seed failed at step 567keep seed failed at step 867keep seed failed at step 1193keep seed failed at step 1375keep seed failed at step 1682keep seed failed at step 1721keep seed failed at step 1754keep seed failed at step 2132keep seed failed at step 2380clean · 0/25keep · 9/15frozen v0header · 8/8keep failure stepsby step 1000 only1 of 15 keep seedshad failed0%25%50%75%100%0100020003000training stepseeds without a failureclean: fresh KV 0/20, per-episode salt 0/5keep: 9 of 15 seeds failed (steps 567–2380)frozen v0 header: 8 of 8 failed (steps 895–2732)keep seed failed at step 567keep seed failed at step 867keep seed failed at step 1193keep seed failed at step 1375keep seed failed at step 1682keep seed failed at step 1721keep seed failed at step 1754keep seed failed at step 2132keep seed failed at step 2380clean · 0/25keep · 9/15frozen v0header · 8/8keep failure steps
Figure 4Qwen3-0.6B, multi-turn tool use, lr 1e-6. Clean = fresh KV (20 seeds) and per-episode salt (5). Keep failure steps: 567, 867, 1193, 1375, 1682, 1721, 1754, 2132, 2380.

The averaged learning curves hide this. Keep reaches a clean GSM8K score of 0.75 as fast as flush (599 vs 553 steps). By step 1,000 only one keep seed had failed; by step 1,800, seven had. Keep seeds that never failed end exactly where flush does (0.80–0.84). A 500-step study with 3 seeds per arm would have reported “no effect”.

What a failure looks like

Each failure follows the same pattern. The engine-vs-trainer KL (we use the k3 estimator, E[r − 1 − log r]) grows exponentially, e-folding every 10–17 steps and going from below 0.04 to above 1 in about 40 steps. The training reward, computed on what the engine served, stays normal. The clean evaluation, which recomputes the header with the current weights, collapses: the model emits “N N N …”. We found no early warning in entropy, gradient norm or the early gap.

Train/inference k3log scale0.010.1110Served rewardwhat the dashboard shows00.51Clean evalGSM8K, fresh KV00.51step 1201: 0.786step 1301: 0.809step 1401: 0.812step 1501: 0.811step 1601: 0.817step 1701: 0.793step 1801: 0.072runaway flagged, step 175412001300140015001600170018001900training stepTrain/inference k3log scale0.010.1110Served rewardwhat the dashboard shows00.51Clean evalGSM8K, fresh KV00.51step 1201: 0.786step 1301: 0.809step 1401: 0.812step 1501: 0.811step 1601: 0.817step 1701: 0.793step 1801: 0.072runaway flagged, step 17541200140016001800training step
Figure 5One keep seed (lr 1e-6) around its failure. The served reward stays between 0.64 and 0.83 throughout, while a clean evaluation on the same weights falls from 0.79 to 0.07 within 100 steps. Anyone watching only the training dashboard would see a healthy run.

03KV age sets the risk, and bounding it is enough

Keep fails late, and “late” has two readings. Either the model has trained long enough to become fragile, or the shared header has grown old enough. In the keep runs the two clocks come apart by accident. Every job restart empties the engine’s cache, so the header is recomputed with the current weights and its KV age drops to zero, while training carries on from the same step. Restarts were driven by job scheduling, not by anything the model did. Figure 6 lays out every run at the production-like learning rate, together with three arms that flush the cache on a fixed schedule.

header KV age0900+ versionsfailure (runaway train/inference gap)keep: failure at step 1193, header KV age 493keep: failure at step 2132, header KV age 632keep: failure at step 1375, header KV age 575keep: failure at step 567, header KV age 567keep: failure at step 867, header KV age 867keep: failure at step 2380, header KV age 430keep: failure at step 1721, header KV age 721keep: failure at step 1754, header KV age 653keep: failure at step 1682, header KV age 481keeprefreshed only by restartsflush every 512: failure at step 815, header KV age 165flush every 512: failure at step 2362, header KV age 314flush every 512flush every 256: failure at step 1415, header KV age 135flush every 256: failure at step 2157, header KV age 109flush every 256flush every 6405001,0001,5002,0002,5003,000training step
Figure 6Every keep failure happened on an old header: at ages 430–867, never below 250, although keep runs spent 12.7k seed-steps there. The same seeds ran past step 2,000 without failing whenever a restart had just refreshed the header. Flushing every 64 versions kept every row pale and had no failure in 15k seed-steps. Qwen3-0.6B, multi-turn tool use, lr 1e-6.

Modelling the failure rate on both clocks at once, header age explains the failures (p = 10⁻⁴) and training step adds nothing once age is known (p = 0.30). Each additional 250 versions of age roughly triples the hazard. The mechanism is visible in the train/inference gap: it climbs steadily with header age, and every one of the 37 restart refreshes cut it, to 0.17× of its previous value on median, after which it grew back roughly as age0.6.

The gap grows with header age
0.0010.0030.010.030300600900header KV age (versions)k3, median (log scale)age 0–50: median k3 0.0014 (2,558 steps, 15 seeds)age 50–100: median k3 0.0028 (2,588 steps, 15 seeds)age 100–150: median k3 0.0037 (2,558 steps, 15 seeds)age 150–200: median k3 0.0044 (2,542 steps, 15 seeds)age 200–250: median k3 0.0054 (2,449 steps, 15 seeds)age 250–300: median k3 0.0060 (2,449 steps, 15 seeds)age 300–350: median k3 0.0066 (2,254 steps, 15 seeds)age 350–400: median k3 0.0073 (2,201 steps, 15 seeds)age 400–450: median k3 0.0074 (2,078 steps, 15 seeds)age 450–500: median k3 0.0084 (1,777 steps, 15 seeds)age 500–550: median k3 0.0090 (1,696 steps, 15 seeds)age 550–600: median k3 0.0089 (1,600 steps, 15 seeds)age 600–650: median k3 0.0093 (1,379 steps, 14 seeds)age 650–700: median k3 0.0123 (1,254 steps, 14 seeds)age 700–750: median k3 0.0136 (926 steps, 14 seeds)age 750–800: median k3 0.0164 (654 steps, 12 seeds)age 800–850: median k3 0.0209 (354 steps, 9 seeds)age 850–900: median k3 0.0241 (218 steps, 7 seeds)one restart cuts it to 0.17×(37 of 37 restarts)
So does the chance of failing
0%10%20%30%40%header KV age (versions)chance of failing in 250 steps0–2500%12.7k steps250–5007% (95% CI 1–18%), 3 failures in 10.8k seed-steps7%500–75017% (95% CI 6–35%), 5 failures in 6.9k seed-steps17%
Figure 7Keep, lr 1e-6. Below age 250: 0% (no failure in 12.7k seed-steps). Age 250–500: 7%. Age 500–750: 17%. For scale, all clean cache policies together had no failure in 71.8k seed-steps.

Age is the driver, but there is no safe threshold on age alone. Flushing every 512 or 256 versions still produced failures, at header ages of only 108–313 (Figure 6, middle rows). Only the tightest schedule, every 64 versions, had none.

Importance sampling cannot repair this. The effective sample size stayed at 0.96, and only 0.03% of tokens were rejected. The bias is not in individual token weights. It comes from the gap between the served policy (θ + stale KV) and the optimised policy (θ + fresh KV), and per-token ratios cannot see that gap. At 3e-6, no IS source we tried (engine logprobs, logprobs recomputed at the start, or none) made keep safe, and a [0.5, 2] band did not save frozen v₀ either.

The same bound on a larger model

Setup. Qwen3-4B in thinking mode on a multi-turn lookup-and-compute tool task (≈ 7 turns, ≈ 5k tokens per episode), SGLang with a custom trainer, 500 steps, lr 2e-6, 16 prompts × 8 samples, lag ≤ 2. Tool latencies are replayed from real coding-agent traces. Here we rebuild the version-0 header after every restart on purpose, so restarts cannot reset the age.

The picture repeats. Runs whose KV could age past 64 refits mostly collapsed (10 of 13). Runs with the age capped at 16, 32 or 64 refits never did (0 of 15; Fisher p = 2×10⁻⁵). Three caveats come with the bound:

Flushing only when the measured gap crosses a threshold was unreliable: at one threshold it fired too late in every run. A fixed cap is simpler and held up on both tasks.

04Policy staleness: the hazard rises with lag

Setup. Qwen3-4B (and 1.7B) on KodCode multi-turn coding: write code, run the visible tests in a sandbox, read the errors, fix, for up to 4 turns, with the full test suite as reward. NeMo-RL, one GB200 node per run, 222 runs. The key design is controlled lag injection: with in-flight updates off, every trained token is exactly k versions stale (k = 0 is synchronous). This gives a clean dose–response curve that does not depend on the hardware split. A collapse is an 8-step mean reward below 0.1.
0%25%50%75%100%024681216policy lag k (every token exactly k versions stale)seeds with a collapselr 1e-6, k=0: no collapse eventslr 1e-6, k=2: no collapse eventslr 1e-6, k=4: no collapse eventslr 1e-6, k=8: no collapse eventslr 1e-6, k=12: 38%38%lr 1e-6, k=16: 100%100%lr 2e-6, k=0: 0%lr 2e-6, k=2: 20%20%lr 2e-6, k=4: 42%42%lr 2e-6, k=6: 71%71%lr 2e-6, k=8: 100% (k ≥ 8)100% (k ≥ 8)0% (sync)lr 2e-6 (solid)lr 1e-6 (dashed)no collapse at k ≤ 80%25%50%75%100%024681216policy lag kseeds with a collapselr 1e-6, k=0: no collapse eventslr 1e-6, k=2: no collapse eventslr 1e-6, k=4: no collapse eventslr 1e-6, k=8: no collapse eventslr 1e-6, k=12: 38%38%lr 1e-6, k=16: 100%100%lr 2e-6, k=0: 0%lr 2e-6, k=2: 20%20%lr 2e-6, k=4: 42%42%lr 2e-6, k=6: 71%71%lr 2e-6, k=8: 100% (k ≥ 8)100% (k ≥ 8)0% (sync)lr 2e-6lr 1e-6none at k ≤ 8
Figure 8Dose–response of policy lag, Qwen3-4B coding. Median time to first collapse is 204 steps for k = 2 and 4, and about 70 steps for k ≥ 6, so low staleness fails late. Collapses take the form of verbose markdown or multilingual gibberish, which hits the length cap and gives zero reward. Qwen3-1.7B shows the same ordering.

Our working model is that the hazard depends on learning rate × staleness inference. It fits both families: at lr 1e-6 lag up to 8 is clean, while k = 12 collapsed 3/8 and k = 16 collapsed 5/5. At 4e-6 even synchronous training collapsed in 2 of 3 seeds. The KV-age results point the same way. With two or three learning rates per setting, this is a hypothesis, not a fitted law.

Common mitigations behaved as follows. ICE-POP and sequence-masked TIS did not help. A KL penalty of 0.01 kept runs stable but learned the least. Halving the learning rate worked.

05When runs survive: a quiet cost for stale KV, none for policy lag

Sections 2–4 were about collapses. This section asks what staleness costs in the runs that do not collapse. Here the two kinds of staleness part ways. A stale shared prefix quietly lowers how much the model learns. Policy lag costs nothing measurable, and buys a large cut in compute.

Stale KV: a quieter cost on long episodes

Setup. Qwen3-4B-Instruct-2507 on terminal tasks. To get long episodes we chain 5 tasks in one sandbox per episode (median 17 turns, 6.2k tokens, 130 s, spanning ≈ 2 versions). AReaL fully async (lag ≤ 8), 8 A100s per run, lr 1e-6, 400 steps, scored with fresh KV on 200 held-out tasks.
0.40.50.60.7clean held-out successkeep, run 1: 0.377keep, run 2: 0.388keep, run 3: 0.391keep, run 4: 0.455keep, run 5: 0.455keep, run 6: 0.469keep, run 7: 0.530seed 30.438keepn = 7flush, run 1: 0.446flush, run 2: 0.450flush, run 3: 0.513flush, run 4: 0.569flush, run 5: 0.583flush, run 6: 0.591flush, run 7: 0.603flush, run 8: 0.618flush, run 9: 0.6480.558flushn = 9per-episode salt, run 1: 0.592per-episode salt, run 2: 0.631per-episode salt, run 3: 0.6400.621per-episode saltn = 30.40.50.60.7clean held-out successkeep, run 1: 0.377keep, run 2: 0.388keep, run 3: 0.391keep, run 4: 0.455keep, run 5: 0.455keep, run 6: 0.469keep, run 7: 0.530seed 3keep0.438n = 7flush, run 1: 0.446flush, run 2: 0.450flush, run 3: 0.513flush, run 4: 0.569flush, run 5: 0.583flush, run 6: 0.591flush, run 7: 0.603flush, run 8: 0.618flush, run 9: 0.648flush0.558n = 9per-episode salt, run 1: 0.592per-episode salt, run 2: 0.631per-episode salt, run 3: 0.640per-episodesalt0.621n = 3
Figure 9Clean held-out success, mean over in-run evaluations at steps 300–399; one dot per run, bar = arm mean. The flush column pools both ways of implementing flush (Section 6). Keep is lower than the clean runs pooled (one-sided p = 0.002). Seed 3 is the only seed where keep beat the clean arms late, here and again in a separate setting where episodes spanned more versions.

Here keep did not collapse within 400 steps, but it learned less. The damage came from the shared version-0 prefix, not from the episode’s own 1–2-version-old history: per-episode salt keeps the stale own history and was the best arm. The first 100 steps showed no difference (p = 0.25), which again says the effect needs a long run to appear.

Policy lag: survivors pay nothing, and async is much cheaper

The coding runs that survive pay nothing. At step 400 the surviving k = 2 seeds are +0.6 ± 0.7 percentage points versus sync, and k = 4 is +0.1 ± 1.0. Policy lag does not make learning slower or worse. It makes it riskier, and once that risk is controlled, async is worth it.

a · Accuracy difference versus synchronous training, in percentage points (95% CI)
4B · fixed lag k = 2 · lr 2e-620 surviving seeds vs sync, step 400
+0.6% ± 0.7%
4B · fixed lag k = 4 · lr 2e-69 surviving seeds vs sync, step 400
+0.1% ± 1.0%
4B · in-flight age 4 · lr 1e-65 vs 5 seeds, step 800 · 2.3× cheaper
0.0% ± 1.0%
32B · async age 25 vs 5 seeds, step 400
−1.2%[−4.7%, +2.2%]
32B · async age 85 vs 5 seeds, step 400
−0.6%[−4.1%, +2.8%]
−4%−2%0%+2%+4%
b · Qwen3-32B: GPU-hours to reach step 400 (8 GB300 nodes)
Synchronous
193
Async, age 2
65
Async, age 8
40
Figure 10(a) Each row compares an async configuration with synchronous training at the same step. 4B rows use the sampled validation accuracy; 32B rows use a hard 88-problem held-out set. The 4B lr 2e-6 rows include surviving seeds only. Every interval covers zero. (b) At 32B, async age 2 runs 19.0 s/step against 56.5 s/step for sync (3.0×).

06A practical recipe

Cache policyConsistencyCostVerdict
Flush (fresh KV after every refit)Fresh KV; the clean reference in every study+10–16% prefill on coding; 2–3× keep’s prefill on multi-turn toolsRecommended
Implement it with version-tagged cache keys (below), and check the engine’s resume path.
Flush every ≤ 64 refitsMean per-token KV age ≤ 21Not measurableRecommended
0/15 and 0/5. Use a tighter cap at higher LR, e.g. ≈ 8 at 3e-6 inference.
Per-episode saltOwn history only, 1–2 versionsCheap on terminal tasks; prefix hits 0.998 → 0.058 on codingTask-dependent
Best arm on long terminal episodes.
IS clipping / masking——Does not help
The bias is invisible to per-token ratios.
Keep (default)Shared prefix age = training stepCheapestAvoid on long runs
Fine for short runs at low LR.

Flush does not have to clear the cache literally. If the weight version is part of the cache key, entries written under old weights are simply never hit again, while requests within one version still share prefixes. That gives the same fresh KV with 31% less prefill than a hard flush, preempts no running requests, and avoids the interrupt-and-resume path where the engine bug below lived.

Monitoring

Pitfalls that nearly changed our conclusions

07Open questions

Study tracks at a glance
QuestionModel and taskStackScale
Long horizon (§2)Qwen3-0.6B, multi-turn Python-tool mathAReaL (lag ≤ 2) + SGLang, 2 A100 / run161 runs, up to 3,000 steps × 15 seeds
Age cap (§3)Qwen3-4B thinking, multi-turn lookup + computeSGLang + custom trainer, lag ≤ 2≈ 90 runs × 500 steps
Long episodes (§5)Qwen3-4B-Instruct-2507, 5 chained terminal tasksAReaL (lag ≤ 8), 8 A100 / run38 runs, 400–800 steps
Policy lag (§4)Qwen3-4B / 1.7B, KodCode, ≤ 4 turnsNeMo-RL, 1 GB200 node / run222 runs, 400–800 steps
Scale (§5)Qwen3-4B / 8B / 32B codingNeMo-RL, disaggregated, in-flight updates; 32B on 8 GB300 nodes5 seeds / arm, up to 400 steps