---
title: 'ReAcTree: Hierarchical LLM Task Planner'
url: https://www.emergentmind.com/topics/reactree
type: topic
---

# ReAcTree: Hierarchical LLM Task Planner

Searching arXiv for the primary ReAcTree paper and closely related planning baselines.
ReAcTree is a hierarchical, training-free LLM agent framework for long-horizon task planning under partial observability. It replaces a monolithic trajectory with a dynamically constructed agent tree in which natural-language subgoals are delegated to LLM-powered agent nodes, while behavior tree–inspired control-flow nodes coordinate execution through sequence, fallback, and parallel semantics. The framework combines subgoal-level episodic memory with shared working memory, and was evaluated on WAH-NL/VirtualHome and ALFRED/AI2THOR, where it consistently outperformed strong planning baselines such as ReAct, Tree-Planner, and zero-shot planning across multiple LLMs [2511.02424].

## 1. Problem setting and design rationale

ReAcTree is motivated by the failure mode of monolithic LLM planning in long-horizon embodied tasks. In such settings, a single trajectory must absorb all prior decisions, observations, room transitions, tool usage, and partial observations. The reported consequence is entanglement of unrelated subproblems, which increases error propagation, hallucination, logical inconsistency, and context-window growth. The framework therefore shifts the planning unit from a single global trajectory to a hierarchy of semantically isolated subgoals [2511.02424].

The method targets partially observable household environments with irreversible actions. The motivating examples include tasks in which the agent must search across rooms, manipulate containers, and satisfy multi-object goals such as placing multiple items on a table. The paper explicitly contrasts this setting with action-tree search methods that assume reversible simulators and rollbacks. ReAcTree instead expands in subgoal space and executes in the actual environment state without rollback.

This design implies a particular notion of robustness. Rather than relying on self-reflection loops or trajectory-wide revision, ReAcTree localizes reasoning inside subgoal-specific contexts and uses explicit control flow to encode sequential dependence, recovery alternatives, and independent branches. This suggests that the framework treats hierarchical decomposition not as a post hoc scaffold around ReAct, but as the primary mechanism for reducing long-horizon interference.

## 2. Agent-tree formalism and control-flow semantics

The core object is a dynamic agent tree \(T = (V, E)\), where the node set is partitioned into agent nodes \(V_A\) and control-flow nodes \(V_F\). Each agent node \(n \in V_A\) is associated with a natural-language subgoal \(g^n\) and an LLM policy \(\pi^n\). Each control-flow node \(n_f \in V_F\) has a type \(f \in \{\text{sequence }(\to), \text{ fallback }(?), \text{ parallel }(\Rightarrow)\}\) and coordinates the execution of child agent nodes [2511.02424].

At time \(t\), an agent node operates on a local context
\[
c^n_t = (o^n_1, a^n_1, \ldots, a^n_{t-1}, o^n_t),
\]
and samples an action according to
\[
a^n_t \sim p_{\text{LLM}}(\cdot \mid P^n, g^n, c^n_t),
\qquad
P^n = (P_{\text{sys}}, P^n_{\text{ic}}).
\]
Here \(P^n_{\text{ic}}\) contains in-context examples retrieved from episodic memory for the current subgoal. The action space is extended beyond primitive environment skills:
\[
\bar{\mathcal{A}}^n_t = \mathcal{A}^n_t \cup \mathcal{L} \cup \mathcal{E},
\]
where \(\mathcal{A}^n_t\) contains executable skills, \(\mathcal{L}\) contains language steps, and \(\mathcal{E} = \mathcal{F} \times \mathcal{L}\) contains expansion actions that specify a control-flow type together with a list of subgoals.

Expansion is central. If an agent emits an expansion action \(a^n_t = (f^n, [g^n_1, \ldots, g^n_K])\), the framework inserts an intermediate control-flow node \(n_f\) of type \(f^n\) and attaches child agent nodes for the proposed subgoals. Execution then recurses into that subtree. Agent nodes terminate with `done`, `failure`, or after exceeding a maximum decision count \(D_{\max}\), in which case termination is failure.

The control-flow semantics are explicit. A sequence node executes children in order and succeeds iff all succeed. A fallback node executes children in order and succeeds on the first success, failing only if all fail. A parallel node executes all children, sequentially for simplicity, and aggregates status by majority voting. The fallback semantics are especially important for search under partial observability, since they encode structured alternatives such as trying multiple rooms or receptacles.

A common misconception is to treat ReAcTree as a generic tree-of-thoughts planner. The formalism is narrower and more operational. Nodes are not merely reasoning states: they are LLM agents with access to environment skills, subgoal-local context, and the ability to further expand the tree. Conversely, the tree is not a speculative search tree over reversible action prefixes; it is an executable hierarchy over subgoals in the live environment state.

