arXiv(opens in a new tab)cs.LGOct 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2610.05572

Disentangling Task Difficulty from Run-Level Failure in Agent Failure Prediction

Mohsen EsfandyariDoulabi, Lawrence Arkoh, Biruk Tadesse, Vaishvi Patel, Mehul Sharma, Marcelo d'Amorim, Wesley Assunção

MOHSEN ESFANDYARIDOULABI, North Carolina State University, USA

LAWRENCE ARKOH, North Carolina State University, USA

BIRUK TADESSE, North Carolina State University, USA

VAISHVI PATEL, North Carolina State University, USA

MEHUL SHARMA, North Carolina State University, USA

MARCELO D'AMORIM, North Carolina State University, USA

WESLEY ASSUNÇÃO, North Carolina State University, USA

Predicting whether an LLM agent will eventually fail has emerged as a promising direction for supporting intervention during agent's run. Recent approaches report strong predictive performance, often with AUROC values between 0.85 and 0.94. However, the predictors are typically trained combining agent's runs (also called, trajectories or traces) from many different tasks. We hypothesized that the strong performance may come partly from recognizing that some tasks are harder than others, rather than from detecting whether a particular run is heading toward failure. This distinction matters operationally because task-level difficulty supports decisions about where to allocate computation, whereas run-level failure prediction is needed to decide whether to intervene in an ongoing trajectory. To disentangle task-level difficulty from run-level failure signals, we conducted a study to analyze benchmarks containing repeated attempts of the same task by the same LLM agent. We separate comparisons across different agents and task units from comparisons between successful and failed runs of the same unit. Across the evaluated corpora, pooled AUROC is dominated by comparisons across different agent-task units: more than 99.93% of the underlying positive-negative pairs are cross-unit. Accordingly, predictors that never observe the current run can achieve high pooled performance, including a difficulty oracle with AUROC up to 0.945, while remaining at chance within task. This means that strong pooled performance may be more informative for deciding where to allocate computation than for deciding whether to intervene in a particular run. In contrast, early run-level discrimination is consistently weak across trajectory predictors, published and released monitors, and hidden-state probes, although it improves later in run and is stronger for weaker agents. Consistent with this distinction, under fixed token budgets, task-level allocation outperforms abort-only strategies, while early stopping becomes beneficial only when within-task AUROC reaches roughly 0.84–0.93, far above the 0.50–0.55 range observed for early monitors. These findings highlight that failure prediction should be evaluated not only by how accurately it predicts outcomes, but by whether the captured signal supports the deployment decision the predictor is intended to make.

CCS Concepts: • Software and its engineering → Software verification and validation; Software testing and debugging; • Computing methodologies → Machine learning.

Additional Key Words and Phrases: LLM agents, failure prediction, evaluation validity, measurement, empirical software engineering

1 Introduction

Large Language Model (LLM)-based agents increasingly support multi-step tasks in software engineering and other domains [22, 26]. Unlike conventional LLM applications that primarily

Authors' Contact Information: Mohsen EsfandyariDoulabi, mesfand@ncsu.edu, North Carolina State University, Raleigh, North Carolina, USA; Lawrence Arkoh, larkoh@ncsu.edu, North Carolina State University, Raleigh, North Carolina, USA; Biruk Tadesse, batadess@ncsu.edu, North Carolina State University, Raleigh, North Carolina, USA; Vaishvi Patel, vpatel34@ncsu.edu, North Carolina State University, Raleigh, North Carolina, USA; Mehul Sharma, msharm34@ncsu.edu, North Carolina State University, Raleigh, North Carolina, USA; Marcelo d'Amorim, mdamori@ncsu.edu, North Carolina State University, Raleigh, North Carolina, USA; Wesley Assunção, wguezas@ncsu.edu, North Carolina State University, Raleigh, North Carolina, USA.

Mohsen EsfandyariDoulabi, Lawrence Arkoh, Biruk Tadesse, Vaishvi Patel, Mehul Sharma, Marcelo d'Amorim, and Wesley 2 Assunção

generate a response from a fixed input context, LLM-based agents operate through multi-step interactions in which they take actions, invoke tools, and incorporate observations from the environment while attempting to complete a task [42, 43]. This increased autonomy enables agents to solve complex problems, but it also introduces substantial execution risk. Recent studies report failure rates ranging from 41% to 86.7% across seven agentic frameworks [10]. Such failures are costly because an unsuccessful run may consume considerable time, tokens, and computational resources before its eventual outcome becomes known [3, 13, 23]. These costs have motivated growing interest in agent failure prediction: determining, during execution, whether an ongoing agent run is likely to fail [4, 40, 44]. An accurate failure predictor could support early intervention and avoid wasting resources. For example, by terminating an unpromising execution, requesting human assistance, or changing the agent's strategy before additional resources are consumed.

