Organizations: Zhejiang University · DAMO Academy, Alibaba Group · College of Computing and Data Science, Nanyang Technological University, Singapore · Hangzhou City University · City St George’s, University of London · AGH University of Science and Technology, Poland
Recent advances in agent-based methods have demonstrated strong promise for issue localization, a critical prerequisite for software issue resolution. However, most existing agent-based methods rely on a single agent with a growing context, where long-context accumulation compresses the effective reasoning space. Meanwhile, the flat exploration structure hinders the balance between file-level breadth and function-level depth. To address these limitations, we propose NINJA, a hierarchical Navigator-Inspector Joint Architecture for context-efficient issue localization. NINJA decomposes repository exploration into global navigation and local inspection: the navigator maintains the global search state, performs file-level search, and dispatches selected entry files, while inspectors independently conduct function-level exploration around the assigned files in separate contexts. Through multi-round interactions, inspectors return suspicious locations as feedback, and the navigator updates the global state to decide whether to continue exploration or finalize localization. This hierarchical design balances file-level breadth with function-level depth, while independent inspector contexts prevent local exploration traces from accumulating in a single growing context. To further strengthen both global coordination and local exploration, we introduce a two-stage agentic fine-tuning strategy. Extensive experiments across multiple benchmarks and LLM backbones show that NINJA consistently outperforms competitive baselines. Notably, after fine-tuning, Qwen3-Coder-30B-A3B-Instruct surpasses the strong closed-source Claude-Haiku-4.5 model. Our code is available at https://github.com/wantbook-book/NINJA.
Figures & tables
Figure 1: Overview of the NINJA framework and agentic fine-tuning pipeline. (1) NINJA decomposes repository exploration into global navigation and local inspection, where the navigator searches and dispatches issue-relevant files to inspectors, updates the global state from their returned findings, and iteratively continues exploration or finalizes the results. (2) The fine-tuning pipeline combines SFT warmup with component-wise RL, training the inspector before the navigator.
Framework
Model
File-level
Function-level
# Toks (k)
Time (s)
Acc@5
F1
Acc@5
F1
Embedding
CodeRank
75.0±0.2
28.4±0.1
54.0±0.2
19.6±0.1
N/A
14.9±0.1
Haiku-4.5
45.6±0.0
20.3±0.0
17.8±0.1
8.0±0.1
41.0±0.1
150.2±0.5
SWERank+
Qwen3-30B
26.8±0.6
8.9±0.2
1.1±0.0
0.4±0.0
53.2±0.0
140.0±0.7
LocAgent
Haiku-4.5
83.1±0.4
31.0±0.2
37.2±0.4
13.2±0.1
37.8±0.2
128.6±0.5
Qwen3-30B
44.0±3.1
14.7±1.0
25.4±3.0
9.3±1.2
46.7±1.8
52.6±0.3
Table 1: Results on SWE-Bench-Lite. Best and second-best localization results are in bold and underlined , respectively. CodeRank, Haiku-4.5, and Qwen3-30B denote CodeRankEmbed, Claude-Haiku-4.5, and Qwen3-Coder-30B-A3B-Instruct. NINJA-14B and NINJA-30B are obtained by applying agentic fine-tuning (SFT+PPO) to Qwen3-14B and Qwen3-30B, respectively.
Framework
File-level
Function-level
# Toks (k)
Time (s)
Acc@5
F1
Acc@5
F1
NINJA
79.3±0.7
53.5±0.7
71.1±0.4
27.7±0.6
51.7±0.5
85.4±3.2
w/o independent context
43.5±0.6
31.4±0.7
41.5±0.3
18.1±0.5
24.6±0.3
17.2±0.4
w/o multi-round dispatch
69.9±0.6
48.7±0.6
65.6±0.4
23.5±0.6
41.7±0.5
63.4±1.9
w/o dynamic scheduling
77.3±0.6
51.7±0.7
69.9±0.4
26.8±0.6
58.7±0.6
93.8±2.7
Table 2: Ablation study of our NINJA framework on SWE-Bench-Lite.
Setting
File-level
Function-level
# Toks (k)
Time (s)
Acc@5
F1
Acc@5
F1
CoSIL
79.2±0.3
29.8±0.1
24.6±0.4
12.9±0.2
24.3±0.0
33.3±0.1
NINJA (25k budget)
74.2±0.5
48.4±0.4
63.4±0.6
22.5±0.3
24.8±0.1
35.6±0.4
OrcaLoca
64.0±0.5
51.8±0.5
39.0±0.7
27.9±0.2
30.5±0.2
121.7±1.3
NINJA (30k budget)
77.6±0.4
51.9±0.5
66.4±0.5
24.8±0.3
29.4±0.1
40.6±0.5
Table 3: Token-matched comparison on SWE-Bench-Lite using Qwen3-Coder-30B-A3B-Instruct. NINJA limits the aggregate trajectory tokens of the navigator and all inspectors per task, and finalizes localization once the budget is exhausted.
Framework
Training
File-level
Function-level
# Toks (k)
Time (s)
Acc@5
F1
Acc@5
F1
OrcaLoca
Initial
64.0±0.5
51.8±0.5
39.0±0.7
27.9±0.2
30.5±0.2
121.7±1.3
SFT
65.3±0.6
52.1±0.5
40.1±0.6
28.1±0.3
30.9±0.2
123.9±1.5
SFT+PPO
74.5±0.5
54.9±0.4
45.5±0.5
28.4±0.3
28.8±0.2
116.9±1.4
NINJA
Initial
79.3±0.7
53.5±0.7
71.1±0.4
27.7±0.6
51.7±0.5
85.4±3.2
Direct PPO
84.8±0.6
54.1±0.7
69.5±0.5
25.2±0.6
47.3±0.5
79.5±2.8
Table 4: Controlled comparison of framework designs and agentic fine-tuning strategies using Qwen3-Coder-30B-A3B-Instruct on SWE-Bench-Lite.
Figure 2: Effects of inspector parallelism and token budget on NINJA’s performance and efficiency.
Hint source
Locations
Resolve (%)
# Toks (k)
None
—
28.8
39.3
Ground truth
Edit
52.6
36.7
Edit + support
57.2
36.3
NINJA
Edit
45.2
37.8
w/o independent context
Edit
33.2
39.7
Table 5: Downstream issue resolution on SWE-Bench-Verified with mini-SWE-agent and Claude-Haiku-4.5. Token usage is averaged per issue.
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
Framework
Model
File-level
Function-level
# Toks (k)
Time (s)
Acc@5
F1
Acc@5
F1
Embedding
CodeRank
76.4±0.2
29.0±0.1
45.5±0.2
21.2±0.1
N/A
9.0±0.0
Haiku-4.5
40.7±0.3
18.7±0.2
21.3±0.4
10.9±0.2
55.6±0.2
157.7±0.6
SWERank+
Qwen3-30B
35.6±0.0
14.3±0.0
7.8±0.1
5.0±0.1
71.5±0.0
93.4±0.2
LocAgent
Haiku-4.5
60.2±0.4
22.9±0.2
25.9±0.4
11.9±0.1
47.1±0.2
50.3±0.5
Qwen3-30B
44.2±2.4
15.9±1.0
22.3±1.7
9.9±0.8
55.6±0.3
62.1±1.4
Appendix
Table 6: Results on LocBench. Best and second-best localization results are in bold and underlined , respectively. CodeRank, Haiku-4.5, and Qwen3-30B denote CodeRankEmbed, Claude-Haiku-4.5, and Qwen3-Coder-30B-A3B-Instruct. NINJA-14B and NINJA-30B are obtained by applying agentic fine-tuning (SFT+PPO) to Qwen3-14B and Qwen3-30B, respectively.
Agent
8K
16K
32K
64K
128K
Navigator
82.19%
13.04%
0.33%
0.00%
0.00%
Inspector
49.83%
12.90%
0.46%
0.00%
0.00%
Appendix
Table 7: Token budget exceed rates of navigator and inspector.
Agent
Settings
MATH500
AIME24
AIME25
AMC23
GPQA*
MMLU*
Avg.
initial
88.9
28.3
20.8
68.8
49.9
91.0
58.0
Navigator
SFT
89.0
33.3
28.3
73.1
48.6
91.0
60.6
SFT+PPO
89.0
35.0
25.8
75.0
48.9
90.9
60.8
Inspector
SFT
89.1
31.7
29.2
71.3
48.9
90.9
60.2
SFT+PPO
89.4
30.9
28.4
71.9
48.4
90.9
60.0
Appendix
Table 8: General reasoning performance of Qwen3-Coder-30B-A3B-Instruct before and after agentic fine-tuning. Scores are averaged over four sampling runs (Avg@4). GPQA* denotes GPQA-Diamond, and MMLU* denotes MMLU-STEM.
Agent
Settings
MATH500
AIME24
AIME25
AMC23
GPQA*
MMLU*
Avg.
Initial
97.3
80.8
75.0
98.8
65.8
94.1
85.3
Navigator
SFT
97.3
81.7
73.3
98.1
65.8
94.1
85.1
SFT+PPO
97.0
80.8
73.7
98.8
66.3
94.0
85.1
Inspector
SFT
97.7
82.5
72.5
99.4
66.5
94.1
85.5
SFT+PPO
97.0
79.7
71.7
100.0
65.0
93.9
84.6
Appendix
Table 9: General reasoning performance of Qwen3-14B before and after agentic fine-tuning. Scores are averaged over four sampling runs (Avg@4). GPQA* denotes GPQA-Diamond, and MMLU* denotes MMLU-STEM.
Hyperparameter
Value
Global batch size
32
Micro batch size per GPU
2
Training epochs
2
Maximum sequence length
32,768
Maximum tokens per GPU
32,768
Learning rate
5×10−6
Appendix
Table 10: Training hyperparameters of SFT.
Hyperparameter
Value
Training batch size
256
PPO mini-batch size
64
Actor learning rate
1×10−6
Critic learning rate
1×10−5
Critic warmup steps
50
Discount factor γ
1.0
Appendix
Table 11: Training hyperparameters of PPO.
Hyperparameter
Value
Training batch size
64
PPO mini-batch size
64
KL loss coefficient
0.001
Clip ratio
[0.20,0.28]
Samples per prompt
4
Sampling temperature
0.6
Appendix
Table 12: Training hyperparameters of DAPO.
Tool
Description
find_files_by_content
Given keywords or regex patterns and an optional file pattern, searches repository contents and returns matched files with relevant line snippets.
find_files_by_name
Given filename or path patterns, matches repository files and returns a deduplicated list of candidate file paths.
dispatch
Given selected entry files, dispatches inspector agents for in-depth exploration and returns suspicious locations with supporting exploration evidence.
Appendix
Table 13: Repository tools for the navigator agent.
Tool
Description
get_methods_of_class
Given a file and class name, returns all method signatures defined in the class, helping the inspector identify candidate methods for further inspection.
get_file_functions
Given a file name, returns all module-level function signatures in the file, providing a quick overview of its functional structure.
get_file_classes
Given a file name, returns all class signatures in the file, helping the inspector locate potentially relevant classes.
Appendix
Table 14: Repository tools for the inspector agent.
Figure 17Figure 18Figure 19Figure 20Figure 21
Figure 3: Case study of issue django__django-11019 from SWE-Bench-Lite. (I)
Figure 4: Case study of issue django__django-11019 from SWE-Bench-Lite. (II)
Figure 5: Case study of issue django__django-11019 from SWE-Bench-Lite. (III)
Repository-level issue localization aims to identify and rank the files and functions relevant to resolving a reported issue. LLM agents approach this task iteratively: they identify a set of potentially relevant locations, inspect the corresponding code, and revise their judgments about these candidates as new evidence is acquired. Existing environments, however, provide limited support for this loop: agents must search for unresolved relation targets, reconstruct entity semantics from raw source code, and revise candidates without evidential basis. To address these limitations, we present SemNav, a framework that leverages deterministic retrieval to seed a broad candidate set and an LLM agent to continually refine that set, thereby combining initial coverage with evidence-guided revision. SemNav supports this process through three key components. A Semantic Navigation Graph resolves program relations on demand through a language server, enabling direct navigation to related entities across files. Issue-conditioned Semantic Cards provide compact, source-grounded interpretations of each entity's role and relevance to the issue. A persistent Candidate Workspace records each candidate together with its evidential basis, enabling grounded verification, revision, and ranking. Across SWE-bench Lite and PLocBench, SemNav outperforms existing baselines, improving File Hit@10 from 68.33% to 82.67% with Gemma 4B. Component ablations and trajectory analysis support the complementary roles of all three components, while Semantic Cards reduce working-context load by 48.2% relative to full-source reading. SemNav further ranks first on all seven evidence-quality metrics on SWE-Explore and improves downstream issue resolution from 44.00% to 52.33%.
Software engineering tools increasingly rely on LLM based agents to localize files to change to resolve a software issue. Most AI agents explore repositories linearly, that is, visiting one directory or file per step. We postulate that this is a structural mismatch for changes that span several subsystems. We compare linear sequential exploration against non-linear, domain-scoped parallel agentic exploration. Using SWE Bench Pro as initial benchmark, we focus on ansible as an exemplar. We construct an approach for persistent-session evaluation of GitHub issues anchored at a single base commit. We compare our non-linear domain-agent file traversal system against a base LLM without direct repository access, a single agent Recursive Language Model (RLM) baseline with a persistent Python REPL and an external CLI baseline using Codex 5.5 High. Domain scoped parallel agent spawning with a small Haiku-class model achieves the highest micro F1 among Haiku class models by a large margin. Domain-agents is the second highest behind only the much larger Codex 5.5 High on our own expanded benchmark including over more recent PRs from 2025 and 2026. On the original, curated, 2020 SWE-bench Pro benchmark, a larger Sonnet plain LLM baseline attains higher micro F1 by predicting few files, leading to higher precision, but at significantly lower all gold recall. We also present three additional findings. First, documentation evolution is a latent dependency unresolved by any approach. Second, naive file system access can degrade localization driven by test-file over prediction. Lastly, forced multi-agent consultation does not measurably help and raises token cost substantially.
Akeela Darryl Fattha, Kia Ying Chua, Lingxiao Jiang +1
School of Computing and Information Systems Singapore Management University Singapore
Large language models (LLMs) exhibit strong performance on self-contained programming tasks. However, they still struggle with repository-level software engineering (SWE), which demands (1) deep codebase navigation with effective context management for accurate localization, and (2) systematic approaches for iterative, test-driven code modification to resolve issues. To address these challenges, we propose SWE-Adept, an LLM-based two-agent framework where a localization agent identifies issue-relevant code locations and a resolution agent implements the corresponding fixes. For issue localization, we introduce agent-directed depth-first search that selectively traverses code dependencies. This minimizes issue-irrelevant content in the agent's context window and improves localization accuracy. For issue resolution, we employ adaptive planning and structured problem solving. We equip the agent with specialized tools for progress tracking and Git-based version control. These tools interface with a shared working memory that stores code-state checkpoints indexed by execution steps, facilitating precise checkpoint retrieval. This design enables reliable agent-driven version-control operations for systematic issue resolution, including branching to explore alternative solutions and reverting failed edits. Experiments on SWE-Bench Lite and SWE-Bench Pro demonstrate that SWE-Adept consistently outperforms prior approaches in both issue localization and resolution, improving the end-to-end resolve rate by up to 4.3%.
Kang He, Kaushik Roy
Electrical and Computer Engineering, Purdue University