acceptodds
Under review as a conference paper at ICLR 2027

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

Abstract

Coding agents solve repository issues through long sequences of exploration, editing, and validation. These interaction trajectories are increasingly used as post-training data, so how they are collected shapes what the trained model learns. A common approach is to sample multiple trajectories independently for each issue and then select or curate them. However, as more trajectories are sampled independently, later trajectories become increasingly redundant. In fact, earlier trajectories can guide where subsequent collection effort should be spent. A natural way to use this history is to expose it to the coding agent as advice, helping it decide what to do next. But training on such trajectories can make the model rely on advice that is unavailable at test time, creating a train-test mismatch that may reduce downstream performance. Instead, we argue that history should guide *where* collection effort is spent, while the coding agent decides *what* to generate by itself. Based on this principle, we introduce **SWE-Trail**, a trajectory collector that uses earlier trajectories to guide subsequent collection while keeping that history outside the coding agent's context. During a new rollout, SWE-Trail uses history to identify a state where additional collection effort may be useful. When that state is reached, the coding agent proposes candidate next actions from its ordinary context. SWE-Trail briefly executes candidates from the same checkpoint and uses the results to decide which route continues. We compare collection approaches by training student models on the trajectories they produce and measuring downstream performance. For a 124B student initialized from Ling-3.0-flash-base, SWE-Trail improves mean resolution over independent sampling by 2.33 and 1.60 percentage points on SWE-bench Multilingual and SWE-bench Pro, respectively. Without history, the same collection pipeline produces more resolved trajectories than independent sampling, but improves by only 0.11 points on Multilingual. These results show the value of using history to guide collection without exposing it to the coding agent. Our code is available at https://anonymous.4open.science/r/SWE-Trail-3D13/.

Primary area:
foundation or frontier models, including LLMs
Keywords:
coding agents, trajectory acquisition, post-training data, LLM agents, software engineering agents

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_rwAVOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper studies how to collect coding-agent trajectories that are useful for downstream training. SWE-Trail compiles previous attempts on the same issue into frozen detector rules, local comparison objectives, and sampling schedules. When a new rollout reaches a detected state, the coding agent proposes actions from its ordinary context; the collector executes two candidates from the same checkpoint and selects one route using local execution evidence. History and collector messages are excluded from the agent context and exported training trajectory. With 1,500 trajectories per condition, H5 improves the 124B student's mean resolution over independent sampling by 2.33 percentage points on SWE-bench Multilingual and 1.60 points on SWE-bench Pro. Improvements also appear with Qwen3-14B-Base.

Critical strengths
  1. The paper evaluates the training value of collected trajectories, which is a useful and consequential question beyond improving the collector's own issue-resolution rate. The experiments use the same collection issues and trajectory count, hold the remaining training setup fixed, and report three independent training runs. H5 improves over SeedBank on both benchmarks and with both student models. This makes the empirical result more convincing than a collection-success comparison alone.

  2. The separation between collector-side history and agent-side generation is clearly implemented. Candidate actions come from the ordinary agent context, alternatives execute from the same checkpoint, and only one continuous route is exported. The randomized detection and retention controls are useful, and the appendix documents the prompts, information boundaries, and export checks in detail. These are substantive strengths of the proposed collection design.

Critical weaknesses
  1. The distinct contribution over existing adaptive replay and branching methods is not sufficiently established empirically. SWE-Replay [1], already cited in the paper, uses archived trajectories to select intermediate states, restore the environment, and generate new continuations. Its step selection does not require inserting a distilled history-advice message into the actor's context. DARS [2] also explores alternatives at selected key decisions using previous execution feedback. SWE-Trail differs through frozen history-derived rules, a bounded two-route execution comparison, and its focus on student training utility. I recognize these differences, but the experiments mainly compare against independent sampling, curation adaptations, and an agent-visible experience baseline. H0 is a useful internal control, but does not establish the benefit over an existing replay-based collector. A comparison of the training value of such trajectories would materially strengthen the case for the new design.

  2. The benefit of history-derived detection, beyond changing the amount and diversity of local search, is not fully isolated. Appendix B.5 gives H0 a fixed proposal temperature of 0.7, whereas H5 uses higher temperatures for mixed and never-solved histories. Table 22 also shows 968 executed comparisons for H5 versus 560 for H0. Thus, H5-H0 changes the location and frequency of comparisons, as well as candidate sampling. The random-detection ablation partially addresses this concern, but Appendix G.1 matches the allowed per-trajectory budget rather than reporting matched realized intervention counts. For the 124B student, the H5-H0 gains are 2.22/0.87 points, with task-bootstrap intervals of [-0.2, 4.6]/[-0.8, 2.5] (Table 16). The Qwen results provide additional positive evidence, so I do not view the method as ineffective. However, the current evidence does not cleanly identify how much comes from the history-derived allocation rules rather than more frequent branching or a different sampling schedule.

