Editor’s introduction
The study evaluates RepoNavigator, an AI agent designed for locating software issues in large code repositories. It uses a single tool—jumping to the definition of a function or symbol—to simulate real code execution flow, avoiding the complexity of multi-tool pipelines. The agent is trained end-to-end using reinforcement learning, without relying on closed-source models or distillation techniques. Results show it outperforms prior methods like RepoSearcher across multiple metrics, particularly for 14B and 32B model sizes. The improvement is attributed to the unified, structurally grounded tool integration, which aligns better with actual code execution. The evidence does not include a direct comparison of performance across all model sizes or specify the exact nature of the metrics beyond general superiority.
Introduction
With the rapid advancement of Large Language Models (LLMs), equipping LLMs with pre-built tools to form LLM agents has become a common paradigm for expanding their capabilities. In the domain of software engineering (SWE), although LLM agents can effectively handle simple programming tasks, their ability to operate on large-scale software repositories remains limited. SWE-bench currently serves as the most comprehensive benchmark for evaluating whether LLMs can resolve real-world GitHub issues. All pretrained LLMs cannot process the whole repository directly due to context limits. While SWE-Agent provides moderate gains, it remains far from enabling robust repository-level reasoning.
Most existing agents rely on test-time scaling applied directly to pretrained LLMs. In SWE tasks, tools are essential rather than optional: real-world repositories are far larger than the context window of current LLMs, making it impossible to process an entire codebase in a single forward pass. Agents must therefore iteratively invoke tools to retrieve partial information from the repository and interleave natural-language reasoning with tool calls.
Directly training an agent to fix software issues, however, remains difficult. A single bug often admits multiple valid patches, making string-level evaluation unreliable. The only precise evaluation method requires executing candidate patches inside a dedicated Docker environment for each repository, which is prohibitively expensive in terms of CPU resources for supervised training. To make training more tractable, we adopt a simplified yet widely generalizable assignment: issue localization. Prior work shows that a software issue becomes substantially easier to resolve once the relevant functions and files are correctly identified. Since modern software repositories contain a significant amount of code—far beyond any LLM’s context window—localization drastically reduces the search space and improves downstream solvability. Crucially, localization outputs a discrete set of paths, enabling verifiable, string-level evaluation that is compatible with scalable training frameworks such as SFT and RLVR (string-level evaluation requires little resource).
Our main contributions are threefold: (1) We propose the first repo-level localization agent trained using reinforcement learning directly from the pretrained model, without relying on distillation from a closed-source model. (2) We design a repository navigation agent that operates by performing realistic jump operations aligned with actual execution semantics. (3) We demonstrate that one unified tool significantly improves efficiency and controllability compared to multi-tool pipelines.
Agentic Training
LLM agents are promising methods to equip models with complex tools while reasoning. However, because most pretrained LLMs are trained on texts only, and developers can define any tools, most tools are out-of-domain (OOD) for LLMs. Even for the most powerful models, failures often happen when calling the newly defined tools due to a wrong calling format or failed parameter parsing. Thus, training an LLM to master a newly defined tool is critical for LLM agents. Intuitively, the tool-calling trajectories can be generated by a more powerful LLM, and such trajectories can be used to train a student model via supervised finetuning (SFT). However, this pipeline requires a stronger teacher model that has the capability to master the tool. Recently, more methods have emerged with no teacher model required. Rejected-sampled finetuning (RFT) utilizes generated trajectories of the agent itself via multiple rollouts. Agentic RL is an on-policy RLVR method requiring only the result for verifying trajectories. Such training methods yield remarkable results when the tools are search engines, Python executers, calculators, and visual models.
Software Engineering Agents
The introduction of SWE-bench has motivated a range of agentic pipelines for software engineering tasks. Among them, SWE-agent and OpenHands are widely adopted frameworks that equip agents with tools for interacting with computing environments (terminals in Linux). Workflow-based methods such as Agentless decompose issue resolution into localization, repair, and validation subproblems.
While DeepSWE and SWE-Swiss achieve high performance through reinforcement learning, end-to-end training remains computationally expensive due to the overhead of executing Docker containers for patch evaluation. Consequently, issue localization has emerged as a lightweight alternative, focusing on identifying faulty files or functions. Empirical evidence suggests that superior localization significantly improves overall issue resolution efficiency.
Recent localization agents include: LocAgent, CoSIL, and GraphLocator, which model codebases as graphs and integrate them into LLMs, and OrcaLoca, which enhances efficiency through priority scheduling, action decomposition, and context pruning. From an open-source perspective, RepoSearcher, trained with distillation and RL on the Qwen model family, represents a notable advancement.
Method
We present RepoNavigator, a reinforcement-learning agent for repository-level issue localization. The method consists of three components: (1) a unified tool to retrieve the definition of any symbols in a given file, (2) a reasoning–action agent loop that alternates between natural-language reasoning and tool invocation, and (3) a GRPO-based RL algorithm for optimizing long-horizon tool-augmented trajectories.
Import Dependency Graph
Cross-file resolution relies on an import dependency graph that statically emulates the module loading semantics. Import statements introduce bindings from local names to exported symbols of target modules, including re-exports and __all__-based filtering, and resolution may traverse multiple modules before reaching a concrete definition.
Role of Jump
The jump operation is not an oracle that directly reveals task-relevant code. Rather, it abstracts execution-aware navigation already provided by modern IDE language servers for almost all programming languages. Consequently, the agent still faces a long-horizon decision problem: selecting which jump sequences to execute and when to stop exploration. We address this by training the agent with reinforcement learning in the next section.
Datasets
We extract valid samples from SWE-smith to form the training set. We apply Qwen2.5-7B-Instruct with RepoNavigator to sample each data 16 times. A sample is abandoned if all 16 scores are zero. For validation, we test our method on SWE-bench_Verified, and the Python subset of SWE-bench_Pro. For ground-truth locations, we directly use the locations in golden patches. All datasets are open-source and are built on real-world GitHub issues. We add an entry point to the user prompt (for RepoNavigator and all baselines) for each issue as the starting context; details are in Appendix B.
Metrics
Previous works applied recall and precision as metrics. However, because the predicted locations and ground-truth locations are sets of strings, recall and precision singularly cannot reflect the performance fairly. Thus, we utilize sample-F1 (which is the averaged score of per-sample F1 values) and IoU (intersection over union) as our core metrics. At the same time, we also present the recall and precision scores to align with previous methods, although they do not reflect the methods’ performance fairly.
Impact on Tool-Calling Success Rate
The cumulative success rate typically decreases as the number of required tool calls increases. Therefore, in general, completing a task with a single, more versatile tool tends to be more reliable than relying on multiple narrow-scope tools executed in sequence.
Impact on the Prediction Space
Starting from a designated entry point, the recursive application of the jump operation—which resolves the definitions of all referenced symbols—effectively constructs a transitive closure of all semantically activated symbols. Since any code location contributing to a specific issue must inherently reside on a dependency path originating from the entry point, it is logically reachable through this recursive expansion of symbol references. Consequently, the final access scope generated by an exhaustive jump traversal is guaranteed to encompass all locations requiring modification to resolve the issue, excluding only those introduced by dynamic, run-time changes to the repository (e.g., monkey-patching).
Conclusion
In this work, we propose RepoNavigator, a repository-level issue localization agent that replaces complex multi-tool pipelines with a single, more capable jump tool for symbol resolution. This unified design better reflects real code execution flow while reducing the brittleness of tool chaining. Trained with tool-integrated GRPO, RepoNavigator jointly learns reasoning and tool invocation in a closed loop, enabling end-to-end optimization without closed-source teacher models or distillation.
Extensive experiments across SWE-bench_Verified and SWE-bench_Pro demonstrate that RepoNavigator achieves state-of-the-art localization performance. We theoretically analyze the results, confirming that a single powerful tool, jointly optimized with reinforcement learning, can provide stronger robustness and more reliable multi-step reasoning than previous frameworks relying on multiple narrowly scoped tools. Future work will explore extending RepoNavigator from Python to more programming languages.
Agentless
Agentless is a workflow for issue localization. First, it identifies suspicious files in the repository. Second, relevant classes and functions are detected. Third, precise locations for editing are given by LLMs based on the classes and functions.
CoSIL
CoSIL is an agent that first conducts file-level localization and then conducts function-level localization. CoSIL dynamically constructs call graphs of modules (classes, functions) during the repo-level searching process, and applies context pruning to effectively reduce the searching scope.
LocAgent
LocAgent is almost a fully-automatic LLM agent, besides its planning prompt concatenated into the context at the beginning of the searching process. It builds the whole repository into a direct heterogeneous graph, whose nodes are files, classes, and functions. Additionally, edges are built by dependencies such as imports and invocations. Multiple graph-level searching tools are equipped to the LLM for multi-hop reasoning.
OrcaLoca
OrcaLoca is an LLM-based agent framework for software issue localization that performs repository-level exploration via priority-based action scheduling. It incrementally decomposes file- and class-level searches into fine-grained function-level actions with relevance scoring, while applying distance-aware context pruning on a code graph to efficiently narrow down potential bug locations. Because we failed to reproduce the code of OrcaLoca, we did not evaluate it on SWE-ben_Pro, and we directly report the results (provided by ) on SWE-bench_Verified.
RepoSearcher
RepoSearcher is an agent that first conducts file-level localization and then function-level localization, which aligns with CoSIL. RepoSearcher introduced the first training framework ToolTrain for localization agents, which is composed of distilling from a closed-source model (Claude3.7-Sonnet in Reposearcher) as warmup and reinforcement learning to further enhance the performance.
Ours
Compared with all baselines, we are the first fully-automatic LLM agent, with no fixed workflow and no planning prompt, and we are the first method trained directly from pretrained open-source LLMs without a closed-source teacher model. Lastly, we only integrate a single yet powerful tool to the agent, which reduces compounding error and narrows the access scope of the agent.
Benchmarks
The SWE-bench dataset series is designed to evaluate the capability of LLM agents in resolving real-world GitHub issues. In the official evaluation protocol, models are provided solely with the problem statement and the historical repository state to generate a patch. However, in practical software engineering workflows, developers typically have access to at least one entry point for any given issue. To better simulate these real-world scenarios and enhance evaluation fidelity, we deviate from the official SWE-bench standard by providing an explicit entry point for each sample. Specifically, for both our proposed method and all baseline models, we supply the precise file path and the corresponding entry function.
Hyperparameters for Baselines
For baseline methods, we use vLLM to deploy the corresponding model locally, and we set max_response_length to 32768, enforce-eager to True. We deploy all models on 8 NVIDIA Tesla-A100-80G GPUs. We follow the default settings of vLLM for other hyperparameters.
Implementation
When the response exceeds the maximum length, we clip and force the agent to stop, and we give zero as its score. When the agent exceeds the maximum tool-calling times (which is 12), we add “You must not call tools anymore, and you must give the final answer” to the tool’s response. Most of the time, the agent will stop calling tools and generate the final response. If not, we force it to stop and give zero as its score. Note that when the maximum tool-calling times are not achieved, and the final answer is generated, the agent loop will stop automatically. The aforementioned process is an automatic agentic framework, which allows the agent to explore environments with few constraints.
Language Server
In practice, we apply a Python language server, Pyright, to extract the definition code corresponding to an invoked symbol within a repository. However, the presence of monkey patches—runtime modifications to the repository—and dynamic imports can degrade the performance of the language server, as its functionality relies on static analysis techniques such as abstract syntax trees and symbol tables. When such circumstances occur, the tool returns an error message indicating that the definition of the current symbol cannot be located due to unknown reasons. Nevertheless, in our empirical evaluation, we did not observe any instances of monkey patching or dynamic imports within the analyzed datasets.
Jump as a Learnable Action Abstraction
We provide an analysis to explain why the proposed Jump tool constitutes a learnable and effective action abstraction for repository-level code navigation. We use Python as an example; other languages that are similar to Python (C++, Java…) are also suitable.
Preservation of Reachability
Although Jump does not have access to oracle ground-truth locations, it preserves the reachability of task-relevant program elements under realistic assumptions. Specifically, if a target symbol is statically resolvable within the repository, then there exists a sequence of Jump actions that reaches its definition. Consequently, the abstraction does not remove optimal solutions, but instead restricts exploration to semantically valid transitions.
Necessity of Reinforcement Learning for Long-Horizon Repository Navigation
The objective of the agent is not merely to invoke the jump operation correctly, but to learn a policy for sequencing execution-level navigation steps under sparse terminal rewards. Intermediate states do not admit dense supervision, and optimal behavior depends on long-horizon credit assignment. Reinforcement learning provides a principled framework for optimizing such policies, enabling the agent to balance exploration depth, termination decisions, and recovery from incorrect jumps. In contrast, supervised fine-tuning would require trajectory-level annotations or strong heuristics to approximate long-term returns, which are unavailable in this setting.
Language-agnostic Implementation
RepoNavigator is designed to be language-agnostic, relying only on the availability of execution-level navigation primitives provided by a language server, such as symbol resolution or call-site traversal. These primitives are supported across a wide range of programming languages through standard language server protocols. In our experiments, we focus on Python repositories to simplify implementation and evaluation. This choice is made for experimental convenience rather than methodological necessity. The underlying formulation and learning framework do not depend on Python-specific semantics, and can be directly instantiated for other languages given corresponding language server support.
Action Space Reduction via a Single Tool
Restricting the agent to a single execution-aware navigation primitive substantially reduces the branching factor of the decision process. For long-horizon tasks with sparse terminal rewards, the probability of success of a trajectory scales multiplicatively with per-step correctness. Expanding the action space with multiple tools increases action entropy and degrades this multiplicative success rate unless strong priors are available. Our empirical results suggest that, in repository-level reasoning, depth of execution-aware exploration is more critical than breadth of tool diversity.
Preventing Data Leakage
A common concern is whether pre-training data leakage could undermine the validity of post-training methods. We mitigate this concern through both dataset curation and temporal separation. Specifically, the SWE-bench_Pro dataset was released in 2025, whereas the Qwen2.5 model family was published in 2024, making direct pre-training exposure unlikely. In addition, we explicitly remove any training samples whose repositories overlap with those in SWE-bench_Verified or SWE-bench_Pro. Together, these measures substantially reduce the risk that the observed performance gains arise from data leakage rather than the proposed training procedure.
Language Limit
Another limitation is that we only evaluate Python repositories in our experiments. This is because each language (C/C++, Java, etc.) has its unique language server, and we only succeeded in implementing the language server of Python. We will implement more language servers and validate our approach on more programming languages in the future.


