SWE-Trail: More useful training data, not more attempts, for coding agents

SWE-Trail guides data collection using prior code-repair attempts without showing them to the agent; the main model improves success rates by 2.33 and 1.60 percentage points over independent sampling.

SWE-Trail: History-Guided Trajectory Collection for Coding Agent Training — arXiv:2611.02074

When will it reach products?

6–12 mo — You will likely see this idea in coding-assistant training infrastructure over the next 6–12 months. Its visible effect may not be a “memory of past attempts” button, but a model that makes more accurate decisions on new issues and reduces unnecessary file reads.

What happened?

Researchers from Ant Group and the University of Connecticut developed SWE-Trail, a method that uses prior attempts when collecting training data for coding agents. The method does not show the history to the agent; instead, it identifies decision points where trying alternatives is worthwhile. The main model trained on this data improved its issue-resolution rate by 2.33 and 1.60 percentage points, respectively, over a model trained with independent attempts on two evaluations.

Why it matters

Code assistants and software maintenance tools that debug repository-level issues can devote substantial resources to repeated attempts on the same problem. SWE-Trail aims to make that effort produce more useful training examples. The likely product impact is less about offering users a new feature and more about making existing assistants more accurate and less repetitive. However, the study also shows that collecting more successful examples alone does not necessarily mean a better model.

Technical summary

SWE-Trail uses prior attempts only on the collector side when gathering interaction trajectories for coding agents. The offline stage derives allocation signals from history to determine where to try alternative actions and what evidence to use for selection. Without seeing this information, the agent generates candidate actions; two candidates are run briefly from the same checkpoint. The collector keeps the path better supported by evidence, then the agent continues along that path. The selected records become supervised fine-tuning data, with the aim of reducing train-test mismatch.

Contribution

The key contribution is that history guides where data-collection effort is spent, rather than how actions are generated. SWE-Trail runs local alternatives without changing the agent’s information context, then creates a single training trajectory. Controlled experiments show that the number of successful trajectories collected and the benefit this data provides to the student model should be measured separately.

arXiv