From Patches to Trajectories: Privileged Process Supervision for Software-Engineering Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Supervised fine-tuning (SFT) on long teacher trajectories is the dominant way to instill investigation and reasoning in open software-engineering (SWE) agents. Since every retained response becomes an imitation target, the student inherits the final outcome and intermediate flaws, including ungrounded leaps and redundant loops. High-quality training data must be effective(each step is grounded and narrows the agent's epistemic gap to the correct fix) and efficient(each step is information-bearing rather than redundant or looping). Existing recipes filter or relabel teacher rollouts using only a binary terminal verifier, which does not directly target these axes and provides no supervision on instances where the teacher fails. Most real issue includes a developer-authored reference patch, p^star, revealing the file paths, runtime behaviors, and coding conventions presupposed by the correct fix, yet standard pipelines discard it. We propose Patches-to-Trajectories (P2T), which uses p^star as privileged information during curation and formulates trajectory construction as bi-objective optimization over per-step effectiveness and trajectory length. A reverse phase distills p^star into a latent process graph, G^star, of contextual facts and solution milestones. A forward phase curates trajectories from blinded teacher continuations by scoring per-step progress against G^star under a leakage-blocking groundedness check and retaining the shortest effective segments. Using only 1.8k curated SWE-Gym instances, P2T improves effectiveness and efficiency over outcome-filtered SFT and its tool-error-masking variant. On SWE-bench Verified, it raises Pass@1 by up to 10.8 points while reducing per-instance inference cost by ~15%, with consistent gains on SWE-bench Lite. Size-matched ablations and qualitative analysis further isolate trajectory quality from data scale.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 23 of its 28 references that are in the map. First posted on arXiv 21 May 2026.
Builds on
23 of 28 references.
Closest ancestors · 9
Same direction, newest first
- 2026GLM-5: from Vibe Coding to Agentic Engineering17 Feb
- 2025Reducing Cost of LLM Agents with Trajectory Reduction28 Sep
- 2025Skywork-SWE: Unveiling Data Scaling Laws for Software Engineering in LLMs24 Jun
- 2025SWE-smith: Scaling Data for Software Engineering Agents30 Apr
- 2025R2E-Gym: Procedural Environments and Hybrid Verifiers for Scaling Open-Weights SWE Agents9 Apr
- 2024Training Software Engineering Agents and Verifiers with SWE-Gym30 Dec
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
Other references · 14
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2025Qwen3 Technical Reportcited by 8,195
- 2023Let's Verify Step by Stepcited by 3,598
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2024SWIFT:A Scalable lightWeight Infrastructure for Fine-Tuningcited by 345
- 2024AutoCodeRover: Autonomous Program Improvementcited by 272
- 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 254
- 2025Multi-SWE-bench: A Multilingual Benchmark for Issue Resolvingcited by 165
- 2024SWE-Bench+: Enhanced Coding Benchmark for LLMscited by 95
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2026A Systematic Evaluation of Trajectory Data Curation for LoRA Fine-Tuning of Code Agents
- 2026Efficient SWE Agent Benchmarking via Trajectory-Aware Evaluation
- 2026Open-SWE-Traces: Advancing Dual-Mode Multilingual Distillation for Software Engineering Agents
- 2026PROOF-Gen: From Optimized Data to Better Distillation
- 2026SWE-Master: Unleashing the Potential of Software Engineering Agents via Post-Training
- 2026SWE-TRACE: Optimizing Long-Horizon SWE Agents Through Rubric Process Reward Models and Heuristic Test-Time Scaling
- 2025Training Versatile Coding Agents in Synthetic Environments
- 2026Yet Even Less Is Even Better For Agentic, Reasoning, and Coding LLMs