Abstract
Large language model (LLM) agents have become capable of discovering and exploiting vulnerabilities in real-world software with limited human intervention. This widens an asymmetry that already favors attackers, who need a single overlooked vulnerability, whereas defenders must find and fix vulnerabilities before they are exploited.
Defenders therefore need markedly better defensive repair agents to keep up with the growing number of discovered vulnerabilities. With each new generation of models, researchers build multi-agent harnesses that outperform a single-agent baseline.
These harnesses, however, are often tuned to a specific model version and may bring smaller gains, or even performance degradation, when used with another model. With the increasing speed at which new models are released, rebuilding a harness by hand for each new generation appears impractical.
We present Reinforcement Building (RB), a framework that automatically builds the harness of a defensive agent for a given model. In each round, RB runs the current harness on training vulnerabilities and grades every patch with an execution oracle.
An optimizer model then proposes edits to its agents, tools, delegation edges and memory, and a validation gate keeps them only if they strictly improve the harness. Without updating any weights, RB improves the repair success rate of two open-weight models on three held-out benchmarks by 58% to 750% relative to the base harness (8.5 to 36.1 percentage points).
On SEC-bench, it outperforms ContraFix, the state-of-the-art harness builder for vulnerability repair, by 21% relative for both models. Compared with reinforcement learning with verifiable rewards (RLVR) on the same data, RB needs 7.4 times fewer training episodes to reach the same success rate on Gemma-4-31B.