Source-linked AI summary

SWE-World: Building Software Engineering Agents in Docker-Free Environments

Shuang Sun, Huatong Song, Lisheng Huang, Jinhao Jiang, Ran Le, Zhihao Lv, Zongchao Chen, Yiwen Hu, Wenyang Luo, Wayne Xin Zhao, Yang Song, Hongteng Xu, Tao Zhang, Ji-Rong Wen

arXiv:2602.03419v1cs.SEcs.CL

TL;DR

Docker-based execution feedback makes software engineering agent training and evaluation costly to construct and maintain. SWE-World replaces physical execution with learned repository-level transition and reward models while preserving agent–environment interaction. On SWE-bench Verified, Qwen2.5-Coder-32B reaches 68.2% with Docker-free test-time scaling after Docker-free SFT and RL.

  • Problem

    Docker-based SWE execution requires dependency-complete environments, creating resource-intensive setup and maintenance burdens that limit scalability.

  • Method

    SWE-World uses learned surrogate models to predict intermediate execution feedback and final test evaluation while retaining the standard agent–environment loop.

  • Results

    68.2% resolve rate was achieved by Qwen2.5-Coder-32B with Docker-free test-time scaling on SWE-bench Verified.

  • Takeaways & Limitations

    SWE-World supports Docker-free data synthesis, supervised fine-tuning, reinforcement learning, and test-time solution selection.

  • Takeaways & Limitations

    The reward model’s black-box formulation provides limited interpretability and can be sensitive to long, noisy trajectories.

Abstract

from arXiv · show

Recent advances in large language models (LLMs) have enabled software engineering agents to tackle complex code modification tasks. Most existing approaches rely on execution feedback from containerized environments, which require dependency-complete setup and physical execution of programs and tests. While effective, this paradigm is resource-intensive and difficult to maintain, substantially complicating agent training and limiting scalability. We propose SWE-World, a Docker-free framework that replaces physical execution environments with a learned surrogate for training and evaluating software engineering agents. SWE-World leverages LLM-based models trained on real agent-environment interaction data to predict intermediate execution outcomes and final test feedback, enabling agents to learn without interacting with physical containerized environments. This design preserves the standard agent-environment interaction loop while eliminating the need for costly environment construction and maintenance during agent optimization and evaluation. Furthermore, because SWE-World can simulate the final evaluation outcomes of candidate trajectories without real submission, it enables selecting the best solution among multiple test-time attempts, thereby facilitating effective test-time scaling (TTS) in software engineering tasks. Experiments on SWE-bench Verified demonstrate that SWE-World raises Qwen2.5-Coder-32B from 6.2\% to 52.0\% via Docker-free SFT, 55.0\% with Docker-free RL, and 68.2\% with further TTS. The code is available at https://github.com/RUCAIBox/SWE-World

1 Introduction

SWE agents rely on Docker-based execution feedback, but dependency-complete environments create substantial scalability barriers. SWE-World replaces physical execution with learned feedback models, enabling Docker-free training, evaluation, and test-time scaling.

  • Motivation: Docker-based SWE execution requires dependency-complete repositories, making environment setup, dependency resolution, and program execution resource-intensive.This overhead complicates reliable construction and maintenance of execution feedback.
  • Motivation: Docker-centric pipelines limit data scalability because many real-world repositories and pull requests cannot reliably build or execute in containers.Complex or brittle dependency configurations prevent broader use of real-world GitHub data.
  • SWE-World: Lightweight file-system operations remain deterministic, while execution-oriented feedback is handled by learned models.This separates inexpensive navigation, inspection, and editing from costly repository-specific execution.
  • Results: 52.0% resolve rate was achieved by Qwen2.5-Coder-32B after Docker-free SFT, rising to 55.0% with additional Docker-free RL.These experiments were conducted on SWE-bench Verified.
  • Results: 68.2% resolve rate was achieved by Qwen2.5-Coder-32B with Docker-free test-time scaling.The learned reward model evaluates and selects candidate solutions.
  • SWE-World: SWE-World replaces physical execution environments with a learned surrogate while preserving the agent–environment interaction loop.The framework is designed to approximate execution feedback traditionally obtained from Docker-based environments.

2 Related Work