These two gaps in establishing the distinctive contribution are why I currently lean toward weak rejection, despite the useful downstream results.

[1] Ding and Zhang. SWE-Replay: Efficient Test-Time Scaling for Software Engineering Agents. arXiv:2601.22129, first posted January 29, 2026. https://arxiv.org/abs/2601.22129 [2] Aggarwal et al. DARS: Dynamic Action Re-Sampling to Enhance Coding Agent Performance by Adaptive Tree Traversal. arXiv:2503.14269, first posted March 18, 2025. https://arxiv.org/abs/2503.14269

Questions for authors
  1. Provide a controlled comparison with a replay-based collector, particularly SWE-Replay, using the same collection model, issue pool, retained trajectory count, and student-training protocol. The relevant endpoint is downstream student resolution, rather than the test-time performance of the original method. This would help determine the practical value of the frozen detector and local execution-selection design.

  2. What are the realized candidate-sampling and executed-comparison counts for random detection? Can a history-free control using the same candidate-temperature schedule and a matched intervention rate retain the H5 advantage? I would also appreciate uncertainty estimates for the randomized-control contrasts. These clarifications would directly affect my assessment of the history-derived detector.

6 comments

We thank the reviewer for the detailed reading of our appendices. We address each point with new experiments that follow the protocols the reviewer specified:

  • To compare with an existing replay-based collector, we run SWE-Replay with the same collection model, issue pool, history, retained trajectory count, and student-training protocol, and evaluate it by downstream student resolution on both students (W1, Q1).
  • We also separate comparison location from comparison frequency and temperature by reporting the realized counts of random detection, running H5 with H0's fixed temperature, and giving run-level uncertainty for the randomized controls, including random detection retrained on Qwen3-14B (W2, Q2).

W1 and Q1: Controlled comparison with SWE-Replay.

As the reviewer requested, we compare SWE-Trail with SWE-Replay under the same collection model, issue pool, retained trajectory count, and student-training protocol, and evaluate by downstream student resolution. SWE-Replay is a test-time method that replays archived attempts from intermediate states chosen by state rarity and reasoning intensity, and then selects a final patch. We use it as a collector with three changes only. Its archive starts from the same five SeedBank attempts that H5 reads. All five new attempts per issue are kept for training instead of selecting one patch (1500 trajectories, as for H5). Each replayed attempt is exported as the archived prefix followed by the new continuation. Everything else follows the original method, and the collection model (GLM-5.1) and scaffold (OpenHands) match H5.

Table R1

Collector (300 issues × 5)History usedLing-124B MultilingualLing-124B SWE-ProQwen3-14B MultilingualQwen3-14B SWE-Pro
SeedBanknone63.3341.2211.3311.08
SWE-Trail-H0none63.4441.9512.7811.90
SWE-Replay (collector adaptation)5 SeedBank attempts64.4441.2713.1112.31
SWE-Trail-H55 SeedBank attempts65.6742.8214.4413.50

Table R1b

CollectorResolvedSolved issuesReplayed trajectoriesReused archived steps
SeedBank2928800%
SWE-Trail-H03299200%
SWE-Replay3539573428%
SWE-Trail-H53459800%

H5 is the highest on both students and both benchmarks. SWE-Replay improves over SeedBank on Qwen3-14B (+1.78 Multilingual, +1.23 SWE-Pro) and on 124B Multilingual (+1.11), but stays below H5 on every column, by 1.22 / 1.55 on the 124B student and 1.33 / 1.19 on Qwen3-14B. SWE-Replay is a strong collector. It resolves slightly more trajectories than H5 (353 vs. 345, Table R1b), although over fewer issues (95 vs. 98). Its weaker students therefore do not come from fewer successes. We see two reasons for the gap. First, H5 spends its extra effort on the steps that decide success or failure, so its trajectories teach the student better choices at exactly those steps. SWE-Replay spends its extra effort on rarely visited states, which need not matter for the outcome, so its extra data teaches less. Random detection supports this: with H5's comparison placed at random, it is also below H5 (Table R3). Second, 28% of the steps in SWE-Replay's trajectories are copied from earlier attempts, so the student sees less new behavior. As the reviewer notes, collection success and training value are different endpoints. Under the reviewer's protocol, SWE-Trail's trajectories therefore train stronger students than those of a replay-based collector.

W2 and Q2: Separating comparison location from comparison frequency and temperature.

Separating comparison location from comparison frequency and temperature is indeed important. We address the reviewer's three questions in turn: (a) the realized counts of random detection, (b) a history-free control with H5's temperatures and a matched intervention rate, and (c) uncertainty estimates for the randomized controls.

(a) Realized counts of the randomized controls. To check how often random detection actually compares, Table R2 reports how often each collector samples candidate actions and how often it executes a comparison. Random detection does not use a detector. In every trajectory that has an eligible state, it picks one at random and samples candidates there, whereas H5 samples candidates only where its detector fires.

