Canopy: Tree-Aware Rollout Scheduling for Agent Reinforcement Learning
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.