Related work follows either agent-based interaction in authentic sandboxed environments or more efficient agentless pipelines. SWE-World retains agentic exploration while replacing physical execution with an LLM-based environment simulator.

  • Agent-based approaches: Agent-based SWE systems use sandboxed environments such as Docker to generate interaction trajectories for supervised fine-tuning and reinforcement learning.This approach supports autonomous environment interaction but incurs substantial resource overhead because samples typically require dedicated containers.
  • Agentless approaches: Agentless systems decompose issue resolution into fault localization, code repair, and patch verification.Their predefined workflows are more efficient but can restrict autonomous exploration and adaptive reasoning.
  • SWE-World: SWE-World diverges from both paradigms by preserving an agentic loop while introducing an LLM-based environment simulator.The approach targets the resource limitations of physical execution without adopting a fixed multi-stage workflow.

3 Preliminaries

SWE issue resolution is modeled as an interactive process in which an agent modifies a repository and receives execution feedback. The environment combines lightweight workspace operations with heavyweight repository-specific execution, motivating SWE-World’s learned execution surrogate.

  • Interactive repair: The code agent proposes edits and commands while modifying a mutable repository workspace through interaction with an execution environment.At each step, the environment returns feedback, and the episode ends when the agent submits a patch.
  • Task formulation: A SWE task instance consists of an issue description and a reference repository snapshot, with validation tests defining a correct fix.The instance is represented as I = (R, b, d, U).
  • Evaluation: Final evaluation runs the designated unit tests on the submitted patch, assigning reward 1 exactly when all required tests pass.The test report summarizes execution logs, while the binary reward follows the standard pass criterion.
  • Execution environments: The execution environment must support both lightweight file navigation and editing and heavyweight repository-specific program and test execution.This combination is a central challenge in SWE environments.
  • Execution environments: A sandbox deterministically supports navigation and editing but typically cannot run repository-specific programs or tests because dependencies and runtime setup are missing.Docker adds dependency-complete execution but introduces brittle image construction and infrastructure overhead.
  • SWE-World environment: SWE-World retains a deterministic sandbox for file operations and replaces Docker’s execution component with learned models.This design targets the repository-specific execution bottleneck while preserving lightweight workspace interaction.

4 SWE-World: LLM-Based Docker-Free Environment

SWE-World replaces Docker-based execution with a learned surrogate while retaining deterministic workspace operations and agent–environment feedback. Its transition and reward models predict execution behavior and structured test outcomes from interaction data, supporting Docker-free training and interpretable solution selection.

  • Framework Overview: SWE-World approximates containerized runtimes by training LLMs on real agent–environment traces to predict execution feedback without Docker.The surrogate environment decouples agent optimization and inference from physical execution.
  • Environment Design: Navigation and editing use a deterministic lightweight sandbox, while repository-specific execution is handled by the learned SWE-World Transition Model.The sandbox preserves workspace consistency, whereas SWT predicts step-level feedback for commands whose outputs depend on runtime semantics.
  • Transition Model: SWT predicts realistic step-level execution feedback from the problem context, current agent patch, simulated command, and relevant code content.Its outputs can include error tracebacks and printed logs, enabling iterative debugging without Docker execution.
  • Reward Model: SWR simulates unit-test execution on the final patch, generates a structured test report, and assigns a binary reward aggregated across test cases.A single failing test case determines the zero-reward outcome, and the report provides an interpretable verification signal.
  • Training Data: SWT and SWR are trained by supervised fine-tuning on data collected from SWE-agent interactions with real execution environments.The corpus contains transition samples from Docker outputs and reward data from executed unit tests; one rollout also yields multiple environment-model samples and an agent-training trajectory.
  • Training Data: Chain-of-Thought data is generated by reverse reasoning from contexts and ground-truth feedback, filtered by an LLM judge, and used to train both models to predict reasoning plus feedback.The target format is <think>CoT</think>yGT.

5 Training SWE Agents with SWE-World

SWE-World supports an end-to-end Docker-free training and inference pipeline by replacing container-dependent execution feedback with learned surrogate services. The pipeline prepares broader data, filters trajectories, trains agents with SFT and RL, and uses SWR for test-time candidate selection.

  • SWE-World establishes a fully Docker-free pipeline for scalable data curation, supervised fine-tuning, and reinforcement learning.
  • 5.1 Software Eengineering Data Preparation: 16.6K high-quality instances form a newly curated dataset assembled from GitHub pull requests and issues after deduplication and heuristic filtering.The dataset covers more tasks and repositories than prior SWE datasets, offering broader coverage and diversity.
  • Generated trajectories are filtered by invalid tool usage, timeouts, context length, turn limits, missing submissions, and SWR verification before agentic SFT.Only trajectories receiving positive surrogate rewards are retained for training.
  • Docker-free RL uses SWT for transition feedback and SWR for terminal rewards, requiring inference servers instead of Docker containers.The policy is optimized with a stabilized GRPO variant using clipped objectives, leave-one-out advantages, and length normalization.
  • 5.4 Test-Time Scaling with SWR: SWR enables test-time scaling by scoring multiple candidate trajectories and selecting the trajectory with the highest average score.Multiple SWR queries are averaged to mitigate verification variance.

