Manuscript Offprint

arXiv:2609.09769

XAgent: eXecution-guided Agentic AI for Effective Localization and Resolution of GitHub Issues

Hieu Huynh, Patanamon Thongtanunam, Michael Fu, Bach Le, Kla Tantithamthavorn

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Hieu Huynh ·

Patanamon Thongtanunam ·

Michael Fu · Bach Le ·

Kla Tantithamthavorn

Received: date / Accepted: date

Abstract Agentic AI has enabled capabilities in leveraging Large Language Models (LLMs) to autonomously resolve repository-level GitHub issues. However, due to the reliance on limited static description of issues, existing agentic approaches suffer from incorrect localization and incomplete validation. Solely relying on this information can bias LLM reasoning toward the narrow scope of the issue description, leading to incomplete patches that fail to address the underlying issue. In this paper, we present XAGENT, an execution-guided agentic framework that analyzes dynamic behavior and additional program context to localize and validate issues. The experimental results on the SWE-bench-lite dataset demonstrate that XAGENT outperforms other existing approaches, achieving a resolve rate of 62.0% and a function localization accuracy of 72.8%, while maintaining cost efficiency. Our analysis further shows that XAGENT successfully resolves 7 additional issues that the top existing

Hieu Huynh School of Computing and Information Systems, The University of Melbourne, Melbourne, Australia E-mail: minhhieuh@student.unimelb.edu.au

Patanamon Thongtanunam School of Computing and Information Systems, The University of Melbourne, Melbourne, Australia E-mail: patanamon.t@unimelb.edu.au

Michael Fu School of Computing and Information Systems, The University of Melbourne, Melbourne, Australia E-mail: michael.fu@unimelb.edu.au

Bach Le School of Computing and Information Systems, The University of Melbourne, Melbourne, Australia E-mail: bach.le@unimelb.edu.au

Kla Tantithamthavorn Monash University, Clayton, Australia E-mail: chakkrit@monash.edu baselines fail to address. This work highlights a shift from static, description-oriented patch generation toward dynamic execution-guided issue resolution, opening new opportunities for LLM-based coding agents to achieve more robust and generalizable software maintenance.

Keywords Agentic AI · Coding Agents · Differential Analysis · Code Execution

1 Introduction

Agentic AI has demonstrated potential to address various software engineering tasks including resolving real-world GitHub issues (e.g., AutoCodeRover (Zhang et al. 2024), Agentless (Xia et al. 2025), ExpeRepair (Mu et al. 2025), SWE-agent (Yang et al. 2024a), and CoSil (Jiang et al. 2025)). Such agentic approaches leverage Large Language Models (LLMs) as agents to autonomously perceive the input environments (e.g., GitHub repositories), reason (e.g., generating a coding plan), and autonomously perform actions (e.g., open files, run bash scripts) to achieve an ultimate goal (e.g., resolve a GitHub issue at a repository-level). Typically, such approaches follow a three-stage workflow: (1) reproduction, which recreates the reported buggy behavior by generating test cases that verify the described issue; (2) localization, which identifies the relevant files, functions, and code regions responsible for the buggy behavior; (3) patch generation & validation, which produces candidate fixes for localized components and evaluates whether the proposed patch resolves the issue through execution of the reproduction and regression test.

However, existing agentic approaches are still ineffective in resolving GitHub issues. For example, ExpeRepair (Mu et al. 2025), which is #1 in the SWE-Bench-lite benchmark dataset can correctly localize 70.7% of the buggy functions and correctly resolve only 60.3% of the GitHub issues, which is still far from perfect. We suspect that the ineffectiveness has to do with the over-reliance on static issue descriptions for the localization and the test validation stages in the existing agentic approaches. In particular, we identified the following two major limitations.

– Limitation 1: Incorrect Localization. The localization stage of the existing approaches (Yang et al. 2024a; Wang et al. 2024b; Mu et al. 2025; Xia et al. 2025) relies on the semantic similarity of keywords that appear in the issue descriptions and the files and functions within the whole repository (i.e., keyword search). However, as issue descriptions are generally noisy or incomplete, the sole-reliance on static issue descriptions may bias the LLMs toward functions that are irrelevant or incorrect to the given issue description, leading to an incorrect localization by the existing approaches.

– Limitation 2: Incomplete Validation. Similarly, the test validation stage of the existing approaches (Xia et al. 2025; Mu et al. 2025) solely uses the issue description to generate a set of validation tests without considering the broader program context. As a result, the validation process often overfits the narrow scope defined by the issue description, causing the generated patches to pass the validation test but fail to address the underlying issue. These limitations make existing approaches prone to producing patches that overfit to the described issue (i.e., overfitting patches (Smith et al. 2015; Le et al. 2018)), ultimately restricting their effectiveness in real-world scenarios.

In this paper, we present XAGENT, an execution-guided agentic framework for GitHub issue resolution that analyzes dynamic behavior during program execution to localize functions and leverages program context to generate more reliable validation tests. Inspired by differential analysis (Zeller 2009), XAGENT identifies the buggy functions by comparing failing and passing executions of the program. Specifically, it performs localization by identifying suspicious functions that appear only in failing execution but not in the passing one. To prevent the validation test from overfitting to the issue description, we develop a context-aware test augmentor that leverages additional program context (e.g., relevant files and functions) to broaden the scope of validation beyond what is described in the issue. This enables XAGENT to generate edge-case and related-component tests, ensuring that the generated patches address the underlying issue.

Experimental results show that XAGENT achieves state-of-the-art performance on the SWE-bench-lite dataset, surpassing top baselines with a resolve rate of 62.0%. XAGENT also demonstrates highly effective bug localization, achieving SOTA function localization accuracy of 72.8%, while maintaining high efficiency at a cost of approximately $1.56 per issue, which is 37% cheaper than the prior SOTA approach (Mu et al. 2025). Additionally, our analysis reveals that XAGENT uniquely resolves 7 complex instances that other top approaches (i.e., ExpeRepair (Mu et al. 2025), Refact Agent (Refact.ai 2025), SWE-Agent (Yang et al. 2024a)) failed to fix. The results show that XAGENT can accurately localize and cost-effectively generate correct patches to resolve the underlying issues. This work highlights a shift from static, description-oriented patch generation toward dynamic, execution-guided issue resolution, opening new opportunities for LLM-based agents to achieve more robust and generalizable software maintenance.

Novelty & Contributions. To the best of our knowledge, we are the first to propose:

– XAgent: A novel execution-guided agentic framework for GitHub issue resolution that shifts from static, description-oriented approaches to a dynamic, execution-guided and context-aware approach.

– A novel execution-guided localization method using differential analysis (buggy vs. non-buggy) and tree edit distance to localize bugs by analyzing execution divergence, effectively addressing the limitation of existing static bug localization.

– A context-aware test augmentor that generates broader validation tests targeting edge cases, effectively extending validation coverage beyond the issue description.

  • A comprehensive empirical evaluation on SWE-Bench-Lite shows that XAGENT sets a new state of the art, achieving the highest Resolve Rate (62.0%) and function-level localization accuracy (72.8%) while reducing cost by 37%. Furthermore, XAGENT successfully resolves 7 issues that top existing baselines (e.g., SWE-Agent, EXPEREPAIR, Refact) failed to address.

  • We conduct an ablation study to verify our key design for XAGENT, demonstrating that the execution-guided localization and context-aware test augmentor together contribute up to 9% relative improvement in the overall performance.

References (31)