HyCodePolicy: Hybrid Language Controllers for Multimodal Monitoring and Decision in Embodied Agents

Yibin Liu, Zhixuan Liang, Zanxin Chen, Tianxing Chen, Mengkang Hu, Wanxi Dong, Congsheng Xu, Zhaoming Han, Yusen Qin, Yao MuarXiv 2025 · DOI

Abstract

HyCodePolicy is a closed-loop framework that enables embodied agents to autonomously generate, monitor, and repair their own code-based manipulation policies. By fusing symbolic execution logs with visual feedback from Vision-Language Models (VLMs), the system can diagnose the root causes of failures and iteratively refine its code. This approach addresses the limitations of "one-shot" code generation in robotics, which often fails due to physical uncertainties. Experimental results on the RoboTwin 1.0 and Bi2Code benchmarks demonstrate that HyCodePolicy significantly boosts success rates and robustness in complex bimanual tasks.

Introduction

The "Code as Policies" (CaP) paradigm, where Large Language Models (LLMs) generate executable Python code to control robots, has shown promise for high-level task planning. However, real-world robotics is inherently uncertain; sensor noise or physical slips can cause execution failures that one-shot systems cannot detect or correct. Bridging the gap between high-level semantic reasoning and physical execution remains a major hurdle for truly autonomous agents. HyCodePolicy addresses this by treating generated code as an evolving hypothesis rather than a final product, introducing a feedback loop for self-correction.

Methods

The HyCodePolicy framework consists of four main phases designed to create a self-aware control loop:

  1. Grounding & Synthesis: Natural language instructions (e.g., "Handover the block") are decomposed into sub-goals and translated into code using a library of Geometric Operation Primitives to ensure physical grounding.
  2. Simulated Execution & Symbolic Logging: The program is executed in a simulator, generating structured symbolic logs that track events like "Left grasp failure" or "Unexecutable code."
  3. Concurrent Multimodal Observation: The system strategically inserts "observation hooks" into the code. A VLM monitors these checkpoints to verify if sub-goals were met visually, providing a semantic layer of verification.
  4. Hybrid Failure Attribution & Repair: If a failure occurs, the system fuses the symbolic logs (the "what") with the VLM’s perceptual diagnostics (the "why"). This dual feedback allows the LLM to pinpoint the error and apply a targeted code repair.
The HyCodePolicy architecture integrates a Code Agent for synthesis, a Task Executor for symbolic logging, and a VLM Agent for visual monitoring and repair.

Key Insights

  • Code-as-Monitor: By embedding its own checkpoints, the policy becomes self-aware and capable of detecting its own failures.
  • Hybrid Feedback: Fusing symbolic logs with visual feedback provides a much richer signal for the repair agent than either modality alone, catching both logic bugs and semantic misalignments.
  • Policy Evolvability: The system mimics human debugging by restructuring programs based on empirical failure, enabling the policy to evolve during execution.

Evaluation and Results

The researchers evaluated their framework using RoboTwin 1.0 and a newly introduced modular interface, Bi2Code, which extends task coverage to 50 distinct manipulation tasks. The experiments demonstrated that HyCodePolicy consistently outperforms one-shot baselines across multiple metrics.

On the RoboTwin 1.0 benchmark, the Average Success Rate (ASR) improved from 47.4% (baseline) to 63.9%. On the more optimized Bi2Code interface, it reached 71.3%. Furthermore, the system reduced the mean number of repair iterations needed to succeed from 2.42 to 1.76, indicating more intelligent and efficient debugging. The Bi2Code interface also allowed for significantly more concise code while maintaining higher structural similarity to human-written expert code.

Success rate distributions across different benchmarks show that HyCodePolicy (HCP) provides superior performance and robustness compared to Code as Policies (CaP) and Code Action (CAct) baselines.

Conclusion and Future Work

HyCodePolicy represents a significant step toward autonomous robotic agents by shifting the perspective from code as a static execution medium to code as a vehicle for self-monitoring. While the system excels at rigid-body manipulation, challenges remain in handling non-rigid objects and complex articulated motions (like opening a microwave), where current APIs lack fine-grained control. Future work will focus on enhancing the agent's ability to reason over longer time horizons and integrating external knowledge to handle more specialized robotic skills.

Summary updated

BibTeX
@misc{liu2025hycodepolicy,
  author = {Yibin Liu and Zhixuan Liang and Zanxin Chen and Tianxing Chen and Mengkang Hu and Wanxi Dong and Congsheng Xu and Zhaoming Han and Yusen Qin and Yao Mu},
  title = {{HyCodePolicy: Hybrid Language Controllers for Multimodal Monitoring and Decision in Embodied Agents}},
  year = {2025},
  eprint = {2508.02629},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.02629},
}
Figure