Table R2

CollectionLocationTemperaturesTrajectories with candidate samplingExecuted comparisons
SWE-Trail-H0history-free detector0.7664560
SWE-Trail-H5history-compiled detectorH5 schedule1147968
H5, random detectionrandom eligible stateH5 schedule14771248

Random detection samples candidates in 1477 trajectories, more than H5's 1147, and executes more comparisons (1248 vs. 968) under the same temperature schedule and budget. Yet its students are below H5's by 1.44 / 1.28 points on the 124B student and 2.00 / 1.78 on Qwen3-14B (Table R3).


(b) A history-free control with H5's temperature schedule and intervention rate. To test whether H5's advantage holds without its comparison placement or without its temperature schedule, we use two controls. Random detection is a randomized-location control with H5's temperature schedule. Its rate is higher than H5's rather than equal (1248 vs. 968 comparisons). As a converse test, we re-run H5 with its frozen detectors but with H0's fixed temperature of 0.7 for all candidates.

Table R3

CollectionLocationTemperaturesExecuted comparisonsLing-124B MultilingualLing-124B SWE-ProQwen3-14B MultilingualQwen3-14B SWE-Pro
SWE-Trail-H0history-free detector0.756063.4441.9512.7811.90
H5, fixed temperaturehistory-compiled detector0.7100465.3342.4114.0013.22
H5, random detectionrandom eligible stateH5 schedule124864.2241.5412.4411.72
SWE-Trail-H5history-compiled detectorH5 schedule96865.6742.8214.4413.50

With all candidate temperatures fixed at 0.7, H5 still outperforms H0 on both students and benchmarks, by 1.89 / 0.46 points on the 124B student and 1.22 / 1.32 points on Qwen3-14B. Random detection executes more comparisons than H5 (1248 vs. 968) but produces weaker students on all four metrics. These results support the value of history-guided comparison placement.

W2 and Q2 (continued)

(c) Uncertainty for the randomized-control contrasts. To quantify how reliable these contrasts are, we treat independently trained models as the unit and pool within-condition variance over all existing runs of each student, assuming a common variance across conditions. For the 124B student, the standard deviation within a condition is 1.09 points on Multilingual and 0.81 on SWE-Pro, so a difference between two 3-run means has a standard error of 0.89 and 0.66 points.

Table R4

ContrastStudentBenchmarkΔtOne-sided p
H5 − random detectionLing-124BMultilingual+1.441.630.06
H5 − random detectionLing-124BSWE-Pro+1.281.940.03
H5 − random detectionQwen3-14BMultilingual+2.0010.33< 0.001
H5 − random detectionQwen3-14BSWE-Pro+1.7814.65< 0.001
H5 − random retentionLing-124BMultilingual+0.891.000.16
H5 − random retentionLing-124BSWE-Pro+1.191.800.04

The random-detection contrast is supported on both students. It is clear on Qwen3-14B, holds on the 124B student's SWE-Pro (p = 0.03), and is borderline on its Multilingual (p = 0.06). The random-retention contrast is weaker. It holds on SWE-Pro (p = 0.04) but not on Multilingual (p = 0.16), so we will describe it as suggestive. For H5 vs. H0, all three H5 runs on Qwen3-14B score higher than all three H0 runs on both benchmarks (Table 18). The stratified run-level permutation test across the two students gives p = 0.0025 on Multilingual and p = 0.0075 on SWE-Pro for H5 versus H0.

In summary, random detection uses H5's temperatures and compares more often than H5, yet stays close to H0. H5 with H0's temperature keeps most of its advantage. These results support the history-derived allocation rules, rather than more frequent branching or a different sampling schedule, as the main source of the gain.


We will add the following to the paper:

  • A controlled SWE-Replay collector evaluated by downstream student resolution under the reviewer's protocol (Table R1), with DARS and SWE-Replay discussed in the related work.
  • Realized intervention counts for H0, H5, and random detection (Table R2).
  • A temperature-matched H5 collection (Table R3).
  • Run-level uncertainty for the randomized controls (Table R4).
  • The cross-student combined test for H5 vs. H0.

We hope these results address the reviewer's questions, and we would be glad to provide further analysis.

Reviewer_21gwOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes SWE-Trail, a history-guided trajectory collection method for coding-agent SFT. It uses previous attempts to identify states worth further exploration, compares short executions of candidate actions, and continues along the selected path while keeping historical information outside the coding agent’s context. Experiments with two student models on two SWE benchmarks show improvements over independently collected training trajectories.