## 3. Episodic memory and working memory

ReAcTree integrates two memory systems with distinct roles. Episodic memory stores subgoal-level experiences as tuples \((t^e, v^e, s^e)\), where \(t^e\) is the text trajectory for an agent node, \(v^e = f_{\text{sen}}(g^e)\) is a Sentence-BERT embedding of the subgoal, and \(s^e \in \{\text{success}, \text{failure}, \text{expand}\}\) is the termination state. Given a current subgoal \(g^n\), retrieval uses cosine similarity
\[
\operatorname{sim}(v^n, v^e) = \frac{v^n \cdot v^e}{\|v^n\|\,\|v^e\|},
\]
followed by top-\(k\) selection subject to a token budget, with tie-breaking that samples across success, failure, and expand outcomes [2511.02424].

This retrieval policy makes episodic memory subgoal-specific rather than task-global. The paper emphasizes that this differs from monolithic methods in which retrieval is tied to the overall task description even when the agent is currently performing a narrow subroutine such as locating an object or opening a receptacle. A plausible implication is that ReAcTree reduces prompt mismatch by conditioning each node on examples aligned with the immediate operational subgoal.

Working memory serves a different function. It is a shared blackboard of environment-specific observations, implemented as a Python dictionary mapping object classes to lists of observed instances and locations. It is updated automatically when movable objects are observed. ReAcTree exposes this state through a tool-like action, `recall location of <object>`, allowing any node to query shared knowledge rather than re-searching the environment.

The two memories are complementary rather than interchangeable. Episodic memory provides cross-task priors at the subgoal level; working memory provides within-task state sharing. The ablation study on WAH-NL with Qwen 2.5 72B illustrates the separation clearly: no memory gives \(31.00\) GSR / \(56.82\) SSR, working memory only gives \(47.00 / 64.72\), episodic memory only gives \(48.00 / 75.13\), and combining episodic memory with working memory gives \(61.00 / 79.58\). The paper also notes that WM-only can hurt small models without episodic memory, whereas larger models remain robust and benefit from it.

## 4. Inference procedure, prompting, and computational profile

ReAcTree is purely prompt-based and does not use fine-tuning. The inference pipeline starts from a top-level goal, initializes a root agent node, retrieves subgoal-level examples, and interleaves reasoning and acting. If the node decides that the current subgoal is too complex, it emits an expansion action and delegates execution to a newly created control-flow subtree. Status is propagated upward through the control-flow semantics until the task terminates with success, failure, or budget exhaustion [2511.02424].

Prompting is structured around three roles for agent nodes: think, act, and expand. The prompt also enumerates available primitive skills and control-flow types. The Guidance library is used for constrained generation of actions and control-flow choices, with temperature \(0.0\) for free-form reasoning and deterministic action selection. Retrieved in-context examples are capped at \(5\)K tokens. Per-task decision caps are \(D_{\max} = 200\) for WAH-NL and \(D_{\max} = 100\) for ALFRED.

The framework uses different primitive action sets across simulators. In VirtualHome/WAH-NL the skills include `go to`, `pick up`, `put down`, `open`, `close`, and `turn on`. In AI2THOR/ALFRED, the action set additionally includes operations such as `slice` and `turn off`. The working-memory query action is inserted into the available action space when WM is enabled.

The computational trade-off is explicit. ReAcTree increases execution time relative to ReAct, but keeps token growth more bounded because each node reasons in a modular subgoal-local context. On shared successful WAH-NL tasks with a \(70\)B model, ReAcTree+WM takes \(198.6\)s versus \(109.1\)s for ReAct+WM, but achieves much higher GSR. Peak input tokens are also more stable: ReAcTree+WM \(70\)B reports a maximum input length of \(6977\), compared with \(8316\) for ReAct+WM. The paper does not present self-reflection or self-consistency loops; computational overhead comes primarily from tree construction and recursive node execution.

## 5. Empirical evaluation on WAH-NL and ALFRED

