AI
CuraLoc Cuts Token Usage 90% While Finding Bugs Faster in Large Code Repos
A new AI method plans code inspection upfront rather than iteratively, achieving higher accuracy with far fewer model queries when localizing bugs across entire repositories.
Locating exactly where a bug lives in a large codebase remains a stubborn challenge for AI systems. While bug reports tell developers what broke, they rarely point to where the fix belongs. CuraLoc, a new approach from researchers, sidesteps the inefficiency of iterative code navigation by planning the entire inspection strategy upfront.
The Problem with Step-by-Step Navigation#
Existing repository-level fault-localization tools typically ask language models to decide which files and functions to examine one at a time. Each decision triggers a fresh model call, pulling in more source code, consuming tokens with each round. On large codebases, this iterative dance between model and retrieval system balloons token usage and slows the process.
How CuraLoc Works#
Rather than let the model steer each lookup, CuraLoc flips the workflow:
- Plan first: The model examines compact summaries of candidate files (behavioral and structural descriptions of their symbols) and decides, in a single reasoning pass, where to start inspecting and what relationships to follow.
- Retrieve deterministically: Once the plan is set, a deterministic retrieval system fetches all requested source code at once—no repeated model calls.
- Rank and reason: The model's original hypotheses about likely edits guide the final ranking, concentrating AI reasoning on evaluation rather than navigation.
Benchmark Results#
On the SWE-Bench Verified dataset using GPT-5.2, CuraLoc raised the Func@1 accuracy metric from 53.8% (LocAgent) to 59.3% while cutting token usage to just 9.7% of what competitors consumed. It also surpassed RepoSearcher (56.2%) and Agentless (39.6%) on the same metric.
For SWE-bench Lite, CuraLoc achieved 83.8% Func@5 accuracy, a relative improvement of over 15% compared to Agentless. The method also demonstrates flexibility across model backbones, performing well with both GPT-5.2 and GPT-6 Astra.
Why It Matters#
The findings suggest that effective code inspection doesn't require constant back-and-forth with the model. By front-loading the inspection strategy, teams can find bugs faster and cheaper—a meaningful step toward making AI-assisted debugging practical at scale across real-world repositories.