Critical strengths
  1. The overall idea makes sense. Leveraging previous attempts to identify promising states for additional exploration could improve trajectory collection efficiency. Keeping historical guidance outside the agent’s context is also a reasonable design choice, as it avoids requiring such information during deployment.

  2. The paper evaluates the impact on downstream SFT performance rather than just trajectory collection success. The experiments across two student models and two benchmarks, with multiple training runs, provide useful evidence for the effectiveness of the approach.

Critical weaknesses
  1. The advantage over simpler adaptive sampling strategies is unclear. Related approaches such as TreeRL (Hou et al., ACL 2025) and ARPO (Dong et al., ICLR 2026) use entropy or uncertainty to guide branching and would be useful baselines. Simpler process-based branching heuristics are also worth considering. In addition, some existing baselines are simplified adaptations. For example, the SWE-Gym adaptation retains failed trajectories rather than using successful trajectories for SFT, making it difficult to assess the competitiveness of the proposed method.

  2. The comparison does not fully account for data collection costs. While the final training-set size is controlled, the total collection cost is not matched. For example, the cost of generating historical trajectories is excluded, SeedBank token usage is unavailable, and Top-5-of-10 is not cost-matched (Appendix G.3). A comparison under the same total collection budget would be more convincing. It would also help to clarify which models are used for compilation and selection.

  3. The contribution of historical guidance is not clearly isolated. H5 uses different candidate temperatures from H0 (Appendix B.5) and performs substantially more branch comparisons, so some gains may simply come from increased exploration. A history-free baseline with matched temperatures and comparison frequency would help clarify this. Also, the improvements for the 124B student are relatively small (2.22 and 0.87 percentage points), with both 95% task-bootstrap confidence intervals including zero. This leaves some uncertainty about the effectiveness of the history-guided mechanism.

Questions for authors
  1. How does H5’s total collection cost compare with SeedBank and Top-5-of-10, including historical rollouts and auxiliary model calls?

  2. Does H5 still outperform H0 when sampling temperatures and the number of branch comparisons are matched?

4 comments

We thank the reviewer for finding the idea sensible and for valuing the downstream-training evaluation across two students and two benchmarks. We address each point with the following new experiments:

  • We use SWE-Replay as a collector to compare SWE-Trail with an existing adaptive method (W1).
  • To test SWE-Gym's resolved-only recipe, we train on resolved trajectories only (W1).
  • We train on all 3000 trajectories per method to compare at the same rollout count and training-corpus size (W2).
  • To separate the effect of history from that of temperature, we run H5 with H0's fixed temperature (W3, Q2).

We also report the total collection cost, including historical rollouts and auxiliary calls (Q1), and the realized number of comparisons for H0 and each H5 variant (W3).


W1: Comparison with adaptive methods and SWE-Gym.

We agree that comparisons with other adaptive strategies are important. We add two analyses: a comparison with adaptive collectors, including a new SWE-Replay baseline, and a test of SWE-Gym's resolved-only recipe.

(1) Comparison with adaptive collectors. To compare SWE-Trail with an existing adaptive method, we add SWE-Replay, which is designed for coding agents, as a baseline on both the 124B Ling student and Qwen3-14B. Like SWE-Trail, it reuses earlier attempts and runs with a fixed agent. SWE-Replay is a test-time method that replays archived attempts from branching points chosen by state rarity and reasoning intensity. We run it as a collector: its archive starts from the same five SeedBank attempts that H5 reads, all five new attempts per issue are kept for training (1500 trajectories, the same corpus size as H5), and the issues, collection model, and training protocol are also the same. Two collectors already in the paper support the same comparison: SWE-Trail-H0, whose detector is built from the issue and read-only repository checks without history, and random detection, which compares at a random eligible state. Both share H5's execution and selection but choose where to compare without using history.

Table R1

CollectorLing-124B MultilingualLing-124B SWE-ProQwen3-14B MultilingualQwen3-14B SWE-Pro
SeedBank63.3341.2211.3311.08
SWE-Trail-H063.4441.9512.7811.90
H5, random detection64.2241.5412.4411.72
SWE-Replay64.4441.2713.1112.31
SWE-Trail-H565.6742.8214.4413.50

H5 is the highest on both students and both benchmarks: neither H0, random detection, nor SWE-Replay recovers its gain. SWE-Replay improves over SeedBank on Qwen3-14B (+1.78 Multilingual, +1.23 SWE-Pro) and on 124B Multilingual (+1.11), but stays below H5 on every column (by 1.22 / 1.55 on the 124B student and 1.33 / 1.19 on Qwen3-14B). We see two reasons for the gap. First, H5 spends its extra effort on the steps that decide success or failure, so its trajectories teach the student better choices at exactly those steps. SWE-Replay spends its extra effort on rarely visited states, which need not matter for the outcome, so its extra data teaches less. Random detection supports this: with H5's comparison placed at random, it is also below H5. Second, 28% of the steps in SWE-Replay's trajectories are copied from earlier attempts, so the student sees less new behavior.

