Manuscript Offprint

arXiv:2610.28811

A Mechanistic Study of Automated Failure Attribution in LLM-based Agentic Systems

Wendy Zheng, Liang Wu, Yinhan He, Mayank Darbari, Jundong Li, Liangjie Hong

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

Abstract

Agentic systems have demonstrated strong capabilities on complex tasks by enabling multiple interacting large language model (LLM)-based agents to collaborate and execute subtasks in parallel. However, this collaborative structure introduces new challenges for reliably evaluating and diagnosing system failures, particularly failure attribution: tracing a system's execution to identify the agent step responsible for an incorrect final outcome. Because manually performing this task is time- and labor-intensive, recent work has turned to LLMs as judges to automate the process, referred to as automated failure attribution (AFA). These approaches assume that a sufficiently capable model can infer the failing step directly from an interaction transcript. In practice, however, direct prompting often performs poorly, which motivates follow-up work that explores various ways to improve AFA performance, including alternative prompting strategies and inference-time interventions. In this paper, we examine a more fundamental question: whether this weak behavioral performance reflects a genuine capability limitation. Using linear probes applied to internal activations, we uncover a significant knows-but-won't-say gap: models encode sufficient information to attribute a failure correctly but fail to explicitly output the responsible step. Building on this finding, we propose grafting, a simple manual intervention that exploits knowledge already encoded in the model to improve AFA performance without requiring ground-truth labels at inference time. Extensive evaluations across multiple LLMs and benchmark settings demonstrate that grafting consistently outperforms direct-prompting approaches, underscoring the potential of leveraging latent model knowledge for more reliable failure attribution. Our code is available at https://github.com/wendyzheng22/mi4afa.

1 Introduction

Agentic systems extend the capabilities of large language models (LLMs) by decomposing complex tasks and distributing them across multiple specialized agents (e.g., planners, retrievers, coders, and verifiers), that collaborate and execute subtasks in parallel (Acharya et al., 2025; Bandi et al., 2025; Wu et al., 2023). This collaborative paradigm enables agentic systems to tackle problems that would exceed the capacity of a single model working alone. However, as the deployment of such systems expands into high-stakes settings, reliable evaluation methods become essential (Tran et al., 2025; Gridach et al., 2025). One key evaluation task is failure attribution: identifying the earliest step in a system's trajectory that caused the final output to fail. Performing this task manually is expensive, since agentic systems can involve many interacting agents, and the space of possible interactions grows exponentially with system size. This challenge motivates Automated Failure Attribution (AFA) (Zhang et al., 2025), which employs an LLM as a judge to identify the failing step directly from a system's interaction transcript. However, as demonstrated by the Who&When benchmark (Zhang et al., 2025), even large, capable LLMs perform poorly on this task.

This weak performance has spurred a line of follow-up work that seeks to improve AFA, such as refined prompting strategies (West et al., 2025; Sun et al., 2026) or inference-time interventions (Ma et al., 2026). These approaches share a common underlying assumption: the capability for failure attribution already exists within the model and simply needs to be elicited more effectively. However, the persistently poor performance of direct prompting raises a more fundamental question: do LLMs actually possess the capability required for AFA? To answer this, we look beyond the model's generated output and instead examine the information encoded in its internal representations using simple linear probes Alain & Bengio (2016). Surprisingly, these probes recover substantially more information about the correct failing step than the model's generated answer. We refer to this discrepancy as the knows-but-won't-say gap: LLMs encode considerably more AFA-relevant information internally than they are able to express behaviorally. This finding indicates that poor AFA performance does not necessarily reflect an absence of underlying capability; rather, the relevant information may already be present within the model but not effectively accessed during generation.

This observation then raises a second question: if models already encode the information needed for AFA, can this latent capability be translated into better behavioral performance? To investigate this question, we propose grafting, a simple manual intervention that connects internal components encoding information about the failing step to the components involved in generating the model's output. Rather than teaching the model new failure-attribution knowledge, grafting improves how existing information is routed during generation, enabling the model to more effectively express knowledge it already possesses. In this way, grafting converts latent, decodable AFA information into improved behavioral predictions without requiring ground-truth labels at inference time.

We evaluate direct prompting, linear probing, and grafting across multiple open-weight LLMs and benchmark settings, and find a consistent progression: direct prompting provides a weak behavioral baseline; linear probes reveal that substantially more information about the correct failing step is encoded in model activations; and grafting converts a significant portion of this latent information into improved behavioral predictions. Together, these findings suggest that the limitations of AFA stem not solely from whether models contain the relevant information, but also from whether that information can be effectively accessed. Our contributions are summarized as follows:

• Knowledge–behavior gap. We show that linear probes consistently outperform direct prompting across model–dataset combinations, revealing a substantial gap between the AFA-relevant information encoded in model activations and the information expressed through behavioral predictions. This provides evidence that LLMs possess considerably more AFA-relevant capability than their direct responses reflect.

• Grafting. We introduce grafting, a simple manual intervention that bridges components that encode information about the failing step to those involved in output generation. Grafting consistently improves AFA performance over direct prompting without requiring ground-truth labels at inference time.

References (23)