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,
Key points
From the paper's conclusion- 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.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- ReflectPO: Reflection-Guided Policy Optimization for Long-Horizon LLM AgentsarXiv · 2026
- Hindsight Credit Assignment over Trees for Agentic RLarXiv · 2026
- From Trace to Fix: Residual Task State in Long-Horizon AgentsarXiv · 2026
- TrajEvolve: Trajectory Evolution for Reinforcement Learning with Hindsight Credit AssignmentarXiv · 2026
- DetourBench: Trajectory-Level Evaluation of Interactive Agents with Exact Minimum-Action BoundsarXiv · 2026
- My FAULT: Self-Diagnosis as Credit Assignment in Self-Evolving Agentic Reinforcement LearningarXiv · 2026