The reviewer also mentions TreeRL and ARPO. Both branch at high-entropy steps of the policy being trained during on-policy RL. Their setting differs somewhat from ours, where a fixed agent collects SFT data for a separate student. The two ideas could still be combined: entropy could flag candidate branching points, and history could decide which of them are worth comparing. We will discuss this direction in the related work and as future work.

W1 (continued)

(2) SWE-Gym with resolved trajectories only. SWE-Gym trains only on resolved trajectories, while we keep all 1500 records so that every condition has the same corpus size. Resolved-only training would give 292 trajectories for SeedBank and 345 for H5. To test the resolved-only recipe directly, we also train the 124B student on resolved trajectories only: all 292 from SeedBank, all 345 from H5, and 292 sampled from H5 to match SeedBank's size.

Table R2

CorpusRecordsLing-124B MultilingualLing-124B SWE-Pro
SeedBank (all records)150063.3341.22
SWE-Gym in the paper (all records, outcome-annotated)150064.0040.86
SeedBank, resolved only (SWE-Gym recipe)29260.1139.26
H5, resolved only, subsampled to 29229261.3340.31
H5, resolved only34561.8940.40
SWE-Trail-H5 (all records)150065.6742.82

Under the resolved-only recipe, H5 still wins. At the same size of 292, H5's resolved trajectories give 61.33 / 40.31, 1.22 and 1.05 points above SeedBank's (60.11 / 39.26). H5's successful trajectories also cover a broader set of issues (Table 21). Only 51% of H5's resolved trajectories come from the 37 issues that every SeedBank attempt solves, compared with 63% for SeedBank. H5 also has more successes on mixed issues (143 vs. 107) and solves 16 issues that SeedBank never solved. For both corpora, training on all 1500 records is better still (63.33 / 41.22 and 65.67 / 42.82), which supports keeping unresolved trajectories.

W2 and Q1: Total collection cost and the models used.

Total collection cost is an important part of the comparison. To answer the reviewer's question, Table R3 compares the cost of SeedBank, Top-5-of-10, and SWE-Trail-H5, including historical rollouts and auxiliary model calls. For a comparison at the same rollout count and training-corpus size, we further use SeedBank-2, a second set of five independent attempts per issue. Together with SeedBank, it forms the ten attempts used by Top-5-of-10. We train on all 3000 trajectories of SeedBank ∪ SeedBank-2 and of SeedBank ∪ H5.

Table R3

CorpusAuxiliary tokensTraining trajectoriesLing-124B MultilingualLing-124B SWE-Pro
SeedBank0150063.3341.22
Top-5-of-1001500 (selected)64.1141.86
SWE-Trail-H5406M150065.6742.82
SeedBank ∪ SeedBank-20300064.5641.91
SeedBank ∪ SWE-Trail-H5406M300066.8943.68

Counting the SeedBank attempts it reads, H5 uses the same 3000 rollouts as Top-5-of-10. It adds about 0.27M auxiliary tokens per trajectory (406M in total) and improves the student by 1.56 / 0.96. Compared with SeedBank, H5 uses twice the rollouts and improves the student by 2.33 / 1.60. The extra rollouts alone do not explain this gain. SeedBank ∪ SeedBank-2 spends the same extra rollouts on independent samples and reaches only 64.56 / 41.91, while SeedBank ∪ H5 reaches 66.89 / 43.68 with the same 3000 trajectories. What matters is how the additional rollouts are collected: SWE-Trail turns them into higher-quality training data. Table 25 in Appendix G.3 is consistent with this. After the same Top-5 selection, the set drawn from SeedBank plus H5 covers 104 solved issues, compared with 99 from the ten independent attempts. Every difference lies on never-solved histories. The auxiliary tokens break down into candidate proposals 238.4M, executed suffixes 43.1M, selector 16.8M, and offline compilation 108M, re-measured over the full pipeline.

All model-assisted components, including history diagnosis, read-only check planning, evidence audit, detector compilation, candidate generation, shortlisting, and suffix selection, use GLM-5.1, the same model as the coding agent. No stronger model is involved in collection.

W3 and Q2: Isolating the contribution of history.

Isolating the contribution of history is a key question for our method. To test whether H5 still outperforms H0 under a common candidate temperature, we re-run H5 with the same frozen detectors but with H0's fixed temperature of 0.7 for all candidates. We also use random detection as a randomized-location control. It replaces H5's comparison location with a random eligible state and keeps the rest of the collection procedure.

Table R4

CollectionCandidate temperaturesComparison locationExecuted comparisonsLing-124B MultilingualLing-124B SWE-ProQwen3-14B MultilingualQwen3-14B SWE-Pro
SWE-Trail-H00.7history-free detector56063.4441.9512.7811.90
H5, fixed temperature0.7frozen H5 detector100465.3342.4114.0013.22
H5, random detectionH5 schedulerandom eligible state124864.2241.5412.4411.72
SWE-Trail-H5H5 schedulehistory-compiled detector96865.6742.8214.4413.50