The empirical study covers WAH-NL in VirtualHome and ALFRED in AI2THOR, using LLaMA 3.1 \(8\)B/\(70\)B, Qwen 2.5 \(7\)B/\(72\)B, Mistral \(7\)B, Gemma 2 \(9\)B, and Phi-4-reasoning-plus \(14\)B. WAH-NL contains \(250\) training and \(100\) test tasks across five categories, with metrics Goal Success Rate (GSR) and Subgoal Success Rate (SSR), where
\[
\text{SSR} = \frac{\# \text{ completed subgoals}}{\# \text{ total subgoals}}.
\]
ALFRED evaluation uses valid-seen and valid-unseen splits and reports GSR [2511.02424].

On WAH-NL, the gains are large across models. With Qwen 2.5 \(72\)B, ReAcTree+WM attains \(61.00\) GSR / \(79.58\) SSR, compared with ReAct+WM at \(31.00 / 54.05\), ReAcTree without WM at \(48.00 / 75.13\), and ReAct at \(26.00 / 51.38\). With LLaMA 3.1 \(70\)B, ReAcTree+WM reaches \(58.00 / 79.27\) versus \(33.00 / 63.15\) for ReAct+WM. The pattern persists for smaller models: LLaMA 3.1 \(8\)B obtains \(30.00 / 60.77\) with ReAcTree+WM versus \(16.00 / 42.65\) with ReAct+WM, and Qwen 2.5 \(7\)B obtains \(37.00 / 59.63\) versus \(13.00 / 39.73\).

| Setting | ReAcTree+WM | Comparator |
|---|---:|---:|
| WAH-NL, Qwen 2.5 72B (GSR / SSR) | 61.00 / 79.58 | ReAct+WM: 31.00 / 54.05 |
| WAH-NL, LLaMA 3.1 70B (GSR / SSR) | 58.00 / 79.27 | ReAct+WM: 33.00 / 63.15 |
| ALFRED valid-unseen, Qwen 2.5 72B (GSR) | 39.83 | ReAct+WM: 39.10 |

The ALFRED results are smaller in magnitude but still favorable. ReAcTree+WM with LLaMA 3.1 \(70\)B achieves \(40.00\) vs. \(33.31\) on valid-seen and \(37.03\) vs. \(32.40\) on valid-unseen relative to ReAct+WM. With Qwen 2.5 \(72\)B, the corresponding values are \(40.85\) vs. \(37.07\) on seen and \(39.83\) vs. \(39.10\) on unseen. Phi-4-RP \(14\)B reaches \(35.12\) vs. \(31.71\) on seen and \(36.18\) vs. \(29.72\) on unseen.

The control-flow ablation clarifies which part of the hierarchy matters. For Qwen 2.5 \(72\)B on WAH-NL, using all three control-flow types yields \(61.00 / 79.58\), using only sequence plus fallback yields \(61.00 / 79.08\), and using sequence alone drops to \(46.00 / 63.22\). This indicates that fallback carries most of the practical benefit, while parallelism is useful but not always decisive. The error analysis for Qwen 2.5 \(72\)B reports \(39\) failures categorized as ambiguous (\(10\)), execution (\(12\)), search (\(13\)), and expand (\(4\)), with search under partial observability identified as the dominant failure mode.

## 6. Representative execution pattern, related methods, and limitations

A representative WAH-NL example is the goal “Make sure there is a wine and a juice on the coffee table.” The root agent expands into a parallel node with two children: move the wine onto the coffee table, and move the juice onto the coffee table. The wine branch expands into a sequence whose first component is a fallback search over rooms. Kitchen and living room attempts fail; the bedroom attempt succeeds by opening cabinet 1 and picking up wine 1. The juice branch uses working memory through `recall location of juice`, retrieves “juice 1 near fridge 2 in kitchen 1,” and then executes a direct pickup-and-delivery sequence. Both branches succeed, the parallel node returns success, and the root terminates with `done` [2511.02424].

This execution style clarifies ReAcTree’s relation to prior methods. Relative to ReAct, ReAcTree still interleaves reasoning and acting, but only within subgoal-local contexts; it also introduces explicit control flow and subgoal-level retrieval. Relative to tree-search methods such as Tree-Planner, the distinction is that ReAcTree does not assume reversible simulators or rollback. Relative to behavior-tree systems in robotics, the control-flow vocabulary is similar, but the tree is dynamically constructed by the LLM at inference time rather than predefined. Relative to bi-level hierarchical planners, ReAcTree generalizes to a multi-level tree with agent and control-flow nodes.

The framework’s limitations are reported directly. Computational overhead is higher than for monolithic baselines. Gains may be model-dependent, although the improvement trend is broad across the evaluated LLMs. The working-memory mechanism is deliberately simple. Search under partial observability remains the main unresolved error source, and expansion itself can fail when the model proposes poor subgoal decompositions. The paper proposes future work on learning control-flow policies, adding hallucination mitigation and self-correction, improving memory with richer object/entity structure, introducing clarification dialogues, and optimizing branching, depth, and token budgeting.

Taken together, ReAcTree defines a particular form of hierarchical embodied planning: subgoal-local LLM agency, behavior tree control flow, and dual memory systems. Its empirical contribution is not merely that a tree structure helps, but that subgoal decomposition, fallback-style recovery, and memory separation materially improve long-horizon performance under partial observability.

Source: https://www.emergentmind.com/topics/reactree