arXiv:2610.41564cs.AIOct 2026

Manuscript Offprint

arXiv:2610.41564

Verify--Backtrack Loop: Structured Precondition Recovery for Long-Horizon Language Agents

Mingyang Liu, Qingcan Kang, Shixiong Kai, Tao Zhong, Mingxuan Yuan, Xin Li, Linqi Song

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

ABSTRACT

Language agents increasingly undertake long-horizon tasks in interactive environments, where actions often depend on latent preconditions. The core difficulty is not trajectory length but recovery: when a prerequisite is missing or an earlier decomposition becomes invalid, substituting another plausible action rarely helps. ReAct and subsequent reflection or adaptive-planning methods support local correction, but recovery is expressed as free-form text, leaving no explicit control state that links the terminal goal, the active goal, and the source of failure. We introduce the Verify–Backtrack Loop (VBL), a training-free extension of ReAct that converts precondition discovery and failure diagnosis into structured updates of planning state. VBL maintains the evolving task decomposition as a bounded goal stack and, whenever a readiness check is due, verifies two horizons jointly—whether the active goal contributes to the terminal goal and whether it is feasible in the current state—on goal activation, after execution failure, and after a material state change. These dual-horizon judgments, combined with typed failure attribution, trigger explicit control operations—PUSH, POP, retry, or BACKTRACK TO the parent. We evaluate VBL with Qwen3.5-9B, GPT-4o, and DeepSeek-V3.2 on three public benchmarks: AppWorld, ALFWorld, and ScienceWorld. VBL improves over ReAct and reflection-based control on every backbone–benchmark pair. On the challenging AppWorld setting, it improves task success by up to 22.07 percentage points over ReAct, with gains extending to ALFWorld and ScienceWorld. Ablations show that removing either verification or diagnosis degrades performance—in several settings to below the ReAct baseline—so the two mechanisms are complementary rather than redundant. These results demonstrate that reliable long-horizon interaction benefits from revising the planning state, not merely the next action.

Keywords language agents · long-horizon interaction · precondition recovery · ReAct · goal stack

1 Introduction

Language models increasingly act through tools, web interfaces, software environments, and embodied systems [1, 2]. Many of these interactions are long-horizon: actions change an external state, their effects accumulate, and later decisions depend on earlier outcomes. Reliable execution therefore requires an agent to preserve the terminal goal while adapting its intermediate plan. The difficulty is not simply trajectory length. Dependencies among intermediate goals may be absent from the instruction and become visible only during execution. When such a prerequisite is missed, several subsequent actions may fail. Choosing another plausible action is rarely enough: the agent must identify the source of the failure and revise the corresponding level of task decomposition.

ReAct [1] provides a general basis for interactive agents by interleaving reasoning, action, and observation. It adapts the next decision to new evidence, but it does not impose an explicit hierarchy over goals. Its interaction history records what happened without specifying which short-horizon goal is active, how that goal contributes to the terminal goal, or where planning should resume after repeated failure. Adaptive and search-based planners revise plans or explore alternative paths [3–5], and reflection methods revise outputs or actions through critique and goal-conditioned feedback [6–8]. These approaches improve adaptation, yet recovery remains predominantly textual: there is typically no compact planning state that jointly represents the terminal goal, the active goal, and the causal source of a failure.

The central challenge is therefore not merely to revise the next action, but to revise the planning state at the appropriate level. Such revision requires two goal horizons. The terminal goal defines task completion, whereas the active goal defines the immediate objective under the current decomposition. Before execution, the active goal should both contribute to the terminal goal and be feasible in the current state. After failure, the agent must determine whether to insert a missing prerequisite, retry locally, or return to an earlier decomposition.

Based on this formulation, we propose the Verify–Backtrack Loop (VBL), a training-free extension of ReAct that converts precondition discovery and failure diagnosis into structured updates of planning state. VBL represents the evolving decomposition as a bounded goal stack whose root is the terminal task and whose top is the active goal. A dual-horizon verifier evaluates terminal-goal alignment and active-goal readiness when the active goal is installed, after an execution failure, and after a material state change. Typed failure attribution then maps repeated failures to explicit stack operations—inserting a missing prerequisite with PUSH, or BACKTRACK TO the parent—while a goal verified as complete is removed with POP. Because each stack update re-arms verification, a restored ancestor that is still misaligned triggers further steps upward. The executor is conditioned on the root task text and the selected active goal, so inserting a prerequisite or returning to a parent directly changes subsequent action selection. Backtracking changes the planning state rather than the environment state: executed actions are not reversed; instead, invalid descendants are removed and planning resumes from the restored ancestor under the current observation. This distinction makes VBL applicable to stateful environments in which actions may be irreversible. Figure 1 contrasts this control structure with the linear loops of ReAct and ReflAct.

We evaluate VBL with Qwen3.5-9B, GPT-4o, and DeepSeek-V3.2 on three public benchmarks: AppWorld, ALFWorld, and ScienceWorld. Holding the backbone, interaction budget, and environment interface fixed within each setting, VBL improves over the baselines on every backbone-benchmark pair. Relative to ReAct, it improves task success by up to 22.07 percentage points on AppWorld, 14.21 percentage points on ScienceWorld, and 10.45 percentage points on ALFWorld. Component ablations further show that removing either verification or diagnosis degrades performance, in several settings to below the ReAct baseline, so the two mechanisms are complementary rather than redundant: a goal stack driven by only one of them can be worse than no stack at all. Our contributions are as follows:

  • We formulate long-horizon agent control as a dual-horizon problem that distinguishes terminal-goal alignment from active-goal readiness, allowing misaligned and blocked goals to trigger different planning decisions.

  • We propose VBL, a training-free extension of ReAct that maps verification and typed failure attribution to explicit transitions over a bounded goal stack.

  • We evaluate VBL across three public interactive benchmarks and three backbone models. With backbone, budget, and environment interface held fixed, VBL improves task success over the baselines on every evaluated pair, while ablations show that verification and diagnosis are complementary rather than redundant.