With all candidate temperatures fixed at 0.7, H5 still outperforms H0 on both students and benchmarks, by 1.89 / 0.46 points on the 124B student and 1.22 / 1.32 points on Qwen3-14B. Random detection executes more comparisons than H5 (1248 vs. 968) but produces weaker students on all four metrics. These results support the value of history-guided comparison placement.

The gain over H0 is also robust across students. On Qwen3-14B, all three H5 runs score higher than all three H0 runs on both benchmarks (Table 18). The stratified run-level permutation test across the two students gives p = 0.0025 on Multilingual and p = 0.0075 on SWE-Pro for H5 versus H0.


We will add the following to the paper:

  • New baselines: a controlled SWE-Replay collector and a resolved-only SWE-Gym variant (Tables R1, R2), with TreeRL and ARPO discussed in the related work.
  • A cost table that includes H5's history and all auxiliary calls, with rollout-matched comparisons (Table R3), and a statement that all collector components use GLM-5.1.
  • A temperature-matched H5 collection and realized comparison counts for H0 and the H5 variants (Table R4).
  • The cross-student test for H5 vs. H0.

We hope these address the reviewer's questions and would be happy to provide further detail.

AuthorsOpenReview ↗

Thank you for your valuable feedbacks.

Dear Reviewer,

Thank you again for your constructive feedback. We have provided detailed responses and additional experiments addressing your main concerns.

In particular, we added SWE-Replay as an adaptive collector baseline, and SWE-Trail outperforms it on both students and both benchmarks. We will also discuss TreeRL and ARPO in the related work. At the same total rollout budget, adding SWE-Trail trajectories reaches 66.89 / 43.68, while adding more independent samples reaches only 64.56 / 41.91. We also show that SWE-Trail (H5) still outperforms the history-free variant (H0) under the same fixed temperature, and we report the full collection cost and a resolved-only SWE-Gym comparison.

We would greatly appreciate it if you could take a look and let us know whether these results address your concerns. We would be glad to clarify any remaining questions during the discussion period.

Best regards,

The Authors

Reviewer_Da3dOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
2
Soundness
2(+1)
Read review
Paper summary

This paper proposes a method for collecting coding-agent training trajectories that uses earlier attempts on the same issue to guide new data collection, without showing that history to the coding agent. An LLM compiles the history offline into issue-specific rules that detect when an extra comparison is worth making. During a new rollout, when a rule fires, the agent proposes candidate next actions from its normal context. Two candidates are briefly executed from the same checkpoint, and a blind selector keeps the route with better evidence. On 300 SWE-rebench V2 issues with 5 trajectories each, a 124B student trained on SWE-Trail data improves over independent sampling by 2.33 points on SWE-bench Multilingual and 1.60 points on SWE-bench Pro. The paper also reports a no-history variant, randomized controls, and results on a second student model.

Critical strengths
  • The motivation and research question are clear.

  • The paper makes a real effort at controlled experiments, including a no-history pipeline, randomized controls, and curation and selection baselines.

  • The method is clearly described, with the algorithm, prompts, and information-boundary checks given in the appendix.

Critical weaknesses

W1. Small experimental scale. Each condition trains on only 1,500 trajectories, mixed into an undisclosed background corpus. Even by the standards of academic work on coding-agent training data, this is small. It is unclear whether the gains hold when the corpus grows by 10x or 100x. More tasks (issues) may easily cover these points that H5 may explored. We don't know.

W2. Compute is not controlled. The headline numbers +2.33 and +1.60 compare H5 against SeedBank, but H5 uses SeedBank as its history, so it effectively costs ~10 rollouts per issue versus 5. The cost analysis compares only H5 against H0 and excludes the prior-attempt cost. Against the roughly budget-matched Top-5-of-10, the gain drops to 1.56 / 0.96. The ablations are not cost-matched either; for example, H5 samples candidates in 1,147 rollouts vs. 664 for H0.

W3. The gains are not significant. Most score differences are within 2 points, which is about the same as the variance between training runs. For example, H5’s three runs on Multilingual already range from 64.00 to 67.67. With only 3 runs per condition, the results are not convincing, and the paper’s own bootstrap CIs for H5 − H0 include zero on both benchmarks. In addition, each condition is collected only once, so we don’t know how much the results would change if the data were collected again with the same method. The authors could check this by training on the second SeedBank draw they already have (used in H10).

Questions for authors

NA

5 comments

We thank the reviewer for the careful review and for recognizing our controlled experimental design.

