AI
Loop Structure Beats Added Agents: Small LLMs Localize Multi-File Code Changes Best with Iterative Exploration
Research shows that enabling language models to explore repositories over multiple turns matters more than adding specialized tools or coordinating multiple agents when pinpointing which files need to be changed.
When addressing a software bug, the first step is identifying which files contain the problem—and most real issues touch several files at once. A new study from arXiv evaluates how much architectural complexity actually helps smaller language models tackle this multi-file localization challenge.
The Architecture Question#
Researchers built and tested a series of configurations, each adding a layer of sophistication. They started with a bare model, then added an agent loop with Python REPL access, repository-focused tools that restrict output verbosity, a registry mapping subsystems to specialized domain agents, and finally live consultation with those agents. The question they posed: for a small model, which of these additions truly matters?
Results: Exploration Trumps Structure#
The findings were striking. Most of the performance gain came simply from allowing the model to explore the codebase repeatedly over many turns. Using a plain multi-turn loop with only a REPL, the small model's pooled file-finding accuracy (measured as F1 score) jumped from 0.199 for the model alone to 0.677. Adding repository tools provided marginal, statistically insignificant gains. The domain agent registry actually lowered performance by 0.031 points.
The small model in a simple multi-turn loop (0.695 F1) outperformed all four published baseline localizers tested (highest score: 0.586), and came close to a larger Codex model (0.751).
What Remains Difficult#
Despite the gains, significant blind spots persist. The models still largely miss newly added files and documentation written in natural language—suggesting that localization strategies tuned for existing code patterns may struggle with broader architectural changes.
The researchers released their benchmark, predictions, tool logs, and scripts to support future work in this area.

