Skip to content
Preprint

TRAJDEBUG: Tracing Error Lifecycle to Identify Critical Failures in Long-Horizon Agent Trajectories

Aug 2026 · 4 citations · ⚡ 1 influential · 77 references
Computer Science

TL;DR

TrajDebug is proposed, an error-lifecycle tracing framework that addresses long-trajectory error discovery with multi-granularity history compression and evidence-based error identification, and supports critical attribution by tracing each error's resolution status and terminal impact.

Abstract

LLM-based agentic systems have shown remarkable capabilities in complex domains, while suffering from cascading errors and difficulty in debugging. Critical error detection aims to locate the earliest error step in a failed trajectory that is responsible for the final failure. However, progress faces two main challenges. First, long trajectories make it difficult to identify individual errors, since the evidence for judging a step may be scattered across distant instructions, observations, and prior context. Second, failed trajectories often contain multiple local errors with different downstream effects, only some of which remain responsible for the final failure. In this work, we propose TrajDebug, an error-lifecycle tracing framework that addresses long-trajectory error discovery with multi-granularity history compression and evidence-based error identification, and supports critical attribution by tracing each error's resolution status and terminal impact. We further construct TrajErrBench, a benchmark of 486 manually annotated failed trajectories from Tau2Bench and SWE-Bench Pro, covering realistic tool-use and coding scenarios. Experiments across diverse agent benchmarks show that TrajDebug achieves the best overall performance over existing baselines, and application studies further demonstrate that its diagnoses provide actionable feedback for improving downstream agent success. We will release the codes and data to facilitate further research.

View source

Similar papers

Preprint Aug 2026

L ONG RCA B ENCH : D IAGNOSING R ESPONSIBLE R OLES AND R OOT C AUSES IN L ONG -H ORIZON A GENT F AILURES

This work introduces LongRCA Bench, comprising 1,140 failed trajectories across five domains without injected errors, and presents Root-Cause Trajectory Attribution (RCTA), a training-free method that retrieves candidate error steps from segment summaries and traces them to available earlier handoff instructions.

Yun-Fei Zhang, Bo-Yu Feng, Changhua Pei et al. · 1 citation
Preprint Aug 2026

Repair or Resample? Rethinking Failure Debugging in LLM Multi-Agent Systems

This study introduces SymTrace, a controlled evaluation framework that records the MAS execution trajectory and establishes intervention anchors and explores the effectiveness of MAS repair methods, revealing that existing unguided rerun methods are highly unreliable.

Zhong-Wen Luan, Xiaoyan Zhang, Ming Hu et al. · 2 citations
Jul 2026

Leveraging Trajectory Graphs for Pre-Execution Error Diagnosis in Agentic LLM Systems

This work proposes Trajectory Graph Copilot, a novel framework that acts as a ``copilot'' for LLM agents by diagnosing potential action errors before they are executed, significantly enhancing the agent's ability to complete long-horizon tasks successfully.

Xu Zheng, Zhuomin Chen, Chaohao Lin et al. · 0 citations
Preprint Jul 2026

Failure as a Process: An Anatomy of CLI Coding Agent Trajectories

The findings show that coding-agent failures are predominantly driven by epistemic errors, typically begin within the first few execution steps, and often remain hidden until recovery is no longer possible, suggesting that improving coding-agent reliability requires earlier validation and intervention rather than relyi...

Xian-Hai Zhao, Han Li, Shuai Li et al. · 4 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.