Travel Back To Move Forward: Retrospective Exploration and Evolving for Long Horizon Agents
Ziang Ye, Wentao Shi, Lei Chen, Zhengzhou Cai, Yu Wang, Zhiyuan Yao, Zihan Wang, Xierui Song, Fuli Feng, Yixin Cao
Abstract
Large language model agents increasingly operate in long-horizon environments where early mistakes can trigger cascading failures and trap agents in dead-end trajectories. Agents must therefore be able to proactively recover from such states and turn their exploratory experience into guidance for subsequent decisions. We introduce ReTRAIL, a framework that enables agents to rewind the environment to earlier states while preserving valid progress and carrying forward knowledge learned from abandoned exploration. The environment state moves backward while the agent's knowledge continues to move forward. ReTRAIL trains a shared policy with two complementary signals: State-Anchored GRPO compares alternative continuations from revisited states to improve execution, while a branch-advancement reward guides reflection through the progress of subsequent exploration. Experiments across four interactive benchmark MineSweeper, Sokoban, ALFWorld and ScienceWorld show that simply adding a rewind primitive provides limited benefit and can even degrade performance. In contrast, ReTRAIL enables agents to rewind from unproductive states and use insights from abandoned branches to guide subsequent exploration. These results demonstrate the value of coupling environment rewinding with experience reuse within an ongoing task for long-horizon task solving. The code is available at https://github.com/whi497/ReTRAIL.
Create a lesson
Metadata
- Categories
- cs.AI, cs.CL
Related papers
EvoViM: Recursively Self-Evolving Visual Agents for Exploration with Deferred Queries
Shared title terminologycs.AIXinyu Cao, Tianjie Ju, Zhuosheng Zhang
Agent-Canary-Mas: End-to-End Evaluation of Protocol Risk in Long-Horizon Multi-Agent Systems
Shared title terminologycs.AIXiuming Liu, Le Gai, Zhiyuan Chang et al.
State Representation Shapes Long-Horizon Agent Learning and Transfer: An Empirical Study
Shared title terminologycs.AIDong Nie, Rui Lan, Yixin Nie et al.
SkillHorizon: Constructing Long-Horizon Agent Tasks through Skill Composition
Shared title terminologycs.AIYuxuan Liu, Zhaochen Su, Hangyu Guo et al.
Long-Horizon-Terminal-Bench 2.0: Automating Diverse Task Construction and Measuring Sustained Agent Progress
Shared title terminologycs.AIZongxia Li, Zhongzhi Li, Yucheng Shi et al.
MAGMA-Bench: Evaluating Long-Horizon Embodied Agents under Dynamic Tasks and Execution Failures
Shared title terminologycs.AILoan Bernat, Matthieu Grard, Ariane Herbulot et al.