cs.LGAug 20, 2026

Success Leaves Detours: Learning Executable Walkthroughs for Long-Horizon Agents

Authors: Kaijie Chen, Chenyu Fang, Liang Yan, Bo Li, Bo Zhang, Peng Ye

Organizations: Tongji University · Shanghai AI Laboratory · Fudan University

Abstract

Test-time self-evolving agents improve by reusing past experience, yet sparse-reward trajectories contain failures, loops, and detours, while summaries often omit the state conditions and action dependencies needed for execution. We study executable Walkthrough induction from sparse-reward trajectories: extracting compact, state-conditioned, and verifiable procedures. Our key observation is that delayed credit identifies actions associated with progress but cannot determine whether they produce facts required by later actions. We propose Trace, a credit-guided, dependency-grounded framework that compiles noisy trajectories into executable Walkthrough Memory. It detects progress anchors from rewards and persistent state changes, propagates credit to identify valuable transitions, and estimates action prerequisites from cross-episode success and failure evidence. Backward dependency slicing then traces required facts to their producers, extracting dependency-consistent action chains while removing irrelevant loops and detours. The resulting Walkthroughs encode entry conditions, ordered state--action--effect steps, and completion and failure predicates, supporting reuse, intermediate-state resumption, and programmatic verification. Experiments on J-TTL, WebShop, and ScienceWorld with three open-source LLMs show that Trace consistently outperforms eight test-time learning and memory baselines. Compared with the strongest baseline, it improves average AUC and Final-33 by 30.030.0% and 40.540.5%, respectively, while using fewer inference tokens. These results show that long-horizon interaction benefits more from state-conditioned executable procedures than from complete trajectories or abstract summaries.

Figures & tables

Explore similar work

CardsList
  1. Travel Back To Move Forward: Retrospective Exploration and Evolving for Long Horizon Agents

    Oct 9, 2026Ziang Ye, Wentao Shi, Lei Chen +7Long-Horizon LLM AgentsLLM Agent Planning

  2. When to Forget: Risk-Controlled Context Adaptation for Long-Horizon Agents

    Oct 16, 2026Chenle Chen, Yangbo Wei, Zhijie Zheng +6LLM Context ManagementLong-Horizon Agent Tasks

  3. AgentRewind: Recoverable Execution for Long-Horizon LLM Agents

    Aug 14, 2026Yu Zhuang, Kefei Chen, Yitong Duan +3Long-Horizon LLM AgentsLong-Horizon Agent Tasks