NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

RegHarness: Regulating What Code-as-Policy Agents Keep from Steps to Skills

Shengming Liu, Yunyi Gao, Xinyi Wang, Jianyong Sun, Shuai Wang, Yi Deng, Li Chenye, Mingcai Zhou, Sim Kuan GoharXiv 2026

TL;DR

Giving a robot a language model to write its control code is like hiring a brilliant, forgetful intern: when a multi-step plan fails, they tend to rewrite the good parts along with the bad, and they never fix broken tools in their toolbox. RegHarness solves this by adding strict version control at two timescales—locking in verified physical steps during a task, and systematically upgrading the underlying skill library between runs. As a result, a cheap LLM jumps from a 39.4% to an 87.8% success rate on complex robotic manipulation benchmarks, without needing human demonstrations or massive vision-language-action models.

What Problem Does This Paper Address?

In Code-as-Policy robotics, an LLM acts as the robot's brain by writing Python programs that call perception and motion APIs. If the robot knocks a bowl off a cabinet instead of picking it up, the LLM reads the execution logs and writes a new program to try again.

The catch is a lack of persistence governance—deciding what to keep and what to throw away. Existing agent teams (like the baseline system, RATs) suffer at two levels:

  1. Within a trial: When step 4 of a 5-step program fails, the agent writes a brand-new script from scratch. Even when prompted to keep what worked, RATs accidentally alters previously successful code in 86% of its retries. Conversely, native stepwise modes sometimes force-commit broken steps just to move the plan forward.
  2. Between runs: If the underlying grasp() skill struggles with non-flat objects, no amount of clever in-trial replanning will reliably fix it. The shared codebase itself needs to evolve safely across episodes.
Figure 1. RATs fails this trial in all six attempts; run-time governance and RegHarness both solve it. RATs [26], run with our low-cost model, writes six programs; none lifts the bowl. With the released skills, run-time governance (+ Harness) replans after a grasp knocks the bowl off the cabinet and succeeds on its third plan; RegHarness succeeds on its first. Blue marks a reset scene with the committed steps replayed; orange borders mark rejected executions (for RATs, failed task checks), green ones commits, and row-end marks show the task check. Right: success of all five configurations on the 180 paired trials, with gray bars for the RATs loop, purple bars for run-time governance and dark bars for the refined skills, and of RegHarness on its 300.

Methods

RegHarness wraps around the existing RATs agent team (planner, coder, and verifier) using a single low-cost model (deepseek-flash) at runtime, regulating persistence at two distinct timescales:

  • Within a trial (Run-Time Governance): Instead of running whole programs, RegHarness tests one step at a time using reset-and-replay in simulation—resetting the scene and replaying already-committed code so failed experiments don't leave the room in a mess. Because resetting the simulator erases physical evidence of what went wrong, a task-long LLM auditor maintains a continuous conversation across the trial to inspect plans, code drafts, and camera frames. Finally, a deterministic fixed-rule controller acts as a strict gatekeeper: a step is committed only if execution succeeds, the native verifier passes it (backed by a physical gripper-width check), and the auditor approves.
  • Between runs (Skill Refinement): Offline, a frontier coding agent (Claude Opus 5.5) inspects failure logs and video frames from development trials to patch skills, perception primitives, and planning rules. Crucially, every proposed fix is packaged behind a default-off feature switch that must pass unit tests, byte-for-byte equivalence checks (when off), and a simulator data-leakage audit before human authors manually review and enable it.
Figure 2. RegHarness regulates what persists within a trial and between runs. (a) The auditor audits plans ➊, drafts ➋, step tests ➌and finished plans that fail the task check ➍. Each step test resets the scene and replays the committed steps on the executor of RATs’ stepwise mode. The controller commits a step only if the verifier passes it and the auditor proposes commit. (b) The coding agent (Claude Opus 5.5) turns failures into default-off switches that the authors enable.

Datasets

RegHarness requires no training demonstrations. It is evaluated on:

  • LIBERO-PRO: 60 manipulation tasks across Object, Goal, and Spatial suites featuring position and task perturbations (180 paired trials across initial states 0–2, extended to 300 trials across states 0–4). State 0 served as the development set for debugging; states 1–4 were held-out test states.
  • MolmoSpaces: A 40-scene benchmark covering opening, closing, picking, and pick-and-place tasks (200 trials over 5 repeats).
  • Real-World Hardware: 45 trials across three tabletop manipulation tasks (e.g., swapping cubes, placing cream cheese on a bowl) using a 7-DoF Kinova Gen3 arm and a fixed RGB-D camera.

Key Insights and Ideas

  • Resetting without governance backfires: Simply testing steps from a reset scene isn't enough. RATs' built-in stepwise replay mode actually drops performance from 39.4% to 25.6% because it commits steps on a single verifier's say-so—and force-commits unverified steps (46% of all commits!) once retries run out. Strict commit gates are essential.
  • Better tools beat better micromanagement: A $2\times2$ ablation reveals an uneven split in where the magic happens. While run-time governance alone lifts success from 71 to 105 trials, upgrading the shared skill library alone vaults the baseline RATs loop from 71 to 135 successes. When running cheap LLMs, refining the reusable API skills matters even more than policing execution.
  • Better skills make trials cheaper: While adding an auditor increases average per-trial LLM API cost (from ~$0.23 to ~$0.32), refined skills dramatically cut wasted retries—bringing the cost per successful task down from $0.57 (baseline RATs) to $0.37 (RegHarness), and $0.21 for RATs with refined skills alone.

Key Results

  • LIBERO-PRO: RegHarness achieves 87.8% (158/180) on paired trials, more than doubling baseline RATs (39.4%, 71/180), and maintains 86.7% (260/300) across all five initial states. On held-out test states 1 and 2, RegHarness solves 104/120 trials versus 49 for RATs.
  • MolmoSpaces: Solves 72.0% (144/200) of trials (in-sample scenes), up from a first-port baseline of 15/40.
  • Real Robot: Solves 28/45 trials compared to 21/45 for RATs ($p = 0.20$, a preliminary feasibility check).
  • Remaining bottlenecks: Out of 40 failures across 300 LIBERO-PRO trials, 36 came down to visual/semantic confusion (picking the wrong object or misreading instructions) or physical geometry limits (grasping flat plates or reaching a low cabinet handle).

Limitations and Future Work

  • Simulation-bound resets: Reset-and-replay requires software-resettable scenes. On the real robot, steps had to continue from the physical state left behind (with occasional manual human resets). The authors plan to replace simulator resets with learned autonomous recovery skills.
  • Human-in-the-loop and development exposure: Unlike fully automated self-evolving harnesses, between-run switches are manually selected by the authors without an automated statistical acceptance gate. Furthermore, because initial state 0 was used to diagnose failures and represents one-third of the 180 paired trials (and all MolmoSpaces scenes were seen during refinement), the skill-refinement gains on paired trials represent an upper estimate. Future work will test the frozen codebase on completely untouched initial states (states 5–9).

Summary updated

BibTeX
@misc{liu2026regharness,
  author = {Shengming Liu and Yunyi Gao and Xinyi Wang and Jianyong Sun and Shuai Wang and Yi Deng and Li Chenye and Mingcai Zhou and Sim Kuan Goh},
  title = {{RegHarness: Regulating What Code-as-Policy Agents Keep from Steps to Skills}},
  year = {2026},
  eprint = {2611.33739},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33739},
}
Figure