AI & DataOriginal ResearchPublished April 30, 2026 · 13 views0 downloadsDOI 10.66308/air.e69362342

Localizing failures in AI agent pipelines with structured execution traces

Senior AI Engineer, HautAI, Tallinn, Estonia
* Corresponding author: Alexey Zabegin, Zabaled@gmail.com
Received April 9, 2026Accepted April 27, 2026
AI agentsfailure localizationexecution tracessoftware engineeringobservabilitydiagnostic triagereproducible evaluation
Download PDF
Cover: Localizing failures in AI agent pipelines with structured execution traces

Abstract

Failures in applications built around large language models may emerge several steps after an incorrect decision, making final responses inadequate for diagnosis. This study evaluates whether preserving the identity of execution-trace fields improves lightweight failure localization beyond their lexical content. A frozen public TraceElephant dataset was analyzed using source artifacts available by 30 April 2026. The eligible cohort contained 219 failed executions, 5,936 candidate steps, and 173 task groups across three agent systems. Regularized logistic rankers were evaluated using five task-grouped folds, matched text budgets, and a shared training-only vocabulary. Separate-field encoding achieved 24.7% exact Top-1 localization, compared with 23.3% for a flat representation containing the same lexical evidence. The paired difference was 1.4 percentage points (95% task-cluster bootstrap interval −1.9 to 5.2). Top-3 coverage increased from 46.6% to 50.7%, although its advantage varied across sensitivity analyses. When an entire agent system was withheld, separate-field Top-1 accuracy fell to 12.8%. A combined ranker placed the annotated step within the selected quarter of records in 67.6% of traces, compared with 18.3% for selecting the latest records. These findings support structured traces as inputs to inexpensive diagnostic triage, while providing no clear evidence of improved exact localization from field separation alone. The results concern agreement with benchmark annotations and do not establish causal diagnosis or reductions in human debugging time.

Keywords: AI agents, failure localization, execution traces, software engineering, observability, diagnostic triage, reproducible evaluation

Cite asAlexey Zabegin (2026). Localizing failures in AI agent pipelines with structured execution traces. American Impact Review. https://doi.org/10.66308/air.e69362342Copy

Declarations

Data availability

The source archive is available from https://huggingface.co/datasets/TraceElephant/TraceElephant at revision 218e392a4c921d4379f827355b9e1d8147748b82 under CC BY 4.0. Supplementary File S1 documents additional methods, results, and published-method comparisons. Supplementary File S2 contains four analysis scripts, the source manifest, derived cohort, per-step scores, per-trace rankings, numerical summaries, and verification records. Its README provides the immutable source-download URL and commands for preprocessing, analysis, independent validation, and figure generation. The original archive is downloaded separately and verified by SHA-256 before preprocessing. The replication package is published with this article as Supplementary File S2.

Ethics statement

The analysis reused public benchmark artifacts and did not recruit participants, collect personal user interactions, or conduct interventions on deployed systems. No claim of a formal ethics-board determination is made. Original dataset attribution and license information are retained in the accompanying materials.