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

📅 2026-08-06
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge that large language model agents often fail in long-horizon tasks due to cascading errors, with critical early mistakes being difficult to identify. To tackle this issue, the authors propose TrajDebug, a novel framework that introduces, for the first time, an error lifecycle tracking mechanism. TrajDebug integrates multi-granularity history compression, evidence-driven error identification, parse-state tracking, and terminal impact assessment to effectively distinguish non-critical local errors from root causes that ultimately lead to task failure. Evaluated on TrajErrBench—a benchmark comprising 486 human-annotated trajectories—TrajDebug substantially outperforms existing methods, and its diagnostic outputs demonstrably guide agent refinement and improve task success rates.
📝 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.
Problem

Research questions and friction points this paper is trying to address.

critical error detection
long-horizon trajectories
error lifecycle
LLM-based agents
failure attribution
Innovation

Methods, ideas, or system contributions that make the work stand out.

error lifecycle tracing
multi-granularity history compression
critical error detection
LLM-based agents
trajectory debugging
🔎 Similar Papers
No similar papers found.