Canopy: Tree-Aware Rollout Scheduling for Agent Reinforcement Learning

Feiyuan Zhang, Li Pengbo, Ziniu Li, Yuhao Jiang, Di Chai, Han Tian, Junhao Wang, Taiqiang Wu, Guanhua Huang, Chaoliang Zeng, Yihao Liu, Kai ChenNeurIPS 2026

TL;DR

Training LLM agents with reinforcement learning spends most of its wall-clock time generating trial-and-error conversations—yet today's serving systems suffer from structural amnesia, recalculating identical histories up to nearly eight times over. Canopy bridges the gap between the RL training controller and the LLM serving engine, grouping related trajectories together on the same GPU and budgeting memory based on the previous training step. The result is a system that eliminates nearly all wasted computation and speeds up rollout generation by up to 3.6× without altering a single weight or reward.

What Problem Does This Paper Address?

Imagine a team of detectives investigating the same case file, branching off to chase different leads, pausing to wait for lab results, and repeatedly re-reading their notes. This is what happens during the rollout phase of Reinforcement Learning (RL) for LLM agents: the model generates groups of multi-turn trajectories (sequences of actions and tool calls) that share massive chunks of input—either an initial prompt (as in GRPO) or an entire multi-turn history prior to a branching point. In typical workloads, 75–92% of input tokens have already been processed by an earlier request in the same step.

To avoid re-reading tokens from scratch—a heavy compute phase called prefill—LLM engines like vLLM store intermediate attention states in GPU memory (the KV cache). However, standard RL frameworks (like verl) treat every single turn as an isolated, anonymous web request. Because the serving layer is blind to the overarching RL structure, two expensive failures occur:

  1. Sibling Scatter: Branches from the same prompt or tree land on different GPUs, forcing multiple GPUs to compute and cache the exact same shared prefix.
  2. Overcommitment: A GPU admits more concurrent trajectories than its KV memory can hold. While an agent pauses to wait for an external tool (like a web search or code test), its history gets evicted from memory to make room for others—meaning the GPU has to recompute that entire history from scratch when the tool finally responds.
How request-level serving scatters siblings and overcommits memory compared to Canopy's group-level scheduling.

Because of these two blind spots, standard RL serving computes 2.5× to 7.9× the theoretical minimum prefill. Yet, ironically, the RL controller orchestrating the training already knows which requests belong to the same family, when they finish, and roughly how big they will grow.

Methods

Canopy fixes this by passing a tiny, four-part "rollout descriptor" alongside every request—containing the group ID, shared-prefix length, and flags indicating whether the trajectory or group is finished. Instead of scheduling individual requests or isolated trajectories, Canopy makes the group the fundamental unit of scheduling via two main mechanisms:

  • Group Placement: The first trajectory of a group is routed to the least-loaded GPU instance, and every subsequent branch or turn from that group is pinned to that exact same GPU. Shared prefixes are computed and cached once per step.
  • Group-level Admission Control: To prevent mid-rollout memory evictions, Canopy acts like a bouncer at the door, pausing queued or tool-waiting trajectories if admitting them would exceed the GPU's KV cache capacity. Crucially, its memory accounting counts a group's shared prefix only once for the group's entire lifetime, and estimates each trajectory's future private memory growth using the peak average memory observed in the previous RL training step.

Canopy also introduces lifetime-aware eviction (evicting finished trajectories immediately while holding soft references to active shared prefixes) and prefix-preserving preemption (protecting shared prefixes if a running request must be paused).

Datasets

Because live LLM outputs vary randomly from run to run, comparing scheduling policies fairly is tricky. The authors build a deterministic synthetic replay benchmark where request graphs—inputs, exact output lengths, tool latencies, and branching structures—are generated from fixed seeds and replayed identically across all baselines on Qwen3-8B.

The workloads are modeled on small samples of real Qwen3-8B agent trajectories across established benchmarks:

  • LongBench v2 (single-turn, long-context GRPO over 12–20k token documents)
  • FRAMES with a live web search API (multi-turn web search GRPO)
  • SWE-bench Verified (short and long software engineering agent tasks as boundary cases)
  • Local retriever tasks & Math reasoning (used for tree-search workloads, local search GRPO, and a short-input/long-output control workload)

Additionally, 300-step live RL training runs (using ARPO) were conducted to verify that scheduling changes do not affect learning accuracy.