We address each point with the following new experiments:

  • We scale the corpus 3.3× to 5000 trajectories per condition to test whether the gain holds at larger scale (W1).
  • To test whether more issues recover what H5 adds, we compare adding issues with SWE-Trail at the same rollout count (W1).
  • We compare total collection cost with H5's history included, so that methods are compared at the same rollout count (W2).
  • To separate the effect of history from that of temperature, we run H5 with H0's fixed temperature (W2).
  • As the reviewer suggested, we train a student on the second SeedBank draw to measure collection variance (W3).

We also test the gains against training noise and across both students (W3).


W1: Scale, adding issues, and the background corpus.

We agree that it is important to test the gain at larger scale and against simply covering more issues. We run two new experiments.

(1) A 3.3× larger corpus. To test whether the gain holds at larger scale, we collect SeedBank on 700 more SWE-rebench V2 issues and run H5 with it as history. The new issues do not overlap with the evaluation benchmarks (Appendix C). Together with the original 300 issues, each condition has 1000 issues and 5000 trajectories. This is on par with SWE-smith (5016 training trajectories) and larger than SWE-Gym (491) and R2E-Gym (about 3.3K). The 7000 new rollouts cost about 9B tokens. Training and evaluation follow the original protocol on both students.

Table R1

CorpusIssuesTrajectoriesLing-124B MultilingualLing-124B SWE-ProQwen3-14B MultilingualQwen3-14B SWE-Pro
SeedBank300150063.3341.2211.3311.08
SWE-Trail-H5300150065.6742.8214.4413.50
SeedBank1000500066.3344.8216.1114.68
SWE-Trail-H51000500069.7847.8820.1118.42

The gain persists at scale and is larger than at 1500 trajectories. With 5000 trajectories, H5 improves over SeedBank by 3.44 / 3.06 points on the 124B student and 4.00 / 3.74 on Qwen3-14B, compared with 2.33 / 1.60 and 3.11 / 2.42 at 1500. The benefit of SWE-Trail is therefore not specific to a small corpus. It does not shrink when the corpus grows 3.3×, on either student.


(2) Adding issues vs. SWE-Trail at the same rollout count. As the reviewer suggests, adding issues is a valid way to scale, and more issues may cover what H5 explores. To test this, we compare the two at the same rollout count and corpus size. We build three corpora of 3000 trajectories each. All start from the original SeedBank (1500 trajectories on 300 issues) and add 1500 more trajectories in one of three ways:

  • five more independent attempts on each original issue (SeedBank-2)
  • five independent attempts on each of 300 new issues
  • H5 on each original issue

Table R2

CorpusIssuesTrajectoriesHow the second 1500 rollouts are spentLing-124B MultilingualLing-124B SWE-Pro
SeedBank ∪ SeedBank-23003000 (10 per issue)5 more independent rollouts on each original issue64.5641.91
SeedBank on 600 issues6003000 (5 per issue)5 independent rollouts on each of 300 new issues65.2242.27
SeedBank ∪ SWE-Trail-H53003000 (10 per issue)SWE-Trail-H5 on each original issue (history = SeedBank)66.8943.68

Expanding to new issues helps (65.22 / 42.27 vs. 64.56 / 41.91 for five more rollouts on the same issues). Spending the same rollouts on SWE-Trail over the original issues is better still (66.89 / 43.68), 1.67 and 1.41 points above expanding the issue pool. Covering more issues therefore does not recover what H5 adds. On 1000 issues, H5 still improves over SeedBank by 3.44 / 3.06 points (Table R1). SWE-Trail thus complements adding issues: more issues add diversity, and SWE-Trail adds training value per issue. This matters because executable, verified issues are costly to build and limited in number.

Finally, on the background corpus, the 1500 coding trajectories make up 19.5% of the 124B student's SFT corpus (about 0.47B tokens). The rest is a fixed general mixture, and only the coding trajectories change across conditions (Table 14).

W2: Collection cost and rollout-matched comparisons.

Matching the total collection cost is indeed important for a fair comparison. In response to the reviewer's point that our cost analysis left out the prior attempts, Table R3 compares SeedBank, Top-5-of-10, and SWE-Trail-H5 with these attempts counted for H5.

Table R3

CorpusAuxiliary tokensTraining trajectoriesLing-124B MultilingualLing-124B SWE-Pro
SeedBank0150063.3341.22
Top-5-of-1001500 (selected)64.1141.86
SWE-Trail-H5406M150065.6742.82

Counting these attempts, H5 uses the same 3000 rollouts as Top-5-of-10. It adds about 0.27M auxiliary tokens per trajectory (406M in total, with offline compilation re-measured over the full pipeline) and improves the student by 1.56 / 0.96. SWE-Trail is also orthogonal to verifier-based Best-of-N selection such as Top-5-of-10: applying it to SeedBank plus H5 (Top-5-hybrid, Table 3) reaches 66.22 / 43.14.

