Back to Feed
Agents / Benchmarks & Evals

Debugging Critical Failures in Agent Trajectories

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

Listen to the summary

Uses a voice available on your device

Audio options
On this page

Key Takeaways

  • TrajDebug addresses the problem of distinguishing between repaired, harmless, and critical errors in long-horizon agent sequences.
  • The method uses multi-granularity history views to balance the need for context against the difficulty of isolating scattered error evidence.
  • The approach includes a causal attribution step guided by an LLM to pinpoint which specific error led to a final task failure.
  • The authors introduced TrajErrBench, a dataset of 486 manually annotated failed trajectories, to evaluate these debugging capabilities.

Summary & Methodology Analysis

TrajDebug manages the complexity of long-horizon debugging by constructing a hierarchy of history views, ranging from high to low detail. This architecture balances the requirement for evidence preservation with the practical challenges of long-context management. By identifying atomic error triggers, the system finds mismatches between agent actions and references such as task instructions or environment feedback. These triggers are then clustered into error instances based on shared violation targets, allowing for a structured representation of the failure. Each instance is classified by state, tracking whether the error was resolved or resulted in terminal impact through factors like irreversible changes or budget debt. The pipeline filters these instances to prioritize Costly Resolution or Manifest Active states, which are the most likely candidates for causing a total task failure. Finally, it uses an LLM to conduct candidate-set-guided causal attribution to isolate the single critical step. This process aims to solve the problem where multiple local errors coexist, often masking the primary root cause. Despite these improvements, the paper notes that detection accuracy for critical errors currently decreases as the length of the agent trajectory grows. Furthermore, standard candidate-error methods often fail to accurately determine criticality when many local errors are present, which this research aims to mitigate through its structured filtering and causal attribution workflow. The paper does not specify precise latency or compute costs associated with these inference steps.

Interactive System Flowchart

Click diagram to expand and zoom

Cross-Examination & FAQs

A deeper dive clarifying mechanics, constraints, and baseline evaluations.

Q1. What problem does TrajDebug solve?

It solves the difficulty of identifying which specific error caused a task to fail in long-horizon agent trajectories where many local errors coexist.

Q2. What is the primary contribution of this research?

The authors introduced the TrajDebug framework for identifying critical failures and the TrajErrBench dataset for benchmarking these debugging capabilities.

Q3. How does this benefit developers?

It provides a systematic way to distinguish between harmless errors, repaired errors, and the actual failures that prevent an agent from completing a task.

Q4. What is the role of the multi-granularity history view?

It is used to balance the preservation of evidence with the management of long-context data during the debugging process.

Q5. How are errors identified and grouped?

Atomic error triggers are identified by comparing agent actions against references, then clustered into error instances based on the specific objects they violated.

Q6. What criteria does the system use to classify errors?

Errors are classified based on their resolution status and terminal impact, specifically considering irreversible changes, semantic footprints, or budget debt.

Q7. What is the composition of the TrajErrBench dataset?

It contains 486 manually annotated failed trajectories, including 400 from the tau2-Bench dataset and 86 from the SWE-Bench Pro dataset.

Q8. Are there limitations to the performance of TrajDebug?

Yes, the detection accuracy for critical errors decreases as the trajectory length increases.

Q9. What specific computational metrics or costs does the paper report?

The paper does not specify quantitative metrics for latency, memory usage, or monetary costs.