Key Insights and Ideas

  • Clever cache eviction can't save an overloaded GPU: One of the paper's best "aha" moments comes from ablating their own design. Smart cache retention—protecting shared prefixes from eviction and preemption—changed rollout time by at most 3.5%. Why? Because in multi-turn search and coding tasks, 65–85% of reusable tokens aren't shared between siblings—they are a trajectory's own growing history. If you let 200 trajectories onto a GPU that can only remember 50, smart eviction order doesn't matter; histories will thrash. Stopping trajectories at the door (admission control) is what actually solves the problem.
  • Exploiting RL's Groundhog Day nature: General LLM serving engines can't easily do admission control because they don't know if a user prompt will spawn 100 tokens or 50,000 tokens over ten turns. Canopy exploits a unique property of RL: training repeats structurally similar steps hundreds of times in a row, making the previous step's peak memory usage a remarkably effective crystal ball.
  • When simple math beats Canopy: On the math control workload—where prompts are tiny and outputs are huge (1–8k tokens)—Canopy is actually 13% slower than verl. Charging trajectories upfront for their peak future output makes admission control overly conservative when inputs are cheap and memory doesn't need protecting across turns.

Key Results

Prefill overhead across workloads showing how baselines waste compute via cross-instance duplication and post-eviction recomputation.

Figure 2: Prefill computed in one rollout step as a multiple of the minimum (eight instances, median of three runs). Bars: verl, TreeSticky, and program-level scheduling (Prog.); hatched: duplicated on another instance; red: recomputed after eviction or preemption. Canopy computes 1.00–1.05× the minimum (dashed line).

Evaluated on eight H20 GPUs with Qwen3-8B:

  • Near-zero wasted prefill: Canopy computes 1.00–1.05× the theoretical minimum prefill across workloads (compared to verl's 2.5–7.9×).
  • End-to-end speedups: Across the five target workloads (turn-level trees, in-turn trees, local search, web search, and long-context GRPO), Canopy finishes rollout steps 1.64–3.61× faster than verl (geometric mean 2.14×), 1.21–2.84× faster than program-level scheduling (ThunderAgent style), and up to 2.07× faster than prefix-aware routing.
  • Extreme boundary & long-horizon cases: On long SWE-agent trajectories (up to 39k tokens), Canopy reaches a 4.29× speedup over verl. On synthetic 64k–122k token trajectories that branch late (after 4–19 turns), it remains 1.6–2.3× faster.
  • Zero tuning & zero accuracy loss: Without per-workload tuning, Canopy stays within 1% of (or beats) the best static concurrency caps chosen with hindsight, reduces engine preemptions from 14–82 per run down to at most 1, and shows no detectable difference in validation accuracy over 300 RL training steps.

Limitations and Future Work

  • Synthetic replay assumptions: The primary speed benchmarks use synthetic request graphs with hand-tuned ranges where exact request output lengths are known in advance (though an ablation with estimated lengths changed times by only −1.7% to +2.5%), and the "previous-step" memory estimate comes from a separate sample rather than a live, drifting policy.
  • Partial end-to-end integration: Group-level admission was evaluated in the standalone rollout driver rather than integrated directly into verl's live training loop, meaning full RL step times (including weight updates) with admission active were not measured.
  • Load imbalance with uneven trees: Because Canopy never splits a group across GPUs, workloads with wildly varying group sizes (e.g., mixing trees of 8, 16, and 32 leaves) lead to coarser load balancing, leaving the busiest GPU with 12–19% more requests than average.
  • Scope: Evaluation was limited to synchronous rollouts on a single GPU/engine type, leaving asynchronous RL frameworks, multi-agent setups, and context-compacting agents for future exploration.

Summary updated

Abstract

Reinforcement learning (RL) for LLM agents spends most of its time generating rollouts, and the requests of a rollout step share most of their input: GRPO samples share a prompt, tree branches share the history before the branch, and each turn re-reads earlier turns. RL frameworks send each turn to the serving stack as an independent request, so the stack computes a shared prefix on several instances and recomputes histories evicted while trajectories wait for tools; verl computes 2.5–7.9× the minimum prefill on our workloads. Yet the RL controller already knows which trajectories share a prefix, when they end, and how much memory the previous step needed. We present Canopy, a rollout scheduler that passes these facts to the serving stack and makes the group of trajectories sharing a prefix the unit of placement and memory accounting. Canopy keeps each group on one instance and starts or resumes a trajectory only when the instance can hold it, counting the group's shared prefix once and charging each trajectory at least the previous step's estimate. On five synthetic tree-rollout, search, and long-context workloads modeled on Qwen3-8B agent trajectories, Canopy finishes a rollout step 1.6–3.6× faster than verl and 1.2–2.8× faster than program-level scheduling, and it is 1.6–2.3× faster than verl on long-horizon trajectories that branch late.
BibTeX
@inproceedings{zhang2026canopy,
  author = {Feiyuan Zhang and LI Pengbo and Ziniu Li and Yuhao Jiang and Di Chai and Han Tian and Junhao Wang and Taiqiang Wu and Guanhua Huang and Chaoliang Zeng and Yihao Liu and Kai Chen},
  title = {{Canopy: Tree-Aware Rollout Scheduling for Agent Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=FPJ4b4JwEE},
}
Figure