Robot models are brittle outside their training data
Models scoring above 90% on the LIBERO benchmark dropped to 0% when objects, positions and instructions were perturbed.
We build RL environments that train frontier AI models to control robots by writing code. Each one is a simulated robot task, a code API, a hidden check that reads the true simulator state, and a reference program that passes.
second-nature.world
Scroll to descendCoding agents that control robots will matter whichever robot architecture wins. Robot foundation models are still brittle outside their training data, and improving them takes robot data collected on hardware. Coding agents turn robot control into a coding problem: write a program, simulate, revise, with no robot data. They are still weak at it, and they can be trained. We build the environments that train them.
Models scoring above 90% on the LIBERO benchmark dropped to 0% when objects, positions and instructions were perturbed.
On the Embodied First Exam, the best of eight coding agents solved 34% of 456 core tasks.
RL in simulation took a 7B model from 20% to 72% average success on three tasks. Its programs then reached 84% and 76% on a real arm with no further training.
Gemini Robotics ER 2 plans multi-step tasks and hands motor execution to a VLA that it calls as a tool.
A frontier model orchestrating a frozen VLA raised success on LIBERO-PRO from 12.8% to 53.3%, with no new training. The skills stayed fixed; the gain came from the layer above.
In EmbodiedSWE, a policy trained only on demonstrations generated from agent-written programs completed a real-robot task.
Judgment
A program decides what to do, in what order, whether it worked and how to recover.
# Sample a grasp pose for the green cube and pick it up
pick_pos, pick_quat = sample_grasp_pose("green cube")
goto_pose(pick_pos, pick_quat, z_approach=0.1)
close_gripper()
# Lift the green cube after grasping
post_pick_pos = pick_pos.copy()
post_pick_pos[0] -= 0.15
The skill API
Skills
The arm skills the API already has: read an object’s pose, sample a grasp, move the gripper, open and close it.
The checker grades the outcome, not the policy.
1Task
A simulated robot arm, a table, objects and an instruction. The API’s skills include get_object_pose, sample_grasp_pose, goto_pose, open_gripper and close_gripper.
“Gently place the red cube on top of the green cube and then open the gripper. Nothing should be dropped from a height.”
The instruction for cube restack.
2Program
The model writes a Python program against that API and gets one try. The program, not the model, drives the arm in simulation.
import numpy as np
# 1) Perceive both cubes first, while the arm is still clear of the scene.
# Positions are treated as bounding-box centers. Extents are full side lengths in the
# world frame, so the z-extent is each cube's height whatever its yaw.
red_pos, _, red_extent = get_object_pose("red cube", return_bbox_extent=True)
green_pos, _, green_extent = get_object_pose("green cube", return_bbox_extent=True)
red_pos = np.asarray(red_pos, dtype=float)
red_extent = np.asarray(red_extent, dtype=float)
green_pos = np.asarray(green_pos, dtype=float)
green_extent = np.asarray(green_extent, dtype=float)
# 2) Grasp the red cube. The sampled grasp quaternion is reused for every later move.
grasp_pos, grasp_quat = sample_grasp_pose("red cube")
grasp_pos = np.asarray(grasp_pos, dtype=float)
grasp_quat = np.asarray(grasp_quat, dtype=float)
open_gripper()
goto_pose(grasp_pos, grasp_quat, z_approach=0.1) # 10 cm above the grasp, then straight down
close_gripper()
# 3) Exact gripper pose that rests the red cube on the green cube.
# grasp_offset is where the gripper holds the cube: gripper position relative to the red
# cube's center at grasp time. The orientation never changes, so this offset stays fixed
# in the world frame and can be added back onto the cube's target center.
grasp_offset = grasp_pos - red_pos
green_top_z = green_pos[2] + green_extent[2] / 2.0 # top face of the green cube
red_stacked_z = green_top_z + red_extent[2] / 2.0 # red cube center with its bottom face on that top face
release_gap = 0.002 # 2 mm: set the cube down without pressing it into the green cube
place_pos = np.array([
green_pos[0] + grasp_offset[0], # red cube centered on the green cube in x
green_pos[1] + grasp_offset[1], # and in y
red_stacked_z + grasp_offset[2] + release_gap,
])
print(f"green top z: {green_top_z:.4f}, red center target z: {red_stacked_z:.4f}, gripper place position: {np.round(place_pos, 4)}")
# 4) Carry the cube across at a height where its bottom clears the green cube's top by ~10 cm.
transit_z = max(grasp_pos[2], place_pos[2]) + 0.10
goto_pose(np.array([grasp_pos[0], grasp_pos[1], transit_z]), grasp_quat) # lift straight up off the table
goto_pose(np.array([place_pos[0], place_pos[1], transit_z]), grasp_quat) # move to directly above the green cube
# 5) Lower onto the green cube (pause 2 cm above, then a short final descent) and release.
goto_pose(place_pos, grasp_quat, z_approach=0.02)
open_gripper()
Fable 5.2, seed 100.
3Episode
A hidden check reads the true simulator state. It grades the final world state and the whole episode’s history: contacts, drops, what touched what.
The run that program produced.
4Reward
Pass or fail becomes the reward a lab needs to post-train a model for robotics, and the check’s reasons say why a run failed.
The check for this task, part by part.
0 s12.3 s, the program ends
Height of each cube through the run above, in cm above where the red cube started, read from the simulator at every frame. The marker follows the video.
Each model wrote one program per seed, with no feedback and no retry. Run dates are UTC.
Two arms lift one pot together. All eight of GPT-6.2 Astra’s failures ran to the end with the pot not lifted.
GPT-6.2 Astra 2 of 10
Fable 5.2 1 of 10
Reference program 27 of 30
On every seed the green cube starts on top of the red one, and the instruction does not say so. Both models act on an assumed layout and do not check that one cube starts on the other.
GPT-6.2 Astra 0 of 10
Fable 5.2 0 of 10
Reference program 30 of 30
The first program fails on every seed because it never checks where the cubes start. Allowed to see its own output and try again, the model prints the cube positions and then solves the task, on 5 of 5 seeds. So the task is within the model’s reach, and the failure is one of judgment; it fails because it doesn’t look. Failures of first-try judgment are what these environments are for.
Attempt 1
Fail Not met: red centre above 4 cm, red touching green
Attempt 2
Fail Looked, didn’t move Not met: red centre above 4 cm, red touching green
Attempt 3
Pass
GPT-6.2 Astra 6 of 10
Fable 5.2 8 of 10
Reference program 29 of 30
All eight of Fable 5.2’s failures ran to the end with the nut not on the peg.
GPT-6.2 Astra 7 of 10
Fable 5.2 2 of 10
Reference program 30 of 30
GPT-6.2 Astra 8 of 10
Fable 5.2 10 of 10
Reference program 28 of 30
Making a task hard is easy, since a broken task is maximally hard. Making one that is hard for the right reason is the work.
Environments
A simulated robot task, a code API, a hidden check and a reference program that passes. Labs run their own model inside it. Made for post-training teams at frontier labs, who already buy coding and computer-use environments.
Pipeline
Every environment has to pass all six checks before we ship it.
1Valid
The scene loads and replays from its seed. A do-nothing program and every known-bad program fail.
2Not easy
Each model under test writes one program for each of 10 seeds. At least one model passes 5 or fewer.
3Solvable
A solver’s frozen program passes 27 of 30 seeds it never saw.
4Fair
The facts the solver had to discover go into the docs, and the 10 seeds rerun. The gap must remain.
5Ungameable
A breaker gets 10 attempts to pass without doing the task. A founder rules on any hit.
6Confirmed
100 seeds per model and 100 reference runs, on fresh seeds shared by all. The reference passes at least 90, and at least one model passes 50 or fewer.
Platform
Our platform makes it easier for robotic engineers to find where robots actually break. We put those failures into an environment for labs to train them away.
Two forms
Simulated tasks are for training at volume: they run on the lab’s own machines, thousands at a time. Next to them we are building a robot lab for proof: the same tasks on real arms that reset and score themselves, which a lab can reach remotely to see whether results from simulation hold on hardware.