TRANSMISSION // 2611.29193v1
A Coding Agent Learns from Its Own Failed Fixes
Source published
DFPO uses test-checked rewrites within a coding task to give an AI agent more focused training feedback. In reported repository-repair tests, it outperformed GSPO, though the evidence is limited to the paper’s setups.

When a coding agent spends many steps changing a repository, a final pass-or-fail score can reveal whether it succeeded—but not which decisions helped. A preprint proposes a way to learn from locally tested revisions within a single task trajectory, and reports higher repair rates than a comparison method in its experiments.
A coding agent may read an issue, edit code, run tests, revise its approach and only then receive a final score. If that score arrives at the end, it offers little direct guidance about which earlier choices were useful. This is a familiar challenge in reinforcement learning: assigning credit for an outcome that follows a long sequence of actions.
Fei Ding’s preprint introduces Direct Feedback Policy Optimization, or DFPO, for repository-repair agents. Its central idea is to use a failed local test as an opportunity to generate and check a revision, then use the passing and failing versions as a focused training comparison. The method still relies on the task’s final reward; it does not replace end-of-task evaluation with a complete set of reliable step-by-step scores.
Rewriting a piece of the agent’s history
In the reported setup, an agent works on a coding task and runs a local test. If the test fails, the system gives the model the relevant earlier output, the error and repository context, and asks it to produce a repair. The repair can revise the agent’s recorded earlier response. The system replays the affected commands in the workspace and tests the revised version.
A revision is accepted only if the original version fails the same test, the candidate passes, and a check by the model does not flag test gaming—for example, weakening an assertion rather than fixing the code. Accepted output and the actual observations from replay are spliced into the trajectory, and the task continues.
DFPO then compares the original and revised assistant text. An edit-distance mask identifies tokens that differ, so the training update focuses on changed text rather than treating every token in a long response alike. Local tests determine which version is preferred; the task’s terminal reward sets the update’s weight. The training procedure skips tasks whose terminal reward is not positive, even though some tasks that do not meet the strict success criterion can still receive positive partial scores.
What the experiments report
The paper evaluates repository repair using the Qwen3.5-35B-A3B base model, with LoRA updates, and compares methods using the same model and execution harnesses. It reports three-seed averages for its main SWE-mini training experiments, with training compute matched by end-to-end GPU hours.
On the SWE-rebench holdout of 110 problems, the reported strict resolution rates were 17.3% for the base model, 19.4% for GSPO, 21.1% for GSPO plus BASIS, and 28.5% for DFPO. On a 500-problem SWE-bench Verified evaluation, the corresponding reported rates were 44.2%, 48.5%, 51.7% and 62.4%. The paper also reports a separate OpenHands SDK comparison: 64.0% for the base model, 69.2% for GSPO and 78.2% for DFPO.
These results support a limited conclusion: in the tested configurations, DFPO achieved higher reported strict resolution rates than GSPO. The paper’s component tests also suggest that the repair comparisons and token mask matter in this setting: removing the retry loss or the mask reduced the reported rate. Such ablations help examine the design, but do not establish that each component will help across coding tasks or training setups.
Why the result needs qualification
Local tests are only as informative as their coverage. A revision that passes a test may still be wrong in an untested situation, and the paper explicitly notes that weak test suites can miss defects. The model’s check for test gaming is another part of the procedure, not a guarantee against it. Nor does an edit mask establish that any individual changed token caused the test outcome; the paper says it does not make that causal claim.
The method also requires rewriting trajectory records, replaying commands and rerunning tests. Flaky tests or changes in external dependencies can make replay inconsistent. While the authors count this work within task time limits, they note that actual wall-clock cost depends on how much generation, replay and testing are needed; the reported resolution rates alone do not settle whether the approach is faster or cheaper overall.
Finally, the study focuses on code repository repair. Its results do not show that DFPO will work in other kinds of interactive tasks. This account is based on the supplied version of an arXiv preprint, not evidence of peer review. The reported benchmark comparisons are promising within their stated conditions, but independent replication and broader testing would help clarify how robust and practical the approach is.
- AI coding agents
- reinforcement learning
- software repository repair
- test feedback
- DFPO
- credit assignment
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
A staged training recipe for AI software repair
Supporting evidence: Both papers report improved repository-repair resolution with training signals more specific than a single outcome reward: DFPO uses locally tested rewrites and terminal-reward weighting, while SWE-Ladder routes privileged evidence to localization, reproduction, and patching stages. The results are compatible, not a direct comparison: the methods, models, scaffolds, and training setups differ.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2611.29193v1 — Original paper
Excerpt reference:
static/papers/2611.29193v1.md:587-781
Basis: Paper text
Source SHA-256:28adc4b854de6f28480799808fc9bae0fa37db3fe80372508544a9a2659cdcea2611.29193v1 — Original paper
Excerpt reference:
static/papers/2611.29193v1.md:782-880
Basis: Paper text
Source SHA-256:28adc4b854de6f28480799808fc9bae0fa37db3fe80372508544a9a2659cdcea2610.33667v2 — Original paper
Excerpt reference:
static/papers/2610.33667v2.md:528-623
Basis: Paper text
Source SHA-256:2c66a6ded8d034078a90831a85355b8001f7c3ae7c24d928c5b8c50e83950818
WebCatalyst trains HTML generators to improve what happens after the first click
Supporting evidence: Both studies report gains in code-generation settings using execution-derived, more localized training feedback: DFPO uses test-validated repair comparisons, while WebCatalyst maps successful browser actions to executed code spans. This supports only a bounded connection between localized execution feedback and reported task improvements; repository repair and interactive HTML generation, their methods, and their evaluation metrics differ.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2611.29193v1 — Original paper
Excerpt reference:
static/papers/2611.29193v1.md:98-170
Basis: Paper text
Source SHA-256:28adc4b854de6f28480799808fc9bae0fa37db3fe80372508544a9a2659cdcea2611.29193v1 — Original paper
Excerpt reference:
static/papers/2611.29193v1.md:587-781
Basis: Paper text
Source SHA-256:28adc4b854de6f28480799808fc9bae0fa37db3fe80372508544a9a2659cdcea2611.05151v1 — Original paper
Excerpt reference:
static/papers/2611.05151v1.md:88-182
Basis: Paper text
Source SHA-256:9a62c171af5acddc5d4a83c938769e3b542946db7ae06ff9cf9433335bef93e1
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
SAEPO gives language-model tokens more specific credit
Source published
Shared keywords: credit assignment, reinforcement learning
How uncertainty can help language models explore
Source published
Shared keywords: credit assignment, reinforcement learning
An AI Agent’s Past Attempts Become a Checklist for Training
Source published
Shared keywords: credit assignment, reinforcement learning
WebCatalyst trains HTML generators to improve what happens after the first click
Source published
Shared keywords: credit assignment, reinforcement learning
Can AI learn what each person’s memory should keep?
Source published
Shared keywords: credit assignment, reinforcement learning