Recent advances in frontier models have pushed the boundaries of agentic robot control, enabling agents to perform complex robotic tasks through reasoning and interaction. However, repeated calls to these models during execution can substantially increase task completion time. Code as Policies (CaP) offers a route for coding agents to acquire physical skills through experience and retain them in executable programs, allowing the reasoning invested in development to be reused across runs. Developing reliable code policies while limiting the cost of physical experimentation remains a central challenge. We investigate human guidance as a source of priors for feasible actions and simulation as an auxiliary environment for exploring and testing candidate policies. Our findings favor robot demonstrations available on request and simulation used selectively during real-world policy refinement. These findings inform ACE-CaP-0, an agentic recipe that couples policy revision with experience acquisition through Demonstrations on Request and Simulation on Demand. Across eight real-world manipulation tasks spanning alignment, multi-object handling, and bimanual coordination, the resulting frozen programs achieve 92.1% success (221/240 trials). Mean execution times across tasks range from 0.97 to 2.27 minutes. The programs execute with runtime perception and control, without a human or coding agent in the loop. These results highlight CaP's potential to turn experience into reliable, reusable physical skills.
Figures & tables
Figure 1: ACE-CaP-0: from targeted experience to standalone robot execution. Left: a coding agent refines policies on the robot, requesting robot demonstrations and using simulation as needed. Right: eight manipulation tasks, with each panel reporting the success rate and mean physical execution time in minutes. Each frozen policy is evaluated in 30 trials and executes with runtime perception and control, without a human or coding agent in the loop.
Figure 2: Guidance form for charger insertion. Top: textual guidance, robot-egocentric human video, and robot demonstrations, all available on request during real-only development. Both demonstration conditions also include textual guidance. Bottom: final success rate over 30 real-world trials of each frozen program, development time, and output token usage. Robot Demonstrations is the shared reference in Figures 3 and 4 .
Figure 3: Guidance timing for charger insertion. Textual guidance and robot demonstrations are provided upfront or requested during real-only development. The lower panels report final success rate over 30 real-world trials of each frozen program, development time, and output token usage. On-Request Guidance shares the Robot Demonstrations condition and results from Figure 2 .
Figure 4: Simulation protocols and charger-insertion results. Top: (a) Real-Only uses physical feedback; (b) Sequential Real-Sim-Real uses ten simulation rounds before transfer, each ending with a joint reset of four parallel environments; (c) Simulation on Demand makes simulated experiments available within real-world development. Bottom: final success rate over 30 real-world trials of each frozen program, development time, and output token usage. Real-Only is the shared reference from Figures 2 and 3 .
Figure 5: ACE-CaP-0: from policy development to standalone execution. (a) The coding agent writes and revises an executable policy using real-world feedback, with a shared robot toolbox that supports both policy execution and direct exploration by the agent. Throughout development, the agent can request kinesthetic demonstrations that provide video, arm trajectories, and key joint poses, or test candidate code in simulation for a chosen task segment and initial state. (b) The resulting code policy is frozen and executes through the robot’s interfaces without a human or coding agent in the loop. Section 4 evaluates these frozen policies without further updates.
Figure 6: Real-world evaluation platform and tasks. Left: the dual-arm platform with one top-down camera and two wrist-mounted cameras. Right: representative scenes for the eight tasks, covering alignment, object reorientation, multi-object handling, and bimanual coordination.
Figure 7: Real-world manipulation with the code policies developed by ACE-CaP-0. Each panel shows a task image and the success rate over 30 evaluation trials, with the successful trial count alongside it. Selected panels include end-state insets.
Task
Task objective
Success rate
Mean time (min)
Output token usage (M)
Charger Insertion
Insert a charger plug into a socket.
100.0% (30/30)
1.65
1.09
Bread Packing
Pack bread bags into a cardboard box.
83.3% (25/30)
1.93
2.14
Bottle Uncapping
Stabilize a bottle and remove its cap.
90.0% (27/30)
2.23
1.17
Cup Nesting
Insert multiple cups into one another.
93.3% (28/30)
1.58
0.95
Flower Insertion
Insert flower stems into a vase.
90.0% (27/30)
1.37
0.92
Chicken Plating
Plate the scattered chicken pieces.
96.7% (29/30)
1.12
0.75
Table 1: Task objectives, execution performance, and output token usage. Each frozen program is evaluated in 30 trials; parentheses give successful and total trial counts. Time denotes mean physical execution time in minutes. Output token usage is the cumulative output across all model calls during development, in millions (M).