acceptodds
Under review as a conference paper at ICLR 2027

AgentRewind: Recoverable Execution for Long-Horizon LLM Agents

Abstract

Many real-world tasks require LLM agents to interact with their environments over long execution horizons. Errors that occur early in execution may propagate through both the agent context and environment state, and their effects may be difficult to reverse through subsequent actions. Existing methods mainly seek to reduce such errors through plan refinement and safety checks but provide little support after errors occur. To enable recovery during long-horizon execution, we present AgentRewind, a runtime recovery framework that records aligned checkpoints of the agent context and controlled environment, allowing agents to return to an earlier state and resume execution with information from previous attempts. We also construct MettleBench, a benchmark for evaluating task completion and partial progress on long-horizon engineering assignments containing a series of related requirements. Experiments across tasks, multiple models, execution strategies, and agent harnesses show that AgentRewind improves task success rate and average checklist progress over the compared baselines.

Primary area:
foundation or frontier models, including LLMs
Keywords:
LLM agents, long-horizon agents, agent reliability, runtime recovery, checkpointing and rollback, benchmarks

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.80 over 5 reviews, above 27% of the others.
Reviewer_CLdLOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper studies recovery mechanisms for long-horizon LLM agents when execution trajectories become corrupted by previous mistakes. The authors argue that errors in long-horizon tasks often accumulate over time, causing agents to continue from an invalid state or repeat unsuccessful behaviors. Existing approaches mainly rely on continuing execution, restarting the agent, or providing additional feedback, but these strategies may either preserve incorrect states or discard useful progress. To address this issue, the authors propose agentrewind, a recovery framework that allows agents to return to previous execution checkpoints and continue from a more reliable state. The key idea is to jointly restore both the external environment state and the internal agent context. In addition to restoring workspace changes, agentrwind reconstruct previous interaction history and maintains rewind memory to record failed attempts, aiming to prevent the agent from repeating the same mistakes.

The authors also introduce MettleBench, a benchmark designed for evaluating long-horizon agent execution with multiple acceptance criteria. Experiments across different agent frameworks and tasks show that agentrewind improves success rates compared with continue, restart, and other recovery baselines. Ablation studies further analyze the contribution of environment rewind, context rewind, and rewind memory.

Critical strengths

The paper focuses on a practically important problem for long-horizon agents. As tasks become longer and involve more interactions, early mistakes can propagate and significantly reduce the probability of successful completion. The proposed recovery perspective provides a reasonable direction for improving agent robustness.

A notable strength is that the framework considers both environment state and agent context. Previous rollback mechanisms often focus only on external state restoration, while LLM agents also maintain internal assumptions through conversation history and previous tool interactions. Restoring both aspects is a meaningful engineering consideration.

The experimental evaluation is relatively comprehensive. The authors test across multiple agent frameworks and provide component-level ablations to understand the effect of different recovery elements. The introduction of a benchmark with multiple acceptance criteria also attempts to evaluate long-horizon execution beyond simple final success metrics.

Critical weaknesses
  1. The primary weakness is the limited methodological novelty. The central idea of saving checkpoints and rolling back execution states has been widely studied in computing systems. Although agentrewind extends this idea by additionally restoring LLM context and storing rewind memory, the paper does not sufficiently demonstrate why this represents a fundamentally new capability for LLM agents rather than a natural engineering adaptation of existing recovery mechanisms.

2..Another concern is that the framework assumes the agent can identify when the current trajectory should be abandoned. However, one of the most difficult problems in long-horizon agents is recognizing that a plan has become invalid or that progress has stalled. Without a reliable failure detection mechanism, the proposed recovery process may not be activated at the appropriate time.

  1. The generality of the evaluation is limited. The benchmark mainly consists of software engineering tasks with controllable workspace states, which naturally favor rollback-based solutions. It remains unclear whether agentrewind can provide similar benefits in broader settings such as web agents, embodied agents, or environments involving irreversible external actions.

  2. The paper does not fully isolate the unique contribution of rewind compared with stronger restart-based alternatives. Since restart methods can also preserve previous experience through summaries or memories, additional analysis is needed to understand when maintaining previous execution state provides advantages over simply restarting with better contextual information.

  3. MettleBench's 640 acceptance criteria were LLM-written. The authors use deterministic gates and human task-level checks, but explicitly say they did not hand-annotate every criterion. Because the main success result depends on those criteria, a stratified criterion-level false-pass/false-fail audit is needed before treating its measured advantage as fully validated. This is a validity gap, not evidence that the current scores are wrong.

