Source-linked AI summary
HaReCAP: Habitual-action Grounding for Recursive Large Language Model Agents
Shen Liu, Zhenguo Xu, Shaopu Wang, Yike Gao, Chunlei Wang
TL;DR
ReCAP repeatedly invokes the LLM to ground leaf subtasks into exact valid actions, creating redundant cost in long-horizon tasks. HaReCAP distills frequent leaf decisions into abstainable one-step rules and reduces token consumption and LLM calls on commonly successful tasks while maintaining similar end-to-end success rates.
Problem
ReCAP repeatedly invokes the LLM to translate executable leaf subtasks into exact valid actions, creating repeated leaf-level grounding cost in long-horizon tasks.
Method
HaReCAP distills frequent leaf decisions from successful ReCAP trajectories into abstainable one-step rules that trigger only for uniquely matching legal actions, otherwise falling back to ReCAP.
Results
HaReCAP reduces token consumption and LLM calls on commonly successful tasks across Robotouille and ALFWorld while maintaining similar end-to-end success rates.
Takeaways & Limitations
HaReCAP provides a lightweight, auditable, low-intrusion path for improving the efficiency of long-horizon ReCAP-style LLM agents.
Takeaways & Limitations
Intermediate macro skills can fail under reversed object roles or changed layouts and may execute before their preconditions are satisfied.
Abstract
from arXiv · showhide
Long-horizon embodied tasks require LLM agents to iteratively decompose high-level goals, revise plans in response to environmental feedback, and ground leaf-level subgoals into valid executable actions. Recursive context-management methods such as ReCAP improve planning stability through multi-level task decomposition and parent-node refinement, but still repeatedly invoke the LLM at leaf nodes to ground atomic subtasks into exact valid actions. We refer to this final grounding step as last-mile grounding redundancy, which accumulates into substantial LLM-call and token overhead during long-horizon execution. To mitigate this issue, we propose HaReCAP (Habitual-action Grounded ReCAP), a low-intrusion leaf grounding extension for ReCAP. HaReCAP extracts frequent leaf decisions from successful trajectories and compiles them offline into auditable and abstainable one-step leaf-reflex rules. At runtime, it skips the leaf LLM call only when a rule can uniquely determine a legal action in the current valid-action set; otherwise, it falls back to the original ReCAP. This design avoids repeatedly carrying the full recursive context into the LLM for routine leaf action grounding, while preserving the original recursive control flow. We evaluate HaReCAP on Robotouille and ALFWorld with Qwen3.5-27B as the main model. On tasks solved by both ReCAP and HaReCAP, HaReCAP reduces token consumption by 14.67%, 17.93%, and 20.08% on Robotouille synchronous, Robotouille asynchronous, and ALFWorld, respectively. The results show that HaReCAP can serve as a low-intrusion extension to ReCAP-style recursive context-management frameworks, reducing last-mile grounding redundancy across environments and models on commonly successful trajectories.
1 Introduction
HaReCAP addresses ReCAP’s last-mile grounding redundancy by distilling frequent successful leaf decisions into conservative, abstainable one-step rules. It preserves recursive planning and falls back to ReCAP whenever a rule cannot uniquely produce a legal current action.
- Problem: ReCAP still invokes the LLM at every leaf to translate natural-language subtasks into exact actions in the current valid-action set.This repeated grounding remains an independently optimizable inference cost.
- Design rationale: Unlike mid-level macro skills, HaReCAP distills only final leaf action grounding, avoiding risks from object binding, progress estimation, termination, and direction-sensitive actions.Macro skills can also disrupt ReCAP’s recursive decomposition, backtracking refinement, and failure-handling logic.
- Contribution and evaluation: HaReCAP preserves ReCAP’s recursive task tree, planning, backtracking, refinement, and failure handling while moving routine leaf grounding out of LLM calls.The mechanism is evaluated on Robotouille and ALFWorld, with efficiency assessed separately from end-to-end performance on commonly solved trajectories.
- Method: HaReCAP builds an offline leaf-reflex library from successful ReCAP trajectories, mapping canonical leaf tasks to canonical one-step action templates.The library is not updated online.
- Runtime control: At runtime, HaReCAP executes a library rule only when it uniquely instantiates a legal action from the current valid-action set; otherwise, it fully falls back to ReCAP.This conservative trigger makes the integration low-intrusion and aligned with ReCAP’s original control flow.
2 Related Work
Prior work improves interactive planning through explicit reasoning, environment feedback, recursive context organization, retrieval, memory, and skill reuse. These approaches address consistency, context growth, and repeated exploration from complementary directions.
- Interactive planning: ReAct interleaves reasoning and acting to adapt subsequent actions from environment feedback, whereas Chain-of-Thought, Tree-of-Thoughts, and Graph-of-Thoughts mainly target static or weakly interactive problems.These methods improve complex problem solving through explicit reasoning or search structures.
- Context management: ReCAP organizes long-horizon histories with a recursive task tree containing parent tasks, active subtasks, and backtracking relations.External-memory and graph-based methods instead address context limits by organizing retrievable knowledge or explicitly structuring state and action information.
- Memory and skill reuse: Reflexion, Generative Agents, MemGPT, Voyager, and embodied experience retrieval reduce repeated exploration through verbal feedback, long-term memory, skill libraries, historical trajectories, or action guidance.The passage notes that larger skill granularity increases the need for additional decision-making about skill use.
3 Method
HaReCAP adds a conservative habitual-action grounding module before ReCAP’s leaf LLM call, using offline one-step rules extracted from successful trajectories. It executes a rule only when it uniquely identifies a legal current action; otherwise, it abstains and preserves ReCAP’s original recursive control flow.
- 3 Method: HaReCAP inserts habitual-action grounding before ReCAP’s leaf LLM call to reduce repeated last-mile action-grounding cost.The module operates on the current leaf task and valid-action set rather than replacing ReCAP’s recursive planning process.
- 3 Method: A rule hit executes immediately only when it yields a unique valid action; conflicting candidates trigger abstention when the top score is less than 1 above the runner-up.Rules with multiple valid actions are treated as state ambiguity, while support-derived scores provide weak ranking and higher-support rules are preferred.
- 3 Method: The leaf-reflex library stores canonicalized one-step leaf task–action mappings extracted only from successful ReCAP executions.It excludes complete trajectories, parent subtrees, multi-action windows, and overly abstract leaf tasks without explicit object identifiers.
- 3 Method: At runtime, the module checks historical rules against the current leaf task and valid-action set without generating new actions.Rules are considered only when the leaf task has a non-empty canonical key and explicit object identifiers, and candidate actions are already legal.
- 3 Method: After a reflex hit, HaReCAP preserves ReCAP’s recursive state transition and returns control to parent-node refinement after environment interaction.When triggering abstains, the original ReCAP leaf LLM and its failure-handling or backtracking mechanism remain available.
4 Experiments
Experiments evaluate HaReCAP with Qwen3.5-27B on Robotouille and across models on ALFWorld, measuring success and reasoning cost. HaReCAP preserves performance near ReCAP while reducing token consumption and LLM calls on commonly successful tasks.
- Experimental setup: The main Robotouille library contains 329 canonical leaf-reflex rules extracted offline from 121 successful ReCAP trajectories, with support thresholds of 1, 2, and 4.Experiments use Qwen3.5-27B and evaluate success rate, support-threshold sensitivity, and paired-success reasoning cost.
- Robotouille results: HaReCAP remains in a similar success-rate range to ReCAP on Robotouille’s synchronous and asynchronous splits, unlike CoT and ReAct, which perform substantially worse.This indicates that replacing leaf-level grounding does not disrupt ReCAP’s high-level recursive control.
- Robotouille results: 14.67% and 17.93%: support=2 reduces token consumption on Robotouille synchronous and asynchronous both-success tasks, respectively, relative to ReCAP.All three support thresholds reduce token consumption under the paired-success condition, with support=2 achieving the largest reduction.
- ALFWorld results: On ALFWorld with Qwen3.5-27B, HaReCAP maintains a success rate close to ReCAP while reducing all-task average tokens by 20.7%.Qwen3.5-9B and Gemma4-26B also show comparable or higher success counts while reducing average tokens and LLM calls.
- ALFWorld results: 20.08%, 14.21%, and 21.09%: HaReCAP reduces average total tokens on ALFWorld both-success tasks for Qwen3.5-27B, Qwen3.5-9B, and Gemma4-26B, respectively.HaReCAP reduces average total tokens and LLM calls for all three model settings.
- Cross-model results: Additional Robotouille cross-model results show no systematic success collapse from HaReCAP, while Gemma4-26B exhibits clear reductions in LLM calls and token consumption on both-success tasks.The evidence extends efficiency results beyond the main Qwen3.5-27B setting.
5 Conclusion
HaReCAP extends ReCAP with auditable leaf-reflex rules that ground routine actions without repeated leaf-level LLM calls. Experiments on Robotouille and ALFWorld show reduced token consumption and LLM calls on commonly successful tasks through a lightweight, low-intrusion approach.
- Method: HaReCAP distills frequent leaf decisions from successful trajectories into leaf-reflex rules for ReCAP-style recursive LLM agents.The method targets leaf-level action grounding while preserving the recursive framework.
- Runtime grounding: At execution time, HaReCAP triggers an action only when a rule uniquely matches the current valid-action set.This condition makes the rule-based action selection auditable and constrained by currently valid actions.
- Runtime grounding: When no rule uniquely matches, HaReCAP falls back to the original ReCAP.The fallback preserves the original recursive control flow for cases that cannot be resolved by a leaf-reflex rule.
- Evaluation: Experiments on Robotouille and ALFWorld show reduced token consumption and LLM calls on commonly successful tasks.The reported efficiency gains concern tasks commonly solved successfully by the evaluated systems.
- Conclusion: HaReCAP provides a lightweight, auditable, and low-intrusion path for improving long-horizon LLM-agent efficiency.This characterizes the method’s intended deployment profile without changing the recursive agent framework.