STRACE addresses the noise in long-horizon agent execution traces that are used to optimize agent policies. At the batch level, it mines failure patterns to remove redundant traces and keep representative failures. Within each kept trace, it builds a textual dependency graph and performs causal localization to drop non-causal steps and identify the root-cause module, producing a compact high signal-to-noise context for an LLM optimizer.
On a formal verification benchmark, this approach improved a human-expert designed agent's success rate from 42.5% to 58.5%, a 1.4x improvement, and outperformed standard context-filtering baselines. The result matters because naive methods either feed full noisy trajectories, which invite spurious correlations, or truncate them and lose long-range causal evidence. STRACE shows that targeting the causal slice of a representative failure makes optimization both more efficient and more precise.