Repository-level software repair is commonly approached by placing a language model in a free-form loop: the model explores the codebase, runs commands, edits files, interprets failures, and decides when the issue is resolved. This design works well for highly capable models, but it places many responsibilities on the model at once. When a smaller model fails, it is therefore difficult to tell whether it cannot produce the required patch, or whether it becomes lost while organizing the steps that lead to it. This paper studies an alternative design in which the repair process is decomposed into explicit stages. In particular, we separate finding the relevant code, constructing and using an executable signal of the bug, and generating the final edit. This perspective treats the harness not as a passive wrapper, but as part of the system being designed. We evaluate eight open-weight models from two families, ranging from 0.8B to 31B parameters, on a subset of SWE-bench Verified. Our results show that harness-managed control flow can substantially improve the effectiveness of the smallest models. For example, Gemma 4 E2B improves from 5.0% in the free-form loop to 27.4% in the decomposed repair loop and Gemma 4 E4B from 14.6% to 45.7%. Because the stages interact only through the context they build, they need not all be performed by the same model: handing localization and reproduction to stronger open-weight models, while the small model remains responsible only for the edit, raises the same two models further, to 39.8% and 53.7%. These findings suggest that small models can be useful for repository repair when responsibilities are divided across explicit stages that can be independently assigned to the component best suited to each.
Who should own the loop? Harness decomposition for small-model repository repair
AgenticDev 2026, 1st International Workshop on Agentic AI for Next-Generation Software Development, 12-16 October 2026, Munich, Germany
Type:
Conference
City:
Munich
Date:
2026-10-12
Department:
Data Science
Eurecom Ref:
9011
Copyright:
© ACM, 2026. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in AgenticDev 2026, 1st International Workshop on Agentic AI for Next-Generation Software Development, 12-16 October 2026, Munich, Germany https://doi.org/10.1145/3843282.3844442
See also:
PERMALINK : https://www.eurecom.fr/publication/9011