arXiv:2609.37864cs.SESep 2026

Manuscript Offprint

arXiv:2609.37864

AgentBug-Smith: Automatically Reproducing Real-World Harness Bugs in Agentic Systems

Yiming Cheng, Alfin Wijaya Rahardja, Mengshi Zhang, Zihao Chen, Zhenpeng Chen, Yiling Lou

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

Yiming Cheng

The University of Chicago

eaminchan@uchicago.edu

Alfin Wijaya Rahardja

Fudan University

24212010055@m.fudan.edu.cn

Mengshi Zhang and Zihao Chen

TensorBlock, Inc.

{mengshiz, zihaoc}@tensorblock.co

Zhenpeng Chen

Tsinghua University

zpchen@tsinghua.edu.cn

Yiling Lou

University of Illinois Urbana-Champaign

yilingl@illinois.edu

ABSTRACT

Agent harness bugs exhibit unique characteristics and remain challenging for state-of-the-art software agents to repair. Progress in this area is further hindered by existing benchmarks, which contain only a small and fixed number of executable harness bugs while requiring hundreds of human hours to construct. This work presents AGENTBUG-SMITH, an automated harness bug reproduction approach that continuously discovers and reproduces real-world harness bugs from open-source agentic systems. Across different backbone LLMs, AGENTBUG-SMITH consistently outperforms existing bug reproduction techniques designed for general software, achieving 10.67% - 27.56% higher success rates of reproducing harness bugs. By applying AGENTBUG-SMITH to open-source agentic systems in the wild, we construct LIVE-HARNESS-BENCH, a live and extensible benchmark that currently contains 200 reproducible harness bugs. We further demonstrate the utility of LIVE-HARNESS-BENCH through two downstream applications. First, we use LIVE-HARNESS-BENCH as the evaluation benchmark to systematically evaluate state-of-the-art software agents, revealing their limited capabilities in repairing real-world harness bugs. Second, we use LIVE-HARNESS-BENCH as a knowledge base of real-world harness bug fixes, from which reusable repair skills can be distilled to improve existing software agents, increasing their harness-bug repair rates by 6.32%. Together, AGENTBUG-SMITH and LIVE-HARNESS-BENCH establish a scalable foundation for continuously evaluating and improving software agents on harness bug repair, turning real-world agent failures into executable evaluation instances and reusable knowledge for harness improvement, thus contributing to the ultimate goal of recursively self-improving agents.

AGENTBUG-SMITH

LIVE-HARNESS-BENCH

1 INTRODUCTION

Large Language Model (LLM) agents are rapidly emerging as a new software paradigm and have been increasingly adopted across diverse domains (Yang et al., 2024; Kannan et al., 2024; Zeng et al., 2023; Gottweis et al., 2026; Xiao et al., 2025). Agentic systems are commonly composed of backbone LLMs and their surrounding harnesses, where the harness serves as a software infrastructure that works with LLMs to jointly shape the agent behavior. Modern agents involve increasingly complex and large-scale harness implementations (e.g., 200K lines of code in OpenClaw (ope, 2026a)) to support diverse functionalities such as context management, security guardrails, orchestration, and tool integration. Accordingly, there have been growing research efforts (Li et al., 2026) on harness engineering, demonstrating that improving the harness alone can substantially enhance agent effectiveness, even when the underlying backbone LLM remains unchanged. More recently, advances in self-evolving harnesses (Lee et al., 2026) and recursive self-improvement (Liu et al., 2026) have further elevated the harness from a static supporting layer to an evolving component of agentic systems, underscoring the critical role of harness quality in determining the agent capabilities.

The growing complexity of agent harnesses inevitably makes harness implementation bugs an important source of failures in agentic systems. Recent studies (Rahardja et al., 2025; Zhang et al., 2026b; Chen et al., 2026) have revealed that modern agent applications and frameworks suffer from diverse implementation bugs in harnesses. Automatically detecting and repairing such bugs is therefore becoming increasingly critical for building reliable agentic systems. However, prior work (Rahardja et al., 2025) has shown that existing software agents (Yang et al., 2024; Xia et al., 2024; Zhang et al., 2024) achieve substantially lower success rates in repairing harness bugs than general software bugs (e.g., 4.67% versus 40.67%). This difficulty stems in part from the distinct characteristics of harness bugs, which arise from agent-specific structures and behaviors, such as complex workflow orchestration and interactions with external resources (e.g., tools, services, and model providers). These characteristics introduce failure modes and repair challenges that are uncommon in traditional software systems. Taken together, automated harness bug repair represents an emerging and distinct challenge in improving agent reliability.

