arXiv:2610.13058cs.AIOct 2026

Manuscript Offprint

arXiv:2610.13058

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

LongCat

中国科学技术大学 University of Science and Technology of China

上海创智学院 Shanghai Innovation Institute

TRAVEL BACK TO MOVE FORWARD: RETROSPECTIVE EXPLORATION AND EVOLVING FOR LONG HORIZON AGENTS

Ziang Ye 1,2,6∗^{1,2,6*}, Wentao Shi 3^{3}, Lei Chen 1^{1}, Zhengzhou Cai 1^{1}, Yu Wang 1^{1}, Zhiyuan Yao 4^{4}, Zihan Wang 5^{5}, Xierui Song 6†^{6\dagger}, Fuli Feng 1^{1}, Yixin Cao 7†^{7\dagger}

1^{1}University of Science and Technology of China 2^{2}Shanghai Innovation Institute

3^{3}Facebook 4^{4}Zhejiang University 5^{5}Tsinghua University 6^{6}Meituan 7^{7}Fudan University

yza03@mail.ustc.edu.cn, guqi03@meituan.com, fulifeng93@gmail.com, caoyixin2011@gmail.com

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.