6 Experiments

Experiments evaluate SWE-World on SWE-bench Verified through agent, transition-model, reward-model, and data-quality studies. Results show strong Docker-free performance, effective simulated feedback, and training trajectories comparable to Docker-generated data.

  • Experimental Settings: SWE-bench Verified evaluates resolve rate on 500 real-world GitHub issue–PR tasks across 12 Python repositories.The metric is the fraction of instances whose final patch passes all designated tests.
  • Experimental Settings: The evaluation compares Docker-free SWE-World agents with Docker-based and open-source baselines, using Docker execution for final verification.The setup also prohibits solution-revealing git commands to prevent git hacking.
  • Main Results: 68.2% resolve rate is reached with SWR-based TTS@8, while Qwen2.5-Coder-32B rises from 6.2% to 52.0% with SFT and 54.8% with RL.The main-results comparison identifies this as the strongest reported test-time-scaled result and places the model at the frontier among open-source 32B models.
  • Main Results: 60.2% resolve rate is achieved by Minmax M2.1 with SWT-72B transition feedback, exceeding GLM-4.7 at 59.4% and Minimax-M2.1 at 56.2%.This evaluates transition feedback while holding the code agent fixed and obtaining final rewards from Docker tests.
  • Main Results: 0.770 Accuracy and 0.780 Precision are achieved by SWR-72B against Docker ground truth, surpassing GLM-4.7 on both measures.SWR-32B reaches 0.754 Accuracy and 0.779 Precision.
  • Ablation Study: 52.2% resolve rate from SWE-World trajectories slightly exceeds 51.4% from Docker trajectories, while mixing 9.3K trajectories reaches 53.8%.The comparison uses parallel 5.7K-trajectory datasets under identical expert agents and prompt settings, differing only in rollout backend.

7 Further Analysis

Further analyses examine CoT, reinforcement-learning stability, test-time scaling, and simulation fidelity. They show that CoT is especially important for reward modeling, while SWE-World provides stable training, scalable verification, and realistic feedback.

  • 7.1 Impact of Chain-of-Thought: CoT improves SWR reward prediction substantially but yields only marginal downstream gains for SWT.SWT improves resolve rate by 0.8%, whereas SWR accuracy rises from 0.578 to 0.712.
  • 7.2 RL Training Dynamics: The main RL run shows steadily increasing reward and gently declining interaction length without degenerate behavior.
  • 7.2 RL Training Dynamics: The non-CoT reward model causes trajectory length to collapse after step 20 as the policy exploits low-precision rewards with invalid short solutions.
  • 7.3 Test-Time Scaling: SWR-32B improves from 55.0 at K=1 to 68.2 at TTS@8, outperforming R2E-Gym-Verifier-14B and OpenHands-32B-Verifier at TTS@8.Its performance improves monotonically from K=1 to K=8, while prior verifiers plateau or fluctuate.
  • 7.4 Qualitative Fidelity: SWT closely matches real step outputs, while SWR preserves the semantics of test-based verification despite standardized report formatting.SWT reproduces key output and failure details; SWR correctly identifies passing tests including F2P and P2P sets.

8 Conclusion

The conclusion presents SWE-World as an execution-free framework using repository-level environment and reward simulation models. Evaluation shows comparable performance to ground-truth execution while supporting test-time scaling and broader data access.

  • SWE-World uses SWT and SWR to provide a fully Docker-free pipeline for data synthesis, supervised fine-tuning, and reinforcement learning.
  • On SWE-bench Verified, agents trained with SWE-World achieve performance comparable to agents trained with ground-truth execution feedback.
  • SWR enables test-time scaling by selecting stronger solutions without executing actual unit tests.
  • Removing the dependency on buildable environments exposes previously inaccessible resources such as unbuildable pull requests and issues.

A.2 Instance Meta Data in SWT/SWR Contexts

SWT and SWR contexts are built from shared instance metadata and agent state, with SWR additionally incorporating validation tests for final-patch evaluation.

  • Initial Analysis generated from instance metadata summarizes failure behavior, likely root cause, and intended fix direction for SWT and SWR.
  • At step t, SWT receives the problem statement, Initial Analysis, hidden reference patch, current agent patch, and execution content.
  • SWR uses an evaluation context containing instance metadata, the agent patch, execution content, and unit tests divided into FAIL_TO_PASS and PASS_TO_PASS sets.

