Manuscript Offprint

arXiv:2610.29332

Do Coding Agents Understand Why Systems Crash---and Why They Don't?

Chenxi Huang, Haonan Wang, Jinghe Zhang, Aleksandr Nogikh, Franjo Ivančić, Petros Maniatis, Eugene Wu, Kostis Kaffes, Junfeng Yang, Baishakhi Ray

Abstract

Coding agents are increasingly capable of fixing real-world bugs, yet they still struggle with large systems codebases such as the Linux kernel. To understand why, we test how agents reason about execution in these codebases through crash reasoning: predicting from source code whether a given input crashes the system. A correct prediction alone, however, does not establish this ability, since it may come from merely spotting suspicious code. In this paper, we propose source interventions: we pair source trees that differ by a single commit, so that the same input crashes only one of them, and test whether agents predict crashes more often on the crashing tree. Experiments with four coding agents on SYSRB, our dataset of 934 such pairs from Linux and OSS-Fuzz projects, yield three main findings. First, agents are biased toward predicting no crash: they rarely raise false alarms but miss many real crashes, and even the best agent misses over a quarter of them. Second, locating the code that determines the crash outcome is not enough: agents often misjudge its effect, especially when the crash occurs far from that code. Third, testing only on crashing code is misleading: agents that merely notice suspicious code predict crashes on both source trees, which would look like correct reasoning on the crashing tree alone. Together, these findings indicate that current coding agents cannot yet reliably reason about execution in complex systems codebases, and that paired evaluation is necessary to measure this ability.

1 Introduction

Coding agents are increasingly used for diverse software engineering (SE) tasks, including code generation, issue resolution, and test generation (Yang et al., 2024; Rastenis et al., 2026; Ryan et al., 2024). However, reliable SE requires more than generating code: agents must understand what happens when a program runs, including how different inputs and code modifications affect its behavior. This capability, known as execution reasoning, is particularly important for debugging and program repair, where identifying the conditions that trigger a failure is essential to fixing it correctly.

Yet, how well coding agents perform execution reasoning remains unclear, particularly in complex, reliability-critical system codebases. For example, a manual study of 79 patches generated by kAgent, an agent designed to repair Linux kernel crashes, found that 52% altered or removed intended functionality (Mathai et al., 2026). This raises a broader concern for critical system codebases: fixing a failure without understanding its cause may introduce unintended behavior. More importantly, a patch that stops a crash does not show whether an agent understands the execution that caused it. We therefore need to evaluate execution reasoning independently of code generation or repair success.

Existing code-reasoning benchmarks attempt to measure this capability. Early benchmarks focus on predicting outputs, program semantics, or static-analysis properties of individual functions and code fragments (Gu et al., 2024; Roy et al., 2026; Xie et al., 2026). Recent benchmarks extend these evaluations to repositories, examining execution traces, call chains, and intermediate program states (Wang et al., 2026; Li et al., 2026; Taherkhani et al., 2026). However, these benchmarks either focus on small pieces of code or require tracking program execution step by step, neither of which scales well to large, complex system codebases. For example, Linux kernel execution may involve multiple subsystems, hardware interactions, and concurrent threads, making comprehensive execution tracing expensive and difficult (Zhang et al., 2025). We therefore need a way to evaluate program understanding without tracking every step of execution.

However, not all execution outcomes are equally difficult to evaluate. One particularly useful outcome is whether a program crashes on a given input, which can be verified by running the program. Mo-tivated by this observation, we study crash reasoning: given a program’s source code, build configuration, and an input, an agent must predict whether the program will crash and, if so, where and why. This allows us to evaluate execution reasoning in complex system codebases without having to reconstruct every step of program execution.

Crash reasoning also arises naturally in practical debugging scenarios. For example, in security testing, automated fuzzing systems such as syzbot (Google) and OSS-Fuzz (Serebryany, 2017) generate large numbers of inputs to identify those that cause programs to crash. Developers must then determine why these inputs trigger crashes and modify the code to prevent them (Gu et al., 2026; Böhme et al., 2017; Bai et al., 2026).

However, a correct crash prediction alone does not necessarily imply that an agent understands why the crash occurs. For example, an agent may identify a suspicious operation and predict a crash without determining whether the given input actually triggers it. Such a prediction could be correct for a crashing program but remain unchanged after the crash is resolved. Evaluating only the crashing source tree would therefore misrepresent the agent's reasoning ability.

To address this limitation, we introduce source interventions (Figure 1). Instead of evaluating an agent on a single program, we compare its predictions on two source trees of the same program: one that crashes for a given input and another that does not. The trees differ by one code change; we run both on the same input to verify their outcomes. The agent examines each tree independently, without knowing which crashes. We evaluate its behavior along two dimensions:

(i) Crash-outcome discriminability. We measure how often an agent predicts a crash on each source tree. An agent that makes the same prediction on both source trees cannot distinguish their execution outcomes, even if its prediction is correct on one of them. The difference in crash-prediction rates therefore measures the agent's sensitivity to code changes that affect program behavior.

(ii) Reasoning behavior. We examine the agent's investigation steps to check whether it finds and analyzes the differing code (intervention site) and the code where the crash occurs (crash site). This helps us understand whether agents fail to locate relevant code or struggle to predict its effect on execution even after encountering it.

Findings. We instantiate this evaluation in SYSRB (System Reasoning Benchmark), a dataset of 934 execution-validated source-tree pairs from the Linux kernel and OSS-Fuzz projects, and evaluate four coding agents. First, agents frequently miss real crashes despite low false-positive rates: they incorrectly predict no crash for 27.5–76.8% of crashing trees, while predicting crashes for only 2.8–10.9% of non-crashing trees (Section 4.2). Second, finding relevant code does not guarantee correct outcome discrimination. Although agents observe the intervention site in 55.6–89.0% of trajectories, their discriminability conditioned on observing it ranges from only 21.5% to 75.4%. For Claude Opus 5, discriminability further drops from about 65% to 38% when the crash occurs in a different subsystem from the intervention site (Section 4.3). Third, single-source-tree evaluations can reward misleading predictions. When Opus analyzes the crash site without observing the intervention site, its crash-prediction rate increases by about 37 percentage points on TcT_{c}, but also by 34 points on TnT_{n}. Similar patterns occur across all four agents (Section 4.4). Together, these findings reveal limitations in agents' ability to distinguish execution outcomes and demonstrate the value of paired evaluation for studying system-level code reasoning.

Our contributions. We make three contributions:

• Source-intervention-based evaluation. We introduce a paired evaluation methodology that measures whether coding agents distinguish crash outcomes across execution-validated source interventions. Unlike single-source-tree evaluation, this design reduces the influence of prediction tendencies shared across crashing and non-crashing programs.

• An execution-validated benchmark and diagnostic framework. We construct SYSRB, comprising 934 source-tree pairs from the Linux kernel and OSS-Fuzz projects. We complement policy-level discriminability with trajectory-level analysis of whether agents observe and analyze the intervention and crash sites.

• Empirical insights into agent limitations. Evaluating four coding agents, we find that agents frequently miss crashes, that observing relevant code does not guarantee correct outcome discrimination, and that cross-subsystem failures are associated with substantially lower discriminability. We demonstrate how single-source-tree evaluations can reward predictions driven by suspicious code patterns shared across both source trees.

Figure

Figure 1: Differencing over a pair with opposite crash outcomes isolates true discriminability. TcT_c and TnT_n differ only by Δ\Delta at the intervention site. When sampling coding agent to predict “crash or not” multiple times, trajectories blind to the site predict a crash equally often in both trees and cancel in Tc−TnT_c - T_n.

References (14)