A failure-conditioned reinforcement learning method is presented for long-horizon software engineering agents.
Failure-conditioned learning trains coding agents from failed patches, improving Qwen3.5-4B to 52.8% Resolved@2 on SWE-bench Verified.
Key Takeaways
- FC-SWE is a failure-conditioned reinforcement learning method for long-horizon software engineering agents, turning failed patches into useful training context.
- After verification fails, the repository is reset and the next attempt is conditioned on the issue, the failed patch, and verifier feedback.
- The method uses trajectory-local rewards and active-set advantage estimation to preserve attempt outcomes and compare only executed recovery trajectories.
- On SWE-bench Verified with Qwen3.5-4B plus SWE-agent, FC-SWE reached 52.8% Resolved@2 and 70.7% Resolved@11, outperforming a GRPO baseline.
- The results reflect a verifier-assisted retry protocol, not single-shot leaderboard performance, with code planned for release in NVIDIA NeMo RL.
Title: FC-SWE Lifts Qwen3.5-4B Coding Agents to 52.8% Resolved@2
Meta description: FC-SWE trains coding agents from failed patches by conditioning retries on the issue, patch, and verifier feedback, improving Qwen3.5-4B on SWE-bench Verified.
Tags: FC-SWE, coding agents, reinforcement learning, SWE-bench Verified, Qwen3.5-4B
Featured image: Abstract friendly illustration of a code patch resetting into a new attempt, with glowing verification marks and loop arrows, no people, logos, or text.
FC-SWE offers a concrete way to make failed coding attempts useful for reinforcement learning and software engineering readers. It is a failure-conditioned reinforcement learning method for long-horizon software engineering agents, built around a simple training loop: when a patch fails verification, the repository is restored to its original state, and a fresh attempt is conditioned on the original issue, the failed patch, and verifier feedback.
Failure becomes part of the loop
The method treats a failed patch as context for the next attempt rather than as a dead end. This changes how recovery is learned. The retry does not start from a blank slate; it starts from a structured description of what was attempted and how the verifier responded.
Two scoring rules keep retries comparable
FC-SWE uses two mechanisms to train these recovery chains. Trajectory-local rewards preserve each attempt's own outcome, so the result of a failed patch is not overwritten by a later retry. Active-set advantage estimation compares only trajectories that were actually executed for the same issue, keeping the learning signal tied to observed attempts.
Results on SWE-bench Verified
The reported setup uses Qwen3.5-4B plus SWE-agent on all SWE-bench Verified tasks, averaged over three decoding seeds. FC-SWE reached 52.8% Resolved@2, compared with 48.5% for a GRPO baseline. It also reached 70.7% Resolved@11, despite training with at most two attempts per chain.
The announcement notes that these are verifier-assisted results: the evaluation controller uses benchmark-test feedback between attempts. Resolved@K measures cumulative success within K attempts, not independent-sampling Pass@K and not standard single-attempt leaderboard performance. The numbers therefore describe an assisted retry protocol rather than a single-shot leaderboard score.
What comes next
A paper is referenced, and code is planned for a dedicated branch of NVIDIA NeMo RL. The code is coming soon, and the page will be updated when it is available. The work is shared with the reinforcement learning and software engineering communities for feedback and discussion.
For readers evaluating coding-agent training methods, the value is in the retry design: failed patches remain visible to the learning process, and the reward rules are written to preserve attempt-level outcomes. The reported SWE-bench Verified results show higher cumulative success in the tested setup, while the pending code release will let others inspect and build on the approach.

Comments (0)