From Trace to Fix: Residual Task State in Long-Horizon Agents

Zile Huang, Ser-nam Lim
10/19/2026
cs.AI

Official code: toffeecat/tracedp (0 stars, Python, Apache-2.0, last commit 2026-10-19).

Abstract

Recovering from failures in long-horizon, stateful language agents is challenging because the action introducing a defect, the symptom exposing it, and the persistent state requiring repair frequently diverge. Existing methods largely focus on retrospective failure attribution, leaving sequential diagnosis and state repair poorly integrated under constrained budgets.

Show full abstract

We introduce TRACE-FIX, a unified recovery framework centered on versioned residual task state. Trace transforms execution logs into a structured dependency-linked ledger, prioritizing unresolved task requirements rather than salient surface errors. Fix formulates recovery as budgeted planning over admissible actions, incorporating outcome forecasting and explicit repair-reserve constraints to prevent premature budget exhaustion. To rigorously decouple localization accuracy from downstream repair capability, we present LongH-Debug, evaluating root-cause attribution, verified-fault recovery, and end-to-end closed-loop execution independently. Our empirical analysis demonstrates that structured residual tracking substantially improves causal localization over raw-trace baselines, while budget-aware sequential planning converts verified fault signals into more reliable task recovery without destructive trial-and-error. Code is available at https://github.com/toffeecat/tracedp.

View on arXivView PDF

Code Implementations(1)

toffeecat/tracedpOfficial100%
Apache-2.0

TraceDP evaluation platform: command-line tools for the controlled-injection trace-recovery dataset

00PythonOct 19, 20261 months agoApache-2.0

Similar Papers

Cite this paper

@article{huang2026from,
  title  = {From Trace to Fix: Residual Task State in Long-Horizon Agents},
  author = {Zile Huang and Ser-nam Lim},
  year   = {2026},
  eprint = {2610.25776},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.25776v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.25776.svg)](https://codeofpaper.com/paper/2610.25776)

Discussion