TL;DR
This paper introduces a framework for scaling test-time compute in long-horizon agentic coding by shifting the focus from raw interaction traces to compact, structured summaries. By combining Recursive Tournament Voting (RTV) for selection and Parallel-Distill-Refine (PDR) for sequential reuse, the authors achieve significant performance gains on benchmarks like SWE-Bench Verified, demonstrating that how we represent and select from prior experience is the key to unlocking agentic scaling.
What Problem Does This Paper Address?
Test-time scaling—the practice of spending more compute during inference to improve model outputs—has been highly successful for short-form tasks like mathematical reasoning (e.g., "Best-of-N" sampling). However, applying these techniques to agentic coding is difficult.
In agentic coding, a model doesn't just output a code block; it interacts with a terminal, reads files, runs tests, and reacts to errors over dozens or hundreds of steps. These "rollouts" are long, noisy, and full of low-signal details. Standard scaling methods struggle because:
- Comparison is hard: It is difficult for a model to rank two 50-step trajectories filled with terminal logs.
- Reuse is hard: Replaying a full interaction history to "refine" an attempt quickly exhausts the model's context window.
The authors argue that the bottleneck isn't just generating more attempts, but finding a way to represent, select, and reuse the best parts of those attempts.
Methods
The core innovation is converting every rollout into a compact, structured summary that captures salient hypotheses, progress, and failure modes while discarding the "noise" of raw logs. This summary acts as the primary interface for two scaling strategies:
- Recursive Tournament Voting (RTV): Instead of asking a model to rank 16 candidates at once (which is error-prone), RTV organizes a "tournament." Candidates are compared in small groups (e.g., pairs), and the winners advance to the next round. This recursive approach makes the selection task much easier for the LLM judge.
- Parallel-Distill-Refine (PDR): This is a sequential scaling method. The agent performs an initial set of parallel rollouts (Iteration 0), selects the best ones using RTV, and then starts a new set of rollouts (Iteration 1) that are conditioned on the summaries of those successful Iteration 0 attempts.
The authors combine these into a unified pipeline: Unified PDR + RTV pipeline
Datasets
The researchers evaluated their method on two primary agentic coding benchmarks:
- SWE-Bench Verified: A subset of the popular SWE-Bench consisting of 500 real-world GitHub issues with human-verified unit tests.
- Terminal-Bench v2.0: A benchmark focused on hard, realistic tasks in command-line interfaces (using the "Terminus 1" harness).
They tested these methods across a suite of frontier models, including Claude 4.5 Opus, Gemini 3.1 Pro, and GPT-5 (0825).
Key Insights and Ideas
- Summaries > Raw Traces: Structured summaries consistently outperformed raw trajectories as objects of comparison. They preserve the "why" and "what happened" without the "noise," making them better substrates for LLM-based judging.
- Small Groups Win: The "tournament" structure of RTV is crucial. The authors found that pairwise comparisons (Group Size $G=2$) yielded the strongest results, suggesting that LLMs are much better at local, binary decisions than global rankings.
- Refinement Increases Efficiency: Surprisingly, Iteration 1 rollouts (those conditioned on prior summaries) were significantly shorter than Iteration 0 rollouts. For Claude 4.5 Opus, the average steps dropped from ~41 to ~14. This suggests that "learning" from prior attempts helps the agent reach a solution (or a definitive failure) much faster.
- Diversity is a Double-Edged Sword: While refinement improves the average quality of rollouts, it can also collapse diversity. The authors found that conditioning on a subset of $K$ diverse summaries (rather than just the single best one) helped maintain the "intra-task heterogeneity" needed to find a solution.
Key Results
The PDR+RTV method yielded consistent, substantial improvements across all models and benchmarks:
- Claude 4.5 Opus: Improved from 70.9% → 77.6% on SWE-Bench Verified and a massive 46.9% → 59.1% on Terminal-Bench v2.0.
- Gemini 3.1 Pro: Saw gains from 72.3% → 76.6% on SWE-Bench Verified and 52.5% → 64.8% on Terminal-Bench v2.0.
Crucially, the authors showed that these gains were not just due to "more tokens." When compared against compute-matched baselines like Best-of-N or simple Self-Consistency, the RTV+PDR approach remained superior.
Limitations and Future Work
- Cost of Judging: The method is token-intensive. Judgments (the "voting" part of the tournament) accounted for 88–95% of the total tokens consumed.
- Diminishing Returns: The authors only explored refinement up to two iterations ($T=2$). They noted that as refinement raises the mean performance, it also contracts diversity, suggesting that scaling further might require explicit diversity-preserving techniques.
- Judge Quality: The system's performance is heavily dependent on the quality of the LLM judge. The authors suggest that training models specifically for group-level rollout selection (via SFT or RL) could further improve RTV.
Summary updated