Existing work commonly formulates the prediction problem as trajectory classification [11, 35, 39]. They collect successful and failed agent trajectories, train predictors on their trajectories, and use the resulting models to estimate the failure risk of new runs while they are still in progress. These predictors are commonly evaluated using the Area Under the Receiver Operating Characteristic Curve (AUROC), which measures how well a predictor discriminates failed executions from successful ones [11, 39]. Within a benchmark and evaluation condition, a common practice is to pool predictions from executions of different task instances and compute AUROC over the resulting successful and failed runs [11, 31, 39]. We refer to this aggregate measure as pooled AUROC. High pooled AUROC values are commonly interpreted as evidence that a predictor can identify executions that are likely to fail. However, this interpretation overlooks an important possibility: the predictor may distinguish tasks with different baseline failure rates rather than distinguish successful and failed executions of the same task.

This distinction matters because agent outcomes depend on both the task and the particular execution [7, 24, 25]. Some tasks may fail substantially more often than others. When runs from many tasks are pooled together, a predictor can therefore obtain a high AUROC by assigning higher failure scores to tasks with high baseline failure rates and lower scores to tasks with low baseline failure rates [8, 20]. Such a predictor can rank failures above successes across the benchmark even if it cannot distinguish a successful run from a failed run of the same task. Evidence from prior work suggests that this possibility is realistic. A predictor of task success before execution begins, using only static task properties, reaches AUROC of 0.841 on held-out SWE-bench Verified instances [17], within the range reported by systems that observe agent trajectories heavily. This does not imply that trajectories contain no useful information. Rather, it exposes an ambiguity in pooled evaluation: strong discrimination may arise from between-task differences, run-specific execution signals, or both. Conflating task-level difficulty and run-level failure can therefore misrepresent a predictor's suitability for runtime intervention. Task-level difficulty can help determine where to allocate computation, which LLM to use, or whether a task should be attempted. A runtime monitor must answer a different question: given that the agent is already executing this task, does the evidence from this particular run indicate that it is heading toward failure? The latter decision requires information that separates different outcomes of the same task.

Our study investigates how strongly the distinction between task-level difficulty and run-level failure affects the evaluation and use of agent failure predictors. Building on the distinction between pooled and conditional discrimination studied in statistics [21, 30] and recent evidence of task-level confounds in agent evaluation [9, 28], we ask three questions: (RQ1) how much reported predictive performance reflects differences between tasks rather than the state of the current execution, (RQ2) whether run-specific signals are available early enough to support intervention, and (RQ3) whether separating these signals changes the deployment decisions suggested by failure predictors. To answer these questions, we exploit repeated agent executions, in which a fixed agent configuration attempts the same task multiple times. Because the task and agent remain constant while the execution varies, successful and failed attempts within the same model–task unit provide a setting for isolating run-level discrimination from between-unit differences. We analyze repeated-attempt corpora from SWE-agent [42], SWE-rebench [2], LiveClawBench [27], and Latent Programming Horizons [37], spanning different agent scaffolds, models, and domains. Empirically, we decompose pooled AUROC into within-unit and cross-unit comparisons; compare run-blind baselines with trajectory-based predictors, published and released monitoring systems, and hidden-state probes at online-computable execution prefixes; and measure within-task discrimination while holding the task and acting model fixed. Finally, we evaluate the practical consequences of these signals through replay experiments under fixed token budgets, comparing task-level resource allocation, run-level aborting, and their combination.

Our results reveal a consistent progression across the three research questions. For RQ1, we find that pooled AUROC is dominated by cross-unit comparisons: more than 99.93% of the underlying positive-negative pairs compare different model-task units, allowing a difficulty oracle to reach pooled AUROC of 0.945 while remaining at 0.500 within task. For RQ2, early run-level discrimination is consistently weak across trajectory-based predictors, published and released monitoring systems, and hidden-state probes, although the signal becomes stronger later in execution and is more pronounced for weaker agents. For RQ3, this distinction changes the practical value of prediction: under fixed token budgets, task-level allocation outperforms abort-only strategies, while run-level monitoring becomes beneficial only when within-task AUROC reaches roughly 0.84–0.93, far above the 0.50–0.55 range observed for early monitors. These results show that high aggregate predictive performance can reflect task-level difficulty without implying effective runtime failure detection, and that separating these signals is necessary to determine which decisions they can support.

Our study makes three main contributions:

  • A measurement framework for agent failure prediction. We separate task-level difficulty from run-level failure prediction by decomposing pooled AUROC into within-unit and cross-unit components and by evaluating within-task discrimination on repeated executions.

• An empirical characterization of run-level failure signals. Across multiple benchmarks, models, agent scaffolds, trajectory predictors, published monitoring systems, and hidden-state probes, we assess when run-specific information becomes available and whether it is strong enough to support intervention.

• Decision-oriented guidance for evaluation and deployment. We connect predictive performance to operational use by comparing task-level allocation with run-level aborting under fixed compute budgets, yielding practical guidance for researchers, tool builders, and practitioners on how failure predictors should be evaluated and used.

Taken together, our contributions change how failure-prediction performance should be interpreted for LLM agents. A high pooled AUROC can be useful evidence that failures are associated with predictable differences across tasks, but it does not by itself establish that a monitor can recognize which particular execution of a task will fail. The distinction matters operationally: task-level information supports decisions about where to spend computation, whereas run-level information supports decisions about whether to stop the execution currently in progress.

References (31)