Introducing Failure-Conditioned Reinforcement Learning for Long-Horizon Software Engineering Agents

Research 0 views

FC-SWE trains coding agents from failed patches and verifier feedback, reaching 52.8% Resolved@2 and 70.7% Resolved@11 on SWE-bench Verified.

Key Takeaways

  • FC-SWE is a reinforcement learning method for long-horizon software engineering agents that uses failed patch attempts as structured training signals rather than discarded runs.
  • After a patch fails verification, the repository is restored and the next attempt is conditioned on the original issue, the failed patch, and verifier feedback to support recovery.
  • The method combines trajectory-local rewards and active-set advantage estimation to keep learning tied to each attempt’s outcome and to comparable trajectories for the same issue.
  • On SWE-bench Verified with Qwen3.5-4B and SWE-agent, FC-SWE reaches 52.8% Resolved@2 versus 48.5% for GRPO, and 70.7% Resolved@11 under verifier-assisted evaluation.
  • The paper is currently available, while the code is planned for release in a dedicated NVIDIA NeMo RL branch.

FC-SWE is a reinforcement learning method for long-horizon software engineering agents that treats failed patch attempts as training material instead of discarded runs. The approach matters because coding agents often need multiple repository edits, test checks, and repair cycles before an issue is resolved; FC-SWE builds that recovery process directly into learning.

Background: Why Failed Patch Attempts Need a Training Signal

Long-horizon software engineering tasks are not single-response problems. An agent receives an issue, modifies a repository, and then relies on a verifier to decide whether the patch passes. If the verifier fails the patch, the agent may still have useful information: what was attempted, what feedback was returned, and how the repository state changed during the failed run.

The question FC-SWE addresses is how to train coding agents to learn from those failed attempts. In many agent workflows, a failed patch is treated only as a reason to try again. FC-SWE instead makes recovery part of reinforcement learning, using the failure itself as a structured condition for the next attempt.

Development: How FC-SWE Turns Verification Feedback Into Recovery

The method follows a repository-level loop. After a patch fails verification, the repository is restored to its original state. A fresh attempt is then conditioned on three pieces of information: the original issue, the failed patch, and the verifier feedback. This gives the agent a clearer context for retrying rather than starting from an unchanged prompt.

Two training mechanisms support this process. First, trajectory-local rewards preserve each attempt’s own outcome. That means one attempt’s result is not mixed into another attempt’s reward signal, which keeps the learning process tied to the specific action and verification result.

Second, active-set advantage estimation compares only trajectories actually executed for the same issue. This avoids comparing unrelated tasks with different difficulty levels and keeps advantage estimates focused on the recovery paths the agent actually explored.

Latest Results: 52.8 Percent Resolved@2 and 70.7 Percent Resolved@11

The reported setup uses Qwen3.5-4B with 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 the GRPO baseline. The result shows that conditioning recovery attempts on failed patches and verifier feedback improved cumulative success within two attempts.

FC-SWE also reached 70.7% Resolved@11, despite training with at most two attempts per chain. That distinction is important: the training process does not require long chains of attempts, yet the evaluation can still measure success across a larger budget of retries.

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. In practical terms, it reflects how often the agent can resolve an issue when it is allowed to use verification feedback across multiple attempts.

Current Status: Paper Available, Code Coming Soon

The paper is available, while the code is not yet released. The stated plan is to publish the code in a dedicated branch of NVIDIA NeMo RL and update the announcement page when it becomes available. The work is presented to the agent RL and software engineering communities for feedback and discussion.

At this stage, FC-SWE is a research method with benchmark results and a planned code release. The next visible milestone is the dedicated NVIDIA NeMo RL branch. Until then, the main public signal remains the reported Qwen3.5-4B and SWE-agent results on SWE-bench Verified: 52.8% Resolved@2 and 70.7% Resolved@11 under verifier-assisted evaluation.

Meta description: FC-SWE trains coding agents from failed patches on SWE-bench Verified, reaching 52.8 percent Resolved@2 with Qwen3.5-4B and SWE-agent after verifier feedback.

Tags: FC-SWE, SWE-bench Verified, reinforcement learning, coding agents, NVIDIA NeMo RL

Featured image: abstract technology illustration of a repository repair loop, with branching code paths, test feedback markers, and neural-style optimization traces; no real people, no company logos, no text.

Tags: coding agentsreinforcement learningsoftware engineeringfailed patchesSWE-bench

Comments

No comments yet. Be the first to comment.

Leave a comment