Compared with SeedBank, H5 uses twice the rollouts and improves the student by 2.33 / 1.60. The extra rollouts alone do not explain this. With the same extra rollouts spent on independent samples, SeedBank ∪ SeedBank-2 reaches only 64.56 / 41.91, compared with 66.89 / 43.68 for SeedBank ∪ H5 (Table R2). What matters is how the additional rollouts are collected.

The reviewer also notes that the ablations are not cost-matched. To test whether H5's gain over H0 comes from making more comparisons (968 vs. 560), we use two controls. Random detection is a randomized-location control. It keeps H5's temperature schedule but compares at a random eligible state in every trajectory that has one, so it compares more often than H5. A new fixed-temperature H5 keeps H5's detector but uses H0's temperature of 0.7 for all candidates.

Table R4

CollectionCandidate temperaturesComparison locationExecuted comparisonsLing-124B MultilingualLing-124B SWE-ProQwen3-14B MultilingualQwen3-14B SWE-Pro
SWE-Trail-H00.7history-free detector56063.4441.9512.7811.90
H5, fixed temperature0.7frozen H5 detector100465.3342.4114.0013.22
H5, random detectionH5 schedulerandom eligible state124864.2241.5412.4411.72
SWE-Trail-H5H5 schedulehistory-compiled detector96865.6742.8214.4413.50

With all candidate temperatures fixed at 0.7, H5 still outperforms H0 on both students and benchmarks, by 1.89 / 0.46 points on the 124B student and 1.22 / 1.32 points on Qwen3-14B. Random detection executes more comparisons than H5 (1248 vs. 968) but produces weaker students on all four metrics. These results support the value of history-guided comparison placement. In total, H5 uses at most 9.1% more tokens than H0 (2.013B vs. ≥1.845B).

In short, H5 remains ahead at the same rollout count (Tables R2 and R3) and under both controls (Table R4).

W3: Collection variance and statistical strength.

Following the reviewer's suggestion, we measure collection variance by training on the second SeedBank draw. We also test the gains against training noise, on each student and across both. This gives three pieces of evidence.

(a) Collection variance, as the reviewer suggested. We train the student on SeedBank-2, the second independent draw of five attempts per issue, also used by H10 and Top-5-of-10. This measures how much the student changes when the same collection method is simply run again.

Table R5

CorpusCollectionLing-124B MultilingualLing-124B SWE-ProQwen3-14B MultilingualQwen3-14B SWE-Pro
SeedBankfirst draw (used in the paper)63.3341.2211.3311.08
SeedBank-2second draw (used in H10 and Top-5-of-10)63.4440.7712.0011.76
Second draw − first draw+0.11−0.46+0.67+0.68
H5 − SeedBank+2.33+1.60+3.11+2.42
H5 − SeedBank-2+2.22+2.05+2.44+1.73

Re-collecting SeedBank changes the student by +0.11 / −0.46 points on the 124B student and by +0.67 / +0.68 on Qwen3-14B, well below the H5 gain. H5 remains above the second draw by 2.22 / 2.05 and 2.44 / 1.73 points, respectively. H5 therefore outperforms both independently collected SeedBank corpora on both students and benchmarks. Its advantage also persists in the expanded corpus of 1000 issues and 5000 trajectories per condition (Table R1).


(b) Training noise pooled over all runs. To test whether the gains exceed run-to-run training noise, we pool within-condition variance over all 30 training runs of the 124B student (Table 15), assuming a common variance across conditions. The standard deviation within a condition is 1.09 points on Multilingual and 0.81 on SWE-Pro, so the standard error of a difference between two 3-run means is 0.89 and 0.66 points.

Contrast (124B student)Multilingual Δt (20 d.f.)one-sided pSWE-Pro Δtone-sided p
H5 − SeedBank+2.332.630.008+1.602.420.013
H5 − H0+2.222.500.011+0.871.320.10

All four differences are positive. H5 − SeedBank on both benchmarks and H5 − H0 on Multilingual are significant on the 124B student alone.


(c) A second, independently trained student. To check that the gains do not depend on one student, we repeat the comparison with Qwen3-14B-Base. Trained on the same corpora, it shows the same ordering with much lower run-to-run variance (SD ≈ 0.2 points). All three H5 runs score higher than every SeedBank and H0 run on both benchmarks (Table 18). Testing both students together (stratified exact permutation test) gives:

ContrastMultilingual pSWE-Pro p
H5 > H00.00250.0075
H5 > SeedBank0.00250.0025

We will add the following to the paper:

  • A description of the background mixture.
  • The 5000-trajectory scaling experiment (Table R1) and the fixed-budget issue-expansion comparison (Table R2).
  • A cost comparison that includes H5's history, with rollout-matched comparisons (Tables R2 and R3).
  • Realized comparison counts and the fixed-temperature control for the ablations (Table R4).
  • The pooled-noise and cross-student tests, and the collection-variance experiment (Table R5).

We hope these additions address the reviewer's concerns about soundness, and we would be glad to provide further analyses.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.