Questions for authors

The authors should address the concerns raised in the critical weaknesses, especially regarding the methodological novelty of agentrewind, the dependency on reliable failure detection, and the general applicability beyond controllable workspace environments.

Other: I am curious whether the authors have tried evaluating the method with more recent frontier models (e.g. GPT-6 or other latest LLMs). I am not suggesting that additional large-scale experiments should be conducted during the rebuttal period, as such evaluations may require substantial resources and time. I would mainly like to understand whether the authors have any preliminary observations regarding how the proposed method performs with newer model generation

Reviewer_xMzKOpenReview ↗
Rating
1
Confidence
4
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

Early errors in long-horizon LLM agent execution cause irreversible corruption in both context and environment states. To provide post-error support, researchers introduce AgentRewind, a runtime recovery framework that logs aligned checkpoints of the agent context and environment. This mechanism allows agents to revert to a pre-error state and resume tasks using insights retained from failed attempts. The authors also present MettleBench, a benchmark for evaluating long-horizon engineering tasks, demonstrating that AgentRewind improves task success rates and partial progress across multiple models. When evaluated against classical transaction processing literature such as ARIES recovery algorithms, concurrency control protocols, and distributed commit structures, the framework exhibits both unique adaptations and severe architectural limitations.

Critical strengths
  1. The framework introduces an interesting twist to atomicity through cognitive state retention. In traditional systems, a rollback strictly reverts the database to a prior consistent state and explicitly discards the aborted execution path. AgentRewind departs from this by conceptualizing task trajectories as state transitions, formalizing checkpoints as dt = (ct, st) where ct is the agent context and st is the environment state. When a rollback occurs, the system restores both states but injects rewind memory into that restored context. The LLM retains the semantic knowledge of its failed attempt, creating a learning loop where the aborted transaction informs the retry without permanently corrupting the shared workspace. (But the limitation is that once context is reloaded, context narrowing is eliminated.)

  2. The implementation of a dual-layer recovery system maps database concepts onto autonomous workflows. Whereas classical databases isolate recovery purely to the storage layer, aligning the context recorder with the environment-state recorder acknowledges that the internal cognitive trajectory of the agent is just as critical to recovery as the external storage. This joint recovery model is appropriate for workflows where decision generation is linked to immediate environmental feedback.

Critical weaknesses

W1 The most severe limitation is the fundamentally inadequate approach to external side effects. Distributed databases rely on two-phase commit protocols or compensating transactions to manage external interactions that cannot be neatly rolled back. AgentRewind simply concedes that effects outside the workspace filesystem like network requests and external API calls are unrecoverable. Modern agents act as orchestrators across diverse web services, meaning this limitation permanently confines the framework to isolated sandboxes. Without a mechanism to issue compensating tool calls for external state changes, the system cannot safely manage real-world operations.

W2 The framework also suffers from complete concurrency blindness coupled with an overly coarse checkpointing mechanism. Transaction processing relies heavily on isolation properties to ensure multiple actors can operate simultaneously. AgentRewind assumes a strictly single-agent paradigm. If deployed within multi-agent architectures, rolling back an entire environment state to a historical checkpoint would immediately overwrite the concurrent progress of other agents. Compounding this issue, capturing the full execution state at every decision boundary to generate checkpoint metadata mirrors heavy system-level snapshots. Classical databases avoid this overhead through highly efficient write-ahead logging. As execution horizons scale, this dense monolithic checkpointing will introduce massive memory overhead and prevent the framework from scaling to complex software engineering.

Questions for authors

Question 1: Context Scaling and Attention Dilution How does the framework mitigate the challenge of context scaling? Even when the agent context is accurately saved and restored, the underlying LLM still relies on a probabilistic attention mechanism. As rewind memory accumulates across multiple rollbacks, how do you prevent critical recovery details from being neglected due to attention dilution?