B.1 Detailed Training Setup

The training setup collects real Docker interaction data, filters invalid trajectories, augments supervision with CoT, and trains SWT/SWR models with structured outputs and specified infrastructure.

  • Training data comes from three open-source SWE datasets and Docker rollouts recording step outputs, final test reports, and rewards.
  • Both successful and failed rollouts are retained when valid Docker outputs can be extracted, while corrupted environments are filtered out.
  • CoT augmentation produces non-CoT and CoT supervision for SWT and SWR training datasets.
  • SWT and SWR are trained with Qwen2.5-32B-Instruct and Qwen2.5-72B-Instruct, alongside MinMax-M2.1 and GLM-4.7 prompting baselines.
  • Outputs use strict JSON schemas: SWT predicts stdout, stderr, and exit_code, while SWR predicts a test_report and reward.
  • SFT runs use AdamW, DeepSpeed ZeRO-3, BF16, FlashAttention, ring attention, and gradient checkpointing.
  • The final models include 32B and 72B SWT variants and 32B and 72B CoT SWR variants trained on 26K or 21K examples.

C Training Details for Docker-Free SFT with SWE-World

SWE-World SFT data is collected through Docker-free rollouts that replace Docker feedback with learned step-level and trajectory-level signals. The training pipeline filters these rollouts for successful, valid, and resource-bounded trajectories before fine-tuning two policy backbones.

  • Data Collection with SWE-World Rollouts: Docker-free rollouts use R2E-Gym with at most 100 interaction turns and combine R2E-Gym, SWE-Gym, SWE-rebench, and SWE-World tasks.SWT provides step-level feedback, while SWR assigns the trajectory-level reward after termination.
  • Trajectory Filtering: 5.7K SWE-World-only trajectories remain after filtering successful, bounded, and well-formed trajectories for Docker-free SFT.Filtering retains reward = 1 trajectories, removes samples exceeding 80K tokens or 100 turns, and discards malformed actions.
  • Backbones: The SFT backbones are Qwen2.5-32B-Coder-Instruct and Qwen3-4B-Instruct-2507.
  • SFT Hyperparameters: SFT runs for 5 epochs with an 80K-token context, global batch size 256, AdamW, and a cosine learning-rate schedule from 5 × 10−5 to 5 × 10−6.The schedule warms up for 10% of training before decay.

D Training Details for Docker-Free Agent RL with SWE-World

Docker-free RL replaces physical execution with SWE-World models while initializing policies from Docker-free SFT checkpoints and optimizing them with stabilized GRPO++. The section also describes deterministic inference settings, RL budgets, and construction of the SWE-World dataset used in the broader training setup.

  • Task Pool: The unified RL task pool combines the R2E-Gym, SWE-Gym, and SWE-rebench datasets.
  • Execution-Free Rollouts with SWE-World: RL rollouts replace Docker with SWT-32B for step feedback and SWR-32B for terminal unit-test rewards after patch submission.Both models use 128K-token contexts and temperature 0.
  • Policy Initialization: RL policies start from the SWE-World-4B-SFT and SWE-World-32B-SFT Docker-free SFT checkpoints.
  • Optimization with GRPO++: GRPO++ stabilizes group-based policy optimization with clipped ratios, leave-one-out advantages, and length normalization.The objective and related definitions are provided for the optimization procedure.
  • Return Definition with SWR: The scalar return uses SWR's terminal reward directly for submitted rollouts and scales it by α = 0.5 otherwise.
  • RL Hyperparameters and Rollout Budget: RL training uses 4 parallel rollouts per problem, 150-turn trajectory caps, 108K-token contexts, and 5,400-second per-trajectory timeouts.Optimization uses a 1×10−6 learning rate and batches of 32 problems per update.

F.2 Dataset Statistics

The collected SWE-World dataset contains 16,550 instances across 3,763 repositories, with relatively small average patches and separate verification and regression-test statistics. Its construction filters GitHub Archive issue–PR pairs and deduplicates them against existing SWE datasets.

  • Dataset Statistics: The dataset contains 16,550 instances from 3,763 unique repositories.Each solution patch modifies 1.55 files and 18.76 lines of code on average.
  • Dataset Statistics: Each instance includes averages of 1.98 FAIL_TO_PASS verification tests and 42.11 PASS_TO_PASS regression tests.
  • Dataset Comparison: The dataset comparison reports a larger training scale while maintaining reasonable complexity in modified files and lines.
Loading 2602.03419v1…