TL;DR
This paper introduces CEG-Agent, a framework that diagnoses LLM agent failures by constructing Causal Error Graphs (CEGs). By explicitly separating surface-level anomalies from process-level errors and final failures, it maps out the causal chains of how mistakes propagate, significantly outperforming existing "flat" diagnosis methods and providing actionable feedback for agent repair.
What Problem Does This Paper Address?
As LLM-driven agents are tasked with increasingly complex, long-horizon work (like deep research or software engineering), they inevitably fail. However, diagnosing why they failed is difficult. Existing methods often suffer from two major flaws:
- Conceptual Conflation: They lump together "anomalies" (weird but harmless behaviors, like being too wordy), "errors" (actual logic or tool-use mistakes), and "failures" (the final bad outcome). This makes it hard for developers to know what actually needs fixing.
- Lack of Structure: Most diagnostic tools provide a flat list of errors or a simple score per step. They don't capture the "domino effect"—how a small error in step 2 might amplify into a catastrophic failure in step 20.
Methods
The authors propose a tool-augmented agentic framework called CEG-Agent. Its core innovation is the construction of a Causal Error Graph (CEG), a typed multi-relational graph that links execution events to specific diagnostic nodes through causal relations like causes, amplifies, or contributes_to.
Key components include:
- Explicit Taxonomy: A formal distinction between Anomalies (phenomenon-level), Errors (process-level), and Failures (outcome-level).
- Tool-Augmented Inference: The diagnostic agent uses a suite of specialized tools—such as "Error Hypothesis Generation" and "Causal Graph Induction"—to incrementally build and refine the graph.
- Schema Projection: A deterministic validator ensures the resulting graph is "well-formed" (e.g., every error must be grounded in a real event and eventually lead to a failure).
- AAAP Protocol: To create high-quality benchmarks, the authors developed the Adversarial Agentic Adjudication Protocol. In this setup, two different frontier LLMs (like Claude and GPT-5.5) act as adversaries, cross-examining a draft diagnosis until they reach a unanimous consensus.
Datasets
The study introduces CEG-Bench, a benchmark of 100 failed agentic traces sampled from three real-world sources: BrowseComp (web browsing), Tau2Bench (customer service), and SWE-bench (software engineering).
To ensure the benchmark's reliability, the authors also created CEG-Bench-Gold, where eight human domain experts independently annotated the same traces. The high agreement between the automated AAAP annotations and the human experts (71.5% similarity) validates AAAP as a scalable way to build complex diagnostic datasets.
Key Insights and Ideas
- Causality over Classification: Identifying that an error occurred is less useful than identifying the root cause. CEG-Agent focuses on the "main chain" of errors that drive the failure.
- Anomalies are Noise: By separating surface irregularities (anomalies) from causally relevant deviations (errors), the system provides a much cleaner signal for debugging.
- Structural vs. Semantic Accuracy: The paper evaluates diagnosis using two distinct lenses: SRE (Semantically Relaxed, focusing on the "vibe" of the error) and SEE (Structurally Exact, requiring the exact right causal wiring).
- Actionable Repair: The graphs aren't just for show; they include "repair-value" estimates, helping developers prioritize which errors to fix first to maximize the chance of task success.
Key Results
CEG-Agent consistently outperformed strong baselines like Claude Code and Codex across all benchmarks.
- Performance Gains: CEG-Agent achieved an average gain of +9.0 points in semantic evaluation (SRE) and +4.9 points in structural evaluation (SEE) over the best baselines.
- Closed-Loop Repair: In a "retry" experiment, providing agents with CEG-based hints significantly boosted their success rates. For example, on Tau2Bench, success jumped from 77.8% (generic retry) to 91.7% when given CEG failure hints.
- Cross-Backbone Robustness: The framework works across different LLMs (Claude, GPT, Gemini, Qwen, GLM), though stronger models like Claude-Opus-4.7 proved to be the most "balanced" diagnosticians.
Limitations and Future Work
While powerful, the authors note several areas for growth:
- Model Bias: Even with adversarial adjudication, the automated annotations might still inherit subtle biases common to frontier LLMs.
- Complexity Scaling: The current benchmark is limited to 100 traces; scaling this to thousands of traces across more diverse domains remains a challenge.
- Repair Calibration: The "repair-value" estimation (deciding which error is most critical) is still preliminary and can be sensitive to how an LLM words its descriptions.
- Future Directions: The team aims to extend this to multi-agent environments and develop more robust, deterministic methods for calculating error severity directly from graph topology.
Summary updated