Question 2: Concurrency and Shared State Inconsistency While this rollback scheme may be effective in an isolated single-agent sandbox, how can it be generalized to handle concurrent agents? In a realistic deployment where multiple agents interact with a shared environment state (e.g., global states and constraints), a rollback by one agent would inherently invalidate the agent context of the others, leading to cascading state inconsistencies.

Reviewer_VDaQOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

The paper introduces AgentRewind, a runtime recovery framework to improve success rate of long-horizon execution. When an error occurs, AgentRewind does not restart tasks from scratch or carry errors forward. It rolls back both the agent context and the environment state to a clean prior checkpoint, along with a summary of rewind memory. In addition, the authors construct a benchmark, MettleBench from existing engineering benchmarks for evaluation.

Critical strengths

-The framework allows the rollback of both agent context and the external environment state to continue from an earlier state . -The paper constructs a benchmark, MettleBench by deriving 82 tasks from five existing engineering benchmarks for evaluation of AgentRewind -The paper presents limited experiments to show the effectiveness of the proposed framework.

Critical weaknesses
  1. The novelty is not clear and the contribution is not significant. The key contribution, rolling back state and injecting failure memory to improve success rate of long-horizon execution, shares substantial conceptual overlap with existing systems like WebOperator (https://arxiv.org/abs/2512.12692). The core contribution of the paper seems incremental rather than a novel conceptual advance.

  2. The evaluation lacks experimental comparisons against directly relevant, state-of-the-art recovery frameworks.

  3. The paper does not propose any technique to reduce processing time or storage overhead. The paper also does not show runtime overhead, memory footprint, and storage costs associated with frequently taking full dual-state snapshots (both LLM context and environment state) in long-horizon tasks.

4.The quality of figures and graphs need improvement. The fontsize in figures/graphs need to be increased.

Questions for authors

Please address the Weak points.

Reviewer_n9ZmOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper presents AgentRewind, a runtime layer that records aligned checkpoints of an agent's context and workspace files at every LLM decision. When stuck, the agent can call a rewind tool to select an earlier checkpoint and write a short memory of what failed; the system restores both the context and the files to that checkpoint and injects the memory. The authors also construct MettleBench, 82 tasks adapted from five engineering benchmarks, each rewritten into a long assignment with a hidden, ordered checklist of 5–12 dependent checks, where the agent sees only the first failing check after each submission. With GPT-5.4 on mini-SWE-agent, task success on MettleBench rises from 62.2% (Continue) to 87.8%, ahead of Restart-with-Experiences and a safety-review baseline, with gains across two models and three harnesses, component ablations, and a Terminal-Bench 2.0 result of 83.1% versus 78.7%.

Critical strengths

Starting from 50 identical failed states with the same recovery prompt, AgentRewind recovers 30% versus 8% for Continue, and removing file rollback, context rollback or rewind memory each reduces success (Table 5); the gains also hold across three harnesses (Table 4).

Critical weaknesses
  • External validation is limited and modified. The only external benchmark is Terminal-Bench 2.0, with one model, two baselines and no ablations (Table 3), for a +4.4-point gain without confidence intervals. It was run under MettleBench's early-stop rule (stop after five identical failed submissions), which implies repeated submissions with test feedback, unlike the standard benchmark, so the results are not comparable to published numbers. 28 of the 82 MettleBench tasks are also built from Terminal-Bench environments (Appendix A, Table 6). The method's benefit outside the authors' own benchmark is therefore unclear.
  • MettleBench is designed around the failure that rewinding fixes. The construction rules require sequential stages and chained defects (Appendix A.6), and the authors state that difficulty comes from irreversible operations such as rewriting git history or overwriting a source file (Appendix A.2). In the worked example, doing steps in the wrong order permanently destroys work, while the instruction forbids replacing the repository with a fresh copy, the manual equivalent of a rewind (Appendix A.7). The large gain (62.2% to 87.8%) may therefore overstate how general the method is.
  • The comparison between strategies is not controlled. Only AgentRewind receives an extra prompt after each rejection asking whether to repair the current path or go back (Appendix B.3), and this is not ablated. The early-stop rule cuts Continue off before it uses larger budgets (62.2% at both 2M and 5M tokens, Table 2), actual token use per strategy is not reported, and it is unclear whether a rewind resets the failure counter. Results are means of three runs with ranges only, while only 74.7% of task outcomes agree across runs (Appendix A.5).
Questions for authors
  1. How does AgentRewind perform on standard Terminal-Bench 2.0 (single submission, no test feedback) and on at least one other unmodified benchmark, with the component ablations repeated there?
  2. How does Continue perform with the same repair-or-go-back prompt but without the rewind tool?
  3. Can you report actual tokens used and submissions per strategy, results with the early-stop rule removed, whether a rewind resets the failure counter, and confidence intervals over runs?
  4. Were the instructions validated as sufficient on their own, e.g., can a human or an independent agent solve tasks in one submission without checklist feedback? Why do task instructions forbid replacing the repository with a fresh copy?
Reviewer_2RMrOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper proposes AgentRewind, a runtime layer that checkpoints the agent context and workspace together and lets the agent roll both back to an earlier point with a self-written rewind memory. It also introduces MettleBench, 82 multi-requirement engineering tasks with ordered hidden checklists. Experiments show gains over Continue, Restart and safety-review baselines across two GPT-5.4 variants, three harnesses and Terminal-Bench 2.0.

Critical strengths
  1. Clear problem and well-motivated mechanism. Restoring the agent context and the environment together is the right abstraction for recovery.
  2. Transparent and reproducible implementation. The appendix documents the execution record format, the git-based snapshot and restore procedure, how each class of workspace path is handled, what is not rolled back, and the manual interventions during the formal runs, which is unusually thorough for an agent systems paper.
Critical weaknesses

Major

  1. Incremental novelty and missing recovery baselines.

The introduction frames prior work as either plan refinement before execution or safety checks during execution, and concludes that recovery after an error is largely unaddressed. This misrepresents the field. Recovery through replanning is a long-standing paradigm: when a step fails, the agent revises its plan from the current state and continues forward, as in Inner Monologue [1], DEPS [2], AdaPlanner [3], Voyager [4], Reflexion [5], and the backtracking search of LATS [6] and tree-search agents [7]. Several of these are cited, but they are filed under planning or safety rather than recognized as the recovery methods they are, and none of them is run as a baseline. The same holds for the rollback line the paper does acknowledge, GA-Rollback [8], WebRollback [9] and DART [10], which are dismissed because they lack infrastructure for this setting, even though the authors control the infrastructure and could reimplement their policies. The result is that every baseline is a method with no recovery mechanism at all, so the experiments cannot tell whether the gains come from the specific design of AgentRewind or simply from having any recovery mechanism.

This omission also matters for scope. Rewind is only possible when the environment can be physically restored, which is true of a workspace directory but not of most settings in which long-horizon agents operate. A high-level planner for a robot cannot un-pour a liquid or un-drop an object; a web agent cannot un-send a form; a computer-use agent cannot un-click. In those settings replanning from the current state is the only available form of recovery, and it is also applicable in the paper’s own setting. A fair evaluation should therefore include a forward-recovery baseline, and the paper should discuss when rewinding is preferable to replanning and when it is not an option at all.

  1. The benchmark is built in favor of the method and weakly validated.

The screening rules in Appendix A.6 require every task to contain defects that must be repaired in sequence, and Appendix A.2 states that difficulty comes from operations the tools cannot undo. About a sixth of all criteria check that original artifacts were preserved. These are exactly the conditions under which environment rollback pays off. On Terminal-Bench 2.0, where Restart with Experiences actually underperforms Continue, suggesting that tasks are less sensitive to irreversible state changes, the gain of AgentRewind over the strongest baseline is roughly half of what it is on MettleBench, and no variance is reported for this experiment.

The paper does not say which model generated the benchmark, which matters if it shares a family with the evaluated models. Finally, the claim that existing benchmarks formulate each task around one primary requirement is uncited, and TheAgentCompany [11] and AppWorld [12], both cited by the authors, use multi-checkpoint scoring.

  1. Compute fairness and the termination rule.

The only stopping condition is five consecutive submissions failing at the same first criterion, with no limit on steps, time, tokens or rewinds. A rewind may change which criterion fails first and so effectively resets the counter, giving AgentRewind more attempts by construction; the paper clarifies this only for the paired experiment, not for the main comparison. Under matched token budgets the advantage over the strongest baseline at one million tokens is within run-to-run variance, and it becomes material only at two to five million tokens per task. No per-strategy cost is reported, neither tokens nor LLM calls nor wall-clock, so the reader cannot judge what the gains cost. The headline numbers in the abstract and in the harness comparison are computed against Continue rather than against Restart with Experiences, and against Restart the task-success gain on GPT-5.4 mini is not significant after correction.

  1. No analysis of rewind behavior, and a risk of rewind loops.

Checkpoint selection is delegated entirely to the LLM, which inspects up to eighty candidates and picks one. The paper reports nothing about how often agents rewind, how far back they go, how often a rewind discards valid progress, or how the chosen target compares to the last validated state. With unlimited rewinds and no budget cap, repeated rewinds into the same region are possible, and the ablation without rewind memory, which falls well below Continue, suggests this does happen. There is also a prompt asymmetry: after a rejection the AgentRewind agent is explicitly asked whether to repair or go back, while the Continue agent receives no analogous prompt to reconsider, which confounds the main comparison.

Minor

  1. The related-work section titled Long-Horizon Agents lists only benchmarks and no agent methods.
  2. The introduction states that existing methods do not address recovery, which contradicts the paper’s own discussion of rollback work.

References:

[1] Huang, Wenlong, et al. "Inner monologue: Embodied reasoning through planning with language models." arXiv preprint arXiv:2207.05608 (2022).

[2] Wang, Zihao, et al. "Describe, explain, plan and select: interactive planning with llms enables open-world multi-task agents." Advances in Neural Information Processing Systems 36 (2023): 34153-34189.

[3] Sun, Haotian, et al. "Adaplanner: Adaptive planning from feedback with language models." Advances in neural information processing systems 36 (2023): 58202-58245.

[4] Wang, Guanzhi, et al. "Voyager: An open-ended embodied agent with large language models." arXiv preprint arXiv:2305.16291 (2023).

[5] Shinn, Noah, et al. "Reflexion: Language agents with verbal reinforcement learning." Advances in neural information processing systems 36 (2023): 8634-8652.

[6] Zhou, Andy, et al. "Language agent tree search unifies reasoning acting and planning in language models." arXiv preprint arXiv:2310.04406 (2023).

[7] Koh, Jing Yu, et al. "Tree search for language model agents." arXiv preprint arXiv:2407.01476 (2024).

[8] Li, Xingzuo, et al. "Generator-assistant stepwise rollback framework for large language model agent." Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing. 2025.

[9] Zhang, Zhisong, et al. "WebRollback: Enhancing Web Agents with Explicit Rollback Mechanisms." Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 2: Short Papers). 2026.

[10] Yang, Ke, et al. "DART: Semantic Recoverability for Structured Tool Agents." arXiv preprint arXiv:2605.23311 (2026).

[11] Xu, Frank Fangzheng, et al. "Theagentcompany: benchmarking llm agents on consequential real world tasks." Advances in Neural Information Processing Systems 38 (2026).

[12] Trivedi, Harsh, et al. "Appworld: A controllable world of apps and people for benchmarking interactive coding agents." Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2024.

Questions for authors
  1. Which model generated the MettleBench tasks, checklists, evaluators and reference solutions, and which model acted as the adversarial reviewer?
  2. Please report, per strategy and model: mean tokens, LLM calls, wall-clock per task, and the distribution (mean, max) of rewinds per run.
  3. Why do both w/o Env and w/o Memory fall below Continue? Does this imply that any partial rollback implementation is harmful, and how sensitive is the full method to the coupling of the three components?
  4. What are the snapshot storage size and checkpoint/restore latencies, especially for the larger repositories?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.