Arctic-SWE: Revisiting the Long Horizon Agent Training by Modeling-System Co-Design
Organizations: Snowflake · University of Illinois at Urbana-Champaign · University of Houston · University of Chicago
Abstract
Long-horizon agent training, including software engineering, is advancing rapidly, but the recipe and infrastructure needed for a strong reinforcement-learning baseline remain difficult to reproduce. This makes gains from new algorithms or data hard to distinguish from improvements to an under-tuned baseline. We present Arctic-SWE, a fully asynchronous RL framework that establishes such a baseline through model-system co-design, using overfitting on a small task pool as the testbed. This testbed exposes failures that early reward gains conceal and guides the integration of established components: gated reward, importance-weight control, aligned training and inference engines, and consistent state across policy updates. No single component is new, yet together they form the missing foundation. On raw R2E-Gym data, without new algorithms or data work, Arctic-SWE trains Qwen3.5-4B to 62.0% pass@1 on SWE-bench Verified. This is comparable to concurrent FrogNano (61.5%), which relies on online task synthesis, after about one-sixth as many training rollouts. Building on this foundation, we further filter and refine R2E-Gym, SWE-rebench V2, and Scale-SWE. With this curated subset, the 4B model improves from 47.4%/25.0%/37.9% to 65.0%/38.3%/59.7% on SWE-bench Verified/Pro-v1/Pro-v2, and the recipe also improves Qwen3.5-9B from 56.2%/31.9%/48.8% to 65.7%/39.6%/70.2% on Verified/Pro-v1/Pro-v2. Controlled comparisons show that both curation and test strengthening improve held-out performance, although stronger tests reduce apparent training-task mastery. Arctic-SWE provides a documented starting point for studying better algorithms, data and environments for asynchronous agent RL.
Figures & tables
| Outcome | Relation among (issue, tests, gold patch) | % | |
| Pipeline 1: execution only, no model | over | ||
| Source candidates | — | 21,099 | 100 |
| Reject | tests and gold patch disagree, or not executable | 15.3 | |
| Validated pool | tests and gold patch weakly agree | 17,861 | 84.7 |
| Pipeline 2: privileged LLM judge | over | ||
| Reject | tests disagree w. the issue: too loose/over-restrictive/off target | 52.5 | |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Remedy | Evaluation | Training |
|---|---|---|
| Two native tools, one call per turn | execute_bash and edit_via_str_replace | Same |
| Format feedback | Malformed or prose-bearing turn is not executed; the model is told why and continues | Rollout ends |
| Duplicate tool call | In case of duplicated tool call without successful code edit, a short note suggests changing strategy | Optional; terminate if configured allowed number of duplicate tool calls reaches |
| Workflow hint | Prompt asks to run a relevant public test before submitting | Same |
| Submission | Optional; unit tests execute regardless | Exact echo MINI_SWE_AGENT_FINAL_OUTPUT ; a non-exact command ends the rollout with zero score |
| Output and time limits | 10k-character head and tail, 60 s command timeout, as in the public harness | Same |
| Server parser | RL framework, train time | Arctic-SWE | ||||||
| Flaw | vLLM | SGLang | Prime-RL | SkyRL | slime | miles | Gated | + raw |
| commit | 9bf44c4 | 1f6ce4b | c28afbb | b04e9c5 | 8ee9c1e | 3d01116 | ||
| Reasoning block | ||||||||
| No </think> | R | R | R | R | R | |||
| Second </think> | P | P | P | R | P | P | ||
| Extra <think> | R | R | R | R | R | R | R | |
| Cache | ( ) | Mismatch KL ( ) |
|---|---|---|
| Stale attention KV only | 3.78 [3.43, 4.12] | 3.94 |
| Stale GatedDeltaNet state only | 3.46 [3.15, 3.81] | 3.47 |
| Both stale | 7.21 [6.66, 7.76] | 7.24 |
| Setting | Value |
|---|---|
| Data and sampling | |
| Task pool | 3,606 R2E-Gym tasks with their original issues and tests |
| Sampling | Without replacement from a shuffled deck; retired tasks are skipped |
| Groups and batch | 8 rollouts per task; each update trains 128 rollouts from at least 16 groups with mixed rewards |
| Uniform groups | Groups whose rewards are all 0 or all 1 stay out of the batch but still count toward eviction |
| Task eviction | |
| Recipe choice | Alternative | Base | Checkpoints | Recipe | Alternative |
|---|---|---|---|---|---|
| Mask ratios above 2 | Clip at 2 | E | 10 | 54.0 | 52.6 |
| Off-policy cap 8 | Cap 4 | R | 10 | 53.2 | 53.8 |
| Token mean over the batch | Mean per rollout within each prompt | E | 10 | 52.6 | 49.2 |
| No std. normalization | Std. normalization | R ′ | 10 | 51.9 | 50.2 |
| No length penalty | Input and turn penalty | R ′ | 10 | 51.9 | 45.4 |
| No length penalty | Input, output and turn penalty | R ′ | 10 | 51.9 | 42.6 |
| R2E-Gym | SWE-rebench | Scale-SWE | Total | |
| Source instances | 3,606 | 6,584 | 10,909 | 21,099 |
| Pipeline 1: measurement (execution only, no model) | ||||
| no container image | – | – | ||
| could not be measured | ||||
| failed validation | ||||
| Validated pool | 3,515 | 5,308 | 9,038 | 17,861 |
| Verdict | R2E-Gym | SWE-rebench | Scale-SWE | Total | % | |
| Ship | issue unchanged | 1,756 | 1,303 | 3,208 | 6,267 | 35.1 |
| issue rewritten | 330 | 473 | 430 | 1,233 | 6.9 | |
| Reject: test quality | too_loose | 986 | 1,155 | 3,210 | 5,351 | 30.0 |
| over_restrictive | 282 | 1,227 | 1,634 | 3,143 | 17.6 | |
| off_target | 28 | 642 | 215 | 885 | 5.0 | |
| Reject: gold patch | partially fixes issue | 60 | 425 | 329 | 814 | 4.6 |
| When | Source tree | Tests | Required | |
|---|---|---|---|---|
| 1 | baseline | gold applied | original | |
| 2 | baseline | buggy | original | |
| 3 | agent check | gold applied | strengthened | |
| 4 | agent check | buggy | strengthened | |
| 5 | later shortcut gate | shortcut applied | original | |
| 6 | later shortcut gate | shortcut applied | strengthened |
| R2E-Gym | SWE-rebench | Scale-SWE | Total | % | |
| Input tasks | 986 | 1,155 | 3,210 | 5,351 | 100 |
| Strengthened | 857 | 1,096 | 2,956 | 4,909 | 91.7 |
| Kept original ( not_weak ) | 117 | 48 | 116 | 281 | 5.3 |
| Reverted to original | 6 | 10 | 138 | 154 | 2.9 |
| baseline failure | 3 | 6 | 127 | 136 | 2.5 |
| infrastructure failure | 2 | 3 | 8 | 13 | 0.2 |
| R2E-Gym | SWE-rebench | Scale-SWE | |
| Accepted strengthened tasks | 857 | 1,096 | 2,956 |
| Graded nodes added | 3,808 | 4,117 | 13,531 |
| Mean added nodes per task | 4.4 | 3.8 | 4.6 |
| Median added lines of test code | 27 | 31 | 35 |
| Added nodes failing on buggy | 51% | 84% | 84% |
| Tasks: every added node fails on buggy | 53% | 69% | 71% |
| Reason | Instances | |
|---|---|---|
| Network-dependent gold test | 9 | matplotlib-20488 , requests-1724 , requests-1766 , requests-1921 , requests-2317 , sphinx-7985 , sphinx-8269 , sphinx-8475 , sphinx-10435 |
| Recorded test names do not match the log | 3 | astropy-7606 , sphinx-8595 , sphinx-9711 |
| Image no longer collects | 2 | astropy-8872 , pylint-4661 |
| Gold patch fails its own tests | 2 | astropy-8707 , django-10097 |
| Already passes before any edit | 1 | django-7530 |
| Total excluded | 17 | retained |
| Checkpoint | Temperature | Top- | Top- |
| Qwen3.5-4B (initialization) | 1.0 | off | off |
| Qwen3.5-9B (initialization) | 1.0 | off | off |
| FrogNano-Qwen3.5-4B (our setting) | 0.6 | 0.95 | 20 |
| Arctic-SWE-4B, R2E-Gym only | 1.0 | 0.95 | 20 |
| Arctic-SWE-4B + curated RL | 1.0 | 0.95 | off |
| Arctic-SWE-9B + curated RL | 1.0 | off | off |
| Configuration / Parameter | SWE-bench Verified | SWE-bench Pro |
|---|---|---|
| Benchmark Role & Size | ||
| Role | Validation Set | Test Set |
| Evaluated Instances | 483 (17 excluded) | 731 (all retained) |
| Rollouts per Problem | 4 | 4 |
| Agent Interaction Budgets | ||
| Max Turns | 100 | 150 |
| Stop condition | Meaning | Reward |
| Invalid: the trajectory was never a well-formed attempt | ||
| format_invalid | malformed tool call or empty reasoning envelope | |
| submission_invalid | submitted without the exact required command | |
| truncation | a single model response cut off mid-generation | |
| repetition | degenerate looping (detectors off in this run) | |
| Exhausted: a genuine attempt that ran out of budget | ||
| Cell | Tasks | Rollouts | Mean reward | Solved |
|---|---|---|---|---|
| r2e_evicted | 300 | 1,200 | 0.952 | 0.867 |
| rebench_evicted | 300 | 1,200 | 0.946 | 0.867 |
| scaleswe_evicted | 300 | 1,200 | 0.968 | 0.917 |
| Cell | Mean reward | vs. step 350 | Solved | Early exits |
|---|---|---|---|---|
| r2e_evicted | 0.851 | 0.693 | 28/1,200 | |
| rebench_evicted | 0.845 | 0.697 | 32/1,200 | |
| scaleswe_evicted | 0.852 | 0.750 | 40/1,200 |
| Cell | Step 350 | Step 500 | Solved | Early exits | |
|---|---|---|---|---|---|
| r2e_evicted | 0.973 | 0.968 | |||
| rebench_evicted | 0.963 | 0.951 | |||
| scaleswe_evicted | 0.970 | 0.967 |
| Corpus | 9B | s.e. | 4B | Separation |
|---|---|---|---|---|
| R2E-Gym | 0.0077 | 12.4 s.e. | ||
| SWE-rebench V2 | 0.0092 | 0 9.6 s.e. | ||
| Scale-SWE | 0.0085 | 13.4 s.e. |
| Arctic-SWE on raw R2E-Gym | FrogNano | |
| Base model | Qwen3.5-4B | Qwen3.5-4B |
| Harness / objective | Mini-SWE-Agent-Plus / CISPO | Leaf / DPPO |
| Verified evaluation | 483 tasks, 4 rollouts, 100 max turns, temperature 1.0, top- 0.95, top- 20 | 500 tasks, 3 seeds, 150 max turns, temperature 0.6 top- 0.95, top- 20 |
| Best checkpoint (%) | 61.96 (update 340) | 61.5 |
| Mean, updates 300–500 (%) | 58.44 | Not reported |
| Trainer / inference GPUs | 2 / 6 | 2 / 6 |
| Setup | Per-sandbox resources | $/slot-h | Total ($) |
|---|---|---|---|
| Ours, EC2 pool (on-demand) | 4 vCPU / 16 GiB limits | 0.0970 | 1,709 |
| Northflank | 4 vCPU / 16 GB | 0.2000 | 3,524 |
| Morph Devboxes | 4 vCPU / 16 GiB | 0.2000 | 3,525 |
| Prime Intellect | 4 vCPU / 16 GB | 0.3600 | 6,344 |
| Daytona † | 4 vCPU / 16 GiB | 0.4608 | 8,121 |
| E2B † | 4 vCPU / 16 GiB | 0.4608 | 8,121 |