TRANSMISSION // 2611.36559v2
AI Repair Agents Can Improve Their Own Toolkits
Source published
A preprint reports that automatically adapting AI agents’ tools and instructions improved vulnerability-repair benchmark results without changing model weights.

A software-repair agent can identify a flaw yet get stuck, make a broken edit or stop before checking its work. A preprint tests whether changing the tools and rules around an AI model can help it repair vulnerabilities more reliably—without retraining the model itself.
A language model tasked with repairing software can have the right idea and still fail. It may repeat commands, make an edit that does not apply or stop before checking whether its patch works. The system around the model—its instructions, tools and rules for when to stop—can shape what happens next. But a setup designed for one model may not suit another.
In an arXiv preprint, Amine Lbath and colleagues introduce Reinforcement Building (RB), a method for adapting that surrounding system, known as a harness. They ask whether an automated process can improve vulnerability-repair agents by changing their harnesses rather than retraining their models.
Learning from failures
RB works in rounds. A model attempts repairs using its current harness. An execution oracle checks the resulting patches, while an optimizer model reads the attempts—including failures—and proposes changes. RB’s edit system can modify instructions, tools, agents, delegation links and runtime controls. But in the reported builds described in the results, the harnesses kept a single agent; changes to delegation were a capability of the framework, not an observed experimental result. The target model’s weights stay unchanged.
Proposed changes face a statistical gate using held-out tasks. The method screens candidates for gains, confirms promising changes on fresh runs, and uses statistical tests to decide whether to accept them. It also checks for marked increases in the number of steps and rejects changes that violate its safeguard unless task-level evidence supports the gain. These procedures are intended to reduce overfitting; they do not guarantee improvement in every setting.
The researchers tested three open-weight models on three held-out repair benchmarks: SEC-bench, CyberGym-E2E and PatchBench. Training vulnerabilities came from a separate pool, and projects used for training were excluded from evaluation benchmarks. There was a qualification: five gate projects also appear in SEC-bench. Comparisons included a basic harness, the harness-building methods EvoRepair and ContraFix, and methods that update model weights. All vulnerabilities used in the work were public, and experiments ran in isolated containers.
For training, the execution oracle checked whether a patch built and stopped the proof-of-vulnerability from triggering. It also applied additional safeguards: variants of the proof had to avoid crashing the patched program, LeakSanitizer had to remain clean, and the project’s seed corpus had to run without error. The paper describes execution-based evaluation across benchmarks; these specific extra safeguards are stated for training, not as identical criteria for every evaluation benchmark.
Gains in the tested benchmarks
Across the nine model-and-benchmark pairings, the paper reports relative improvements over the basic harness ranging from 26% to 750%, with a median of 77%. It also reports absolute gains of 10.6 to 36.1 percentage points. Relative and percentage-point gains describe different things, and the size of the improvement varied by model and benchmark.
On SEC-bench, Gemma-4-31B’s success rate rose from 45.5% with the basic harness to 77.7% with RB. Gemma-4-E4B rose from 4.8% to 40.8%, and GPT-OSS-120B from 59.5% to 91.8%. RB did not lead every comparison: ContraFix had a higher reported Gemma-4-31B success rate than RB on PatchBench. The results show improvements over the basic harness in the reported tests, not blanket superiority over every alternative.
The harnesses addressed different problems. For Gemma-4-31B, RB added, among other changes, a guard against repeated commands and a way to restart with a progress note. Unfinished episodes—runs that ended before the agent submitted a patch—fell from 45% to 0.5%. For Gemma-4-E4B, the harness added tools for viewing and editing source code and checking repairs. With RB, the agent rebuilt the project and reran the proof-of-vulnerability 9.4 times per episode, compared with 5.1 times before; 41% of episodes ended with a correct patch. The harness required a successful check before the agent could finish.
In one efficiency comparison, RB reached a 77.7% SEC-bench success rate for Gemma-4-31B after 190 training episodes. RLVR, a method that updates model weights using verifiable rewards, reached the same rate after 1,408 episodes in the reported experimental setup. This result does not establish the same episode advantage for other models, benchmarks or training choices.
What remains uncertain
A harness built for one model did not reliably transfer to another; some transferred harnesses reduced performance. The optimizer also mattered in the tested comparisons: improvements were smaller when Gemma-4-31B optimized its own harness than when other optimizers were used. The authors’ results suggest that a stronger optimizer can help, but this evidence comes from a limited set of tested optimizer and target-model combinations.
Three benchmarks cannot establish how the method would perform across all software, vulnerabilities or repair workflows. That is a limit on the evidence, not a finding about real-world deployment. Passing an execution oracle’s checks also does not prove that a program is secure in every context.
The authors discuss risks including manipulated training data and dual-use applications, and note that the resulting harness can be inspected. All experiments were limited to vulnerability repair and conducted in isolated containers. This is a preprint reporting controlled benchmark results: promising evidence for a way to adapt repair agents, not proof that automatically built harnesses are ready for deployment.
- AI cybersecurity
- vulnerability repair
- language model agents
- agent harness
- software security
- Reinforcement Building
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.
Can coding agents learn from security mistakes?
Shared method: Both methods iteratively revise agent guidance and retain changes only after execution-based evaluation: RB gates harness edits on held-out tasks, while PRECEPT tests principle revisions against fresh executions and a functional-performance floor. This is a shared validation pattern, not evidence that either method’s results transfer to the other’s task.
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.36559v2 — Original paper
Excerpt reference:
static/papers/2611.36559v2.md:2023-2085
Basis: Paper text
Source file SHA-256:12226ce017d1a99fc72f68e42cf93438a1cfaf1a09b4eb28c3151d1361c5ef1f2611.33519v1 — Original paper
Excerpt reference:
static/papers/2611.33519v1.md:1200-1275
Basis: Paper text
Source file SHA-256:83f40a1b3c96a19bef22a8b3f9c5a876e4fca944e4a9e06a075c871aeede6be4
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
How Hyenas coordinates AI agents to find software flaws
Source published
Shared keywords: ai cybersecurity, software security
Why AI vulnerability hunters keep finding bugs after they’re fixed
Source published
Shared keywords: ai cybersecurity, software security
How Well Can AI Localize Vulnerable Code?
Source published
Shared keywords: software security
Perdura gives AI agents a runtime memory for task state
Source published
Shared keywords: agent harness
Can AI cyber assistants help defenders without helping attackers?
Source published
Shared keywords: ai cybersecurity