Skip to content
Review

TRACE: TRajectory Attribution for Automated Context Engineering

Aug 2026 · 0 citations · 22 references
Computer Science

TL;DR

This work presents TRACE (TRajectory Attribution for Automated Context Engineering), an automated feedback loop that mines historical agent trajectories to diagnose and remediate context failures, showing that over 80% of context-layer failures can be automatically diagnosed and remediated by mining historical trajectories, an overlooked resource in production systems.

Abstract

Production AI agents fail when their context sources -- system prompts, knowledge bases, tool descriptions, and procedural skills -- contain errors or gaps. Current maintenance relies on manual log review and ad-hoc debugging, creating a scalability bottleneck as interaction volume grows. We present TRACE (TRajectory Attribution for Automated Context Engineering), an automated feedback loop that mines historical agent trajectories to diagnose and remediate context failures. Our key insight is that trajectories are rich with implicit dissatisfaction signals -- user corrections, rephrasing, abandonment cues -- that reveal precisely where context sources failed, without explicit feedback collection. Unlike model fine-tuning, TRACE operates on the context layer, enabling rapid iteration without retraining. We make four contributions: (1) a trajectory mining framework that systematically extracts diagnostic information from historical agent executions; (2) multi-component causal attribution that extends textual gradients from monolithic prompt optimization to heterogeneous context sources (skills, knowledge bases, tools, prompts); (3) exploratory verification, where agents actively read context sources to distinguish content gaps requiring CREATE from stale content requiring UPDATE, achieving 96% operation accuracy; and (4) a reusable simulation methodology and verifiable benchmark addressing the absence of open datasets for context debugging, with a six-category fault taxonomy, ground truth annotations, and a cross-layer verification protocol. On 60 dissatisfaction traces spanning three complexity tiers (up to 16 execution nodes), TRACE achieves 72.7% root cause attribution and 82% end-to-end fix effectiveness, showing that over 80% of context-layer failures can be automatically diagnosed and remediated by mining historical trajectories, an overlooked resource in production systems.

View source

Similar papers

#artificial intelligence Preprint Sep 2026

DCFA: Dual-view Causal-inspired Attribution for Failure Reasoning in LLM-based Multi-agent Systems

Large language model (LLM)-based multi-agent systems have experienced rapid growth in recent years. Despite their promise, such systems remain fragile, frequently exhibiting reasoning and coordination errors that can lead to system-level failures. Failure attribution in such systems relies on tracing natural language i...

Ze-Hao Wang, Lanjun Wang, Shi-Long Jin et al. · 1 citation
#artificial intelligence Review Sep 2026

Root-Cause Attribution Is a Search Problem: Continual Search for Long-Horizon Agent Failures

The increasing deployment of AI agents in long-horizon tasks yields massive execution logs. Diagnosing failures within these records is crucial for reliability, as it transforms outcome-level signals into actionable interventions. The sheer scale of the data renders human review impractical, driving the need for automa...

Harsh Raj, David Lee, Anas Mahmoud et al. · 0 citations
Preprint Aug 2026

Adaptive Influence Graphs for Failure Attribution in Multi-Agent Systems

Adaptive Influence Graphs is introduced, a two-stage agentic framework that first transforms a failed trace into a structured graph and then navigates it to identify the critical error and establishes a new state of the art on Who&When, the standard benchmark for multi-agent failure attribution.

Yarden Bakish, Amir Dudai, Roy Ganz et al. · 0 citations
Preprint Aug 2026

Beyond LLM-Based Reasoning: Lightweight GNNs for Agent Failure Attribution

AFANet is introduced, a lightweight graph-based framework that models interaction trajectories through step-level semantic signals and agent-level relationships and suggests that effective agent failure attribution does not require heavy LLM reasoning and a lightweight, structured approach can achieve strong performanc...

Ting-Wei Li, Yuanchen Bei, Xiao Lin et al. · 1 citation
#artificial intelligence Preprint Aug 2026

Detect Before You Attribute: Cascade Failure Attribution for Multi-Agent Systems

DUOTRACE follows a detect-before-attribute paradigm: it first detects anomalous executions and then supplies focused trajectory evidence to downstream LLM-based attribution methods, which improves agent-level and step-level attribution accuracy.

Jia-Yi Zhang, Ze-Xin Wang, DecisionMakingRon Sun et al. · 0 citations

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