SWE-Trail Uses History-Guided Trajectories to Train Coding Agents
agents training
| Source: HF Papers | Original article
Researchers introduce SWE‑Trail, a history‑guided method for gathering coding agent trajectories, aiming to improve post‑training data quality for repository issue resolution.
A new preprint from Ant Group and the University of Connecticut proposes a different way to gather training data for AI coding assistants. Titled **SWE‑Trail: History‑Guided Trajectory Collection for Coding Agent Training**, the paper—posted to arXiv on Nov. 1—argues that the way developers collect “trajectories” (the step‑by‑step sequences of exploration, editing and validation that agents use to fix repository issues) shapes what the models ultimately learn.
Current practice samples multiple independent rollouts for each issue and then selects or curates the best ones. As the number of rollouts grows, the process becomes increasingly redundant, and feeding past trajectories back to the agent creates a train‑test mismatch. SWE‑Trail sidesteps both problems by using the history of earlier rollouts only to decide where to focus further collection effort. The past data guide the sampling strategy but never appear as advice to the agent itself, preserving a clean separation between training data and model behavior.
In experiments reported in the preprint, a 124‑billion‑parameter “student” model initialized from Ling‑3.0‑flash‑base was fine‑tuned on SWE‑Trail trajectories. The resulting model lifted its mean resolution score on the SWE‑bench benchmark by 2.33 points compared with a baseline that relied on independent sampling. The authors claim the approach yields “smarter” training data without the redundancy of naïve collection.
Why it matters: coding agents are increasingly deployed to automate bug fixes and feature additions across large codebases. More efficient trajectory collection can reduce the computational cost of post‑training, improve model reliability, and narrow the gap between research benchmarks and real‑world performance. As we reported on CrossSWE earlier this month, robust benchmarking of coding agents is a growing priority in the Nordic AI community.
What to watch next: the authors plan to release the SWE‑Trail collector as open‑source, and the community will likely test its impact on other benchmarks such as SWE‑bench 2.0 and the upcoming Auto‑Ontology‑enhanced workflows. Follow‑up studies may also explore how the method scales to larger models and diverse programming languages.
Sources
Back to AIPULSEN