However, we still lack comprehensive benchmarks of harness bugs. Most benchmarks of agent failures (Cemri et al., 2025; Zhu et al., 2025) focus on failures stemming from backbone LLMs rather than harness implementation bugs. While there have been increasing effort to investigate harness implementation bugs (Zhang et al., 2026b; Chen et al., 2026), existing bug collections lack executable environments and artifacts for reproducing the agent failures. To date, the only executable benchmark of reproducible harness bugs, AgentIssue-Bench (Rahardja et al., 2025), contains only a small and fixed set of 43 harness bugs, which cannot support comprehensive or rigorous evaluation due to the limited number of bugs and the potential risk of contamination from exposure to model training data. In addition, manually reproducing harness bugs is labor-intensive and time-consuming, e.g., 150 manual hours were spent in reproducing a small number of harness bugs (Rahardja et al., 2025).

While recent approaches such as SWE-Factory (Guo et al., 2025) and SWE-bench-Live (Zhang et al., 2026a) have automated the reproduction of bugs reported in GitHub Issues, they are primarily designed for general software systems. Harness bugs in agentic systems pose unique reproduction challenges, as agent harnesses extensively interact with external resources, including LLM providers, tools, network services, and dynamically changing environments, while their failures often manifest only under specific execution states and interaction contexts. These characteristics fundamentally distinguish harness bugs from conventional software bugs and pose substantial challenges to directly applying existing automated bug reproduction techniques to agentic systems.

Technique. This work proposes AGENTBUG-SMITH, an automated harness bug reproduction approach that continuously discovers and reproduces real-world harness bugs from open-source agents. AGENTBUG-SMITH is built as a multi-agent system to streamline reproduction pipeline without any manual intervention, facilitating three phases including (i) harness bug related issues identification, (ii) agent execution environment construction, and (iii) failure-reproducing harness test generation.

Evaluation. We perform extensive evaluation to show the effectiveness of AGENTBUG-SMITH. First, based on our manual checking, AGENTBUG-SMITH achieves a high accuracy of automatically identifying agent repositories (i.e., 95% accuracy) and harness bug related issues (i.e., 92%). Second, AGENTBUG-SMITH consistently achieves higher success rate of reproducing harness bugs compared state-of-the-art bug reproduction techniques that are designed for general software (i.e., SWE-Factory and SWE-bench-Live), with 10.67% - 27.56% percentage-point improvements across all studied backbone LLMs. Third, our ablation analysis further confirms the effectiveness of both environment and test generation components in AGENTBUG-SMITH compared to baselines.

Benchmark and Downstream Application. Continuously applying AGENTBUG-SMITH to open-source agentic systems in the wild can enabling scalable construction of a benchmark of executable harness bugs, LIVE-HARNESS-BENCH. Its current release contains 200 reproducible harness bugs collected from real-world agent repositories, covering diverse harness components and spanning over wide time ranges. We further demonstrate the usage of LIVE-HARNESS-BENCH in two downstream applications. First, we use LIVE-HARNESS-BENCH as the evaluation benchmark to systematically evaluate state-of-the-art software agents, revealing their limited capabilities in repairing real-world harness bugs. Second, we use LIVE-HARNESS-BENCH as a knowledge base of real-world harness bug fixes, from which reusable repair skills can be distilled to improve existing software agents, increasing their harness-bug repair success rate by 6.32%. Together, AGENTBUG-SMITH and LIVE-HARNESS-BENCH establish a scalable foundation for continuously evaluating and improving software agents on harness bug repair, turning real-world agent failures into executable evaluation instances and reusable knowledge for harness improvement, thereby contributing to the ultimate goal of recursively self-improving agents.