ReCode: Unify Plan and Action for Universal Granularity Control
Not on the map. Why?
Abstract (arXiv)
Real-world tasks require decisions at varying granularities, and humans excel at this by leveraging a unified cognitive representation where planning is fundamentally understood as a high-level form of action. However, current Large Language Model (LLM)-based agents lack this crucial capability to operate fluidly across decision granularities. This limitation stems from existing paradigms that enforce a rigid separation between high-level planning and low-level action, which impairs dynamic adaptability and limits generalization. We propose ReCode (Recursive Code Generation), a novel paradigm that addresses this limitation by unifying planning and action within a single code representation. In this representation, ReCode treats high-level plans as abstract placeholder functions, which the agent then recursively decomposes into finer-grained sub-functions until reaching primitive actions. This recursive approach dissolves the rigid boundary between plan and action, enabling the agent to dynamically control its decision granularity. Furthermore, the recursive structure inherently generates rich, multi-granularity training data, enabling models to learn hierarchical decision-making processes. Extensive experiments show ReCode significantly surpasses advanced baselines in inference performance and demonstrates exceptional data efficiency in training, validating our core insight that unifying planning and action through recursive code generation is a powerful and effective approach to achieving universal granularity control. The code is available at https://github.com/FoundationAgents/ReCode.
Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 44 of its 50 references that are in the map. First posted on arXiv 27 Oct 2025.
Builds on
44 of 50 references.
References · 44
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2024Qwen2.5 Technical Reportcited by 4,713
- 2024GPT-4o System Cardcited by 4,467
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
- 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,655
- 2022Do As I Can, Not As I Say: Grounding Language in Robotic Affordancescited by 2,302
- 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 1,980
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,906
- 2023Improving Factuality and Reasoning in Language Models through Multiagent Debatecited by 1,739
- 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,197
- 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,172
32 more
- 2020ALFWorld: Aligning Text and Embodied Environments for Interactive Learningcited by 1,143
- 2022Inner Monologue: Embodied Reasoning through Planning with Language Modelscited by 1,057
- 2022STaR: Bootstrapping Reasoning With Reasoningcited by 895
- 2019ALFRED: A Benchmark for Interpreting Grounded Instructions for Everyday Taskscited by 773
- 2023RLAIF vs. RLHF: Scaling Reinforcement Learning from Human Feedback with AI Feedbackcited by 615
- 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Modelscited by 550
- 2024Executable Code Actions Elicit Better LLM Agentscited by 537
- 2024AFlow: Automating Agentic Workflow Generationcited by 395
- 2022ScienceWorld: Is your Agent Smarter than a 5th Grader?cited by 298
- 2023Auto-GPT for Online Decision Making: Benchmarks and Additional Opinionscited by 250
- 2023InterCode: Standardizing and Benchmarking Interactive Coding with Execution Feedbackcited by 229
- 2024ManiSkill3: GPU Parallelized Robotics Simulation and Rendering for Generalizable Embodied AIcited by 216
- 2024Trial and Error: Exploration-Based Trajectory Optimization for LLM Agentscited by 194
- 2023ART: Automatic multi-step reasoning and tool-use for large language modelscited by 193
- 2023AdaPlanner: Adaptive Planning from Feedback with Language Modelscited by 193
- 2023ADaPT: As-Needed Decomposition and Planning with Language Modelscited by 172
- 2025OWL: Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automationcited by 129
- 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systemscited by 125
- 2024RAP: Retrieval-Augmented Planning with Contextual Memory for Multimodal LLM Agentscited by 80
- 2023Corex: Pushing the Boundaries of Complex Reasoning through Multi-Model Collaborationcited by 70
- 2024Agent Planning with World Knowledge Modelcited by 66
- 2023PEARL: Prompting Large Language Models to Plan and Execute Actions Over Long Documentscited by 61
- 2024RoboCodeX: Multimodal Code Generation for Robotic Behavior Synthesiscited by 55
- 2024Learning From Failure: Integrating Negative Examples when Fine-tuning Large Language Models as Agentscited by 49
- 2023Demo2Code: From Summarizing Demonstrations to Synthesizing Code via Extended Chain-of-Thoughtcited by 39
- 2025MPO: Boosting LLM Agents with Meta Plan Optimizationcited by 36
- 2024THREAD: Thinking Deeper with Recursive Spawningcited by 24
- 2024ReAct Meets ActRe: When Language Agents Enjoy Training Data Autonomycited by 22
- 2025SAND: Boosting LLM Agents with Self-Taught Action Deliberationcited by 14
- 2025Towards Reliable Code-as-Policies: A Neuro-Symbolic Framework for Embodied Task Planningcited by 10
- 2025PGPO: Enhancing Agent Reasoning via Pseudocode-style Planning Guided Preference Optimizationcited by 8
- 2024Interactive and Expressive Code-Augmented Planning with Large Language Modelscited by 6
Built on by
Citing papers per year: 2025: 2; 2026: 12.
14 papers.
Sort:
By area:
- 2025Reasoning via Video: The First Evaluation of Video Models' Reasoning Abilities through Maze-Solving Taskscited by 22
- 2025AutoEnv: Automated Environments for Measuring Cross-Environment Agent Learningcited by 18
- 2026Beyond Entangled Planning: Task-Decoupled Planning for Long-Horizon Agentscited by 9
- 2026Select-then-Solve: Paradigm Routing as Inference-Time Optimization for LLM Agentscited by 5
- 2026CodeDelegator: Mitigating Context Pollution via Role Separation in Code-as-Action Agentscited by 4
- 2026MM-WebAgent: A Hierarchical Multimodal Web Agent for Webpage Generationcited by 3
- 2026Language-based Trial and Error Falls Behind in the Era of Experiencecited by 1
- 2026SpecEyes: Accelerating Agentic Multimodal LLMs via Speculative Perception and Planningcited by 1
- 2026ReTool-Video: Recursive Tool-Using Video Agents with Meta-Augmented Tool Groundingcited by 1
- 2026HyperTool: Beyond Step-Wise Tool Calls for Tool-Augmented Agentscited by 1
- 2026FlowArk: Boosting Agentic Data-flow Analysis for Android Apps via Context-Aware Knowledge Reusecited by 0
- 2026Toward Effective and Reliable LLM Agents via Dynamic Ontologycited by 0
- 2026ControlScope: Workflow Revision and Reliability in LLM Agents28 Sep 2026
- 2026Act More, Decide Less: Skill-Guided Adaptive Action Chunking for Long-Horizon LLM Agents2 Sep 2026
- 2026Toward Effective and Reliable LLM Agents via Dynamic Ontology24 Aug 2026
- 2026FlowArk: Boosting Agentic Data-flow Analysis for Android Apps via Context-Aware Knowledge Reuse13 Jul 2026
- 2026HyperTool: Beyond Step-Wise Tool Calls for Tool-Augmented Agents11 Jun 2026
- 2026ReTool-Video: Recursive Tool-Using Video Agents with Meta-Augmented Tool Grounding13 May 2026
- 2026MM-WebAgent: A Hierarchical Multimodal Web Agent for Webpage Generation16 Apr 2026
- 2026Select-then-Solve: Paradigm Routing as Inference-Time Optimization for LLM Agents8 Apr 2026
- 2026SpecEyes: Accelerating Agentic Multimodal LLMs via Speculative Perception and Planning24 Mar 2026
- 2026Language-based Trial and Error Falls Behind in the Era of Experience29 Jan 2026
- 2026CodeDelegator: Mitigating Context Pollution via Role Separation in Code-as-Action Agents21 Jan 2026
- 2026Beyond Entangled Planning: Task-Decoupled Planning for Long-Horizon Agents12 Jan 2026
- 2025AutoEnv: Automated Environments for Measuring Cross-Environment Agent Learningcited by 18
- 2026Beyond Entangled Planning: Task-Decoupled Planning for Long-Horizon Agentscited by 9
- 2026Select-then-Solve: Paradigm Routing as Inference-Time Optimization for LLM Agentscited by 5
- 2026CodeDelegator: Mitigating Context Pollution via Role Separation in Code-as-Action Agentscited by 4
- 2026MM-WebAgent: A Hierarchical Multimodal Web Agent for Webpage Generationcited by 3
- 2026Language-based Trial and Error Falls Behind in the Era of Experiencecited by 1
- 2026FlowArk: Boosting Agentic Data-flow Analysis for Android Apps via Context-Aware Knowledge Reusecited by 0
- 2026Toward Effective and Reliable LLM Agents via Dynamic Ontologycited by 0
- 2026Act More, Decide Less: Skill-Guided Adaptive Action Chunking for Long-Horizon LLM Agentscited by 0
- 2026ControlScope: Workflow Revision and Reliability in LLM Agentscited by 0
- 2026ControlScope: Workflow Revision and Reliability in LLM Agents28 Sep 2026
- 2026Act More, Decide Less: Skill-Guided Adaptive Action Chunking for Long-Horizon LLM Agents2 Sep 2026
- 2026Toward Effective and Reliable LLM Agents via Dynamic Ontology24 Aug 2026
- 2026FlowArk: Boosting Agentic Data-flow Analysis for Android Apps via Context-Aware Knowledge Reuse13 Jul 2026
- 2026MM-WebAgent: A Hierarchical Multimodal Web Agent for Webpage Generation16 Apr 2026
- 2026Select-then-Solve: Paradigm Routing as Inference-Time Optimization for LLM Agents8 Apr 2026
- 2026Language-based Trial and Error Falls Behind in the Era of Experience29 Jan 2026
- 2026CodeDelegator: Mitigating Context Pollution via Role Separation in Code-as-Action Agents21 Jan 2026
- 2026Beyond Entangled Planning: Task-Decoupled Planning for Long-Horizon Agents12 Jan 2026
- 2025AutoEnv: Automated Environments for Measuring Cross-Environment Agent Learning24 Nov 2025
- 2025Reasoning via Video: The First Evaluation of Video Models' Reasoning Abilities through Maze-Solving Taskscited by 22
- 2026SpecEyes: Accelerating Agentic Multimodal LLMs via Speculative Perception and Planningcited by 1
- 2026ReTool-Video: Recursive Tool-Using Video Agents with Meta-Augmented Tool Groundingcited by 1
- 2026HyperTool: Beyond Step-Wise Tool Calls for Tool-Augmented Agentscited by 1
- 2026HyperTool: Beyond Step-Wise Tool Calls for Tool-Augmented Agents11 Jun 2026
- 2026ReTool-Video: Recursive Tool-Using Video Agents with Meta-Augmented Tool Grounding13 May 2026
- 2026SpecEyes: Accelerating Agentic Multimodal LLMs via Speculative Perception and Planning24 Mar 2026
- 2025Reasoning via Video: The First Evaluation of Video Models' Reasoning Abilities through Maze-Solving Tasks19 Nov 2025