# Coding Agents with Harness for Safe Robot Control

Robotics.world

> Coding agents have become a strong recipe for robot manipulation: a language model writes the controller as a program, and the program transfers across tasks without robot-specific training.

**arXiv**: 2609.20822 · Preprint · not peer-reviewed

**Published**: 2026-09-17 · revised · 2026-10-02

**Authors**: Bingxin Xu, Yuzhang Shang, Zhen Dong, Emilio Ferrara

## In plain words

Coding agents have become a strong recipe for robot manipulation: a language model writes the controller as a program, and the program transfers across tasks without robot-specific training. Prior work scores these agents only on whether the goal was reached, never on what the robot touched along the way.

## AI summary

## Overview

**Research area:** Robotics — robot manipulation, safe control, and LLM-based coding agents (embodied AI).

**Technical level:** Advanced. The core idea is intuitive, but the paper assumes familiarity with vision-language-action (VLA) models, coding agents, motion planning, and benchmark evaluation protocols.

**Scope:** This paper asks whether coding agents — language models that write robot controllers as programs — can complete manipulation tasks without touching a designated obstacle, and introduces SafeHarness, a two-part harness that enforces obstacle avoidance during route planning and contact execution.

## What This Paper Is About

Coding agents have become a strong recipe for robot manipulation: a language model writes the controller as a program, and the program transfers across tasks without robot-specific training. Prior work scores these agents only on whether the goal was reached, never on what the robot touched along the way. This paper evaluates coding agents under a safety constraint — each task pairs a manipulation goal with an obstacle the robot must not touch — finds that agents collide in most cases despite correctly recognizing the obstacle, and proposes SafeHarness to make safety a first-class objective alongside task completion.

## Key Contributions

1. **A safety evaluation of coding agents for robot control.** The authors study coding agents under a requirement they had not been scored on: finishing the task while respecting a safety constraint. They state this is the first coding agent for manipulation whose harness itself enforces safety, including during contact-rich phases, and the first evaluated on a collision-scored manipulation benchmark.
2. **Obstacle-aware route planning.** Objects are grounded as bounding boxes, routes are drawn as sequences of waypoints, and the agent plans a route in advance, verifies it outside the language model, replans when it is rejected or when execution stalls, and only then executes the verified path.
3. **Obstacle-aware contact execution.** The grasp and release strategy — contact position and whether the gripper rotates — is chosen from the spatial relation between the target and any neighboring obstacle, rather than fixed once for the whole task.
4. **Strong empirical results.** SafeHarness attains 81.2% task success and 91.9% collision avoidance with GPT-6-Astra on SafeLIBERO, surpassing the previous state of the art by 13.7 and 23.0 points respectively, and improving over the same agent without harnesses by 31.2 and 57.5 points.

## Main Findings

- **Safety is not a perception or instruction problem.** The agent identifies the obstacle correctly in its traces, and the prompt already forbids touching it. Adding the safety requirement to the prompt does not change behavior — the agent restates the constraint and then violates it.
- **The failure is in planning.** Decomposing each manipulation phase into a route through free space and a contact-rich moment locates the fault: along the route, the model has no notion of a clearing path or of replanning when a route becomes infeasible; at the contact, it does not recognize that the contact motion is bounded by the same constraint.
- **Stronger backbones and stronger planners do not close the gap.** The paper reports that a stronger planner does not fix the problem, consistent with findings reported at scale, and that GPT-6-Astra does not remove the issue either.
- **SafeLIBERO averages (10 seeds per task, 32 tasks).** OpenVLA-OFT: 26.2% task success / 11.3% collision avoidance. π0.5: 57.8% / 17.1%. AEGIS: 67.5% / 68.9%. SafeHarness with GPT-5.5: 78.8% / 86.9%. SafeHarness with GPT-6-Astra: 81.2% / 91.9%.
- **AEGIS degrades on Libero-10.** On the Libero-10 suite, whose two sub-goals each call for a barrier-layer intervention, AEGIS falls below the frozen π0.5 policy it wraps in task success (46.3% versus 54.3%). A barrier layer can veto an unsafe motion but cannot propose a better one.
- **Skills can make agents less safe.** Adding skill memory raises task success but, at Level I, lowers both collision avoidance and safe success below the model-only setting for both backbones. When a stored skill matches a subtask, the agent replays it rather than reconciling it with the constraint, and those skills were learned in obstacle-free scenes. The paper calls Model + Skills with GPT-6-Astra the least safe setting in its ablation table.
- **Both harness components are necessary, and route planning contributes more.** Removing either component lowers safe success across all base models and both levels. Contact execution contributes less because the agent's own grasps often follow a standard approach that stays clear of a nearby obstacle; transport motion, by contrast, strikes the obstacle unless explicitly rerouted.
- **Gains over the skills-only agent.** SafeHarness improves over Model + Skills by 22.6 and 43.1 points with GPT-5.5 and by 31.2 and 57.5 points with GPT-6-Astra, and more than doubles safe success (73.1% and 78.1% overall versus 31.3% and 18.8%).
- **Real-robot results (PiPER-X 6-DoF arm, 20 trials per task).** Averaged over two tasks: π0.5 25.0% success / 17.5% collision avoidance; a vanilla GPT-5.5 coding agent 27.5% / 45.0%; SafeHarness with GPT-5.5 65.0% / 82.5%, a relative improvement of +136% and +83%.
- **Constraints decay over long contexts.** An episode spans hundreds of steps and tens of thousands of tokens while the constraint sits near the start of the conversation. SafeHarness does not rely on the constraint surviving that context: its verification tools are stateless with respect to the conversation and act at the moment a motion is decided.

## Methodology in Plain English

The authors first test the standard recipe: give a coding agent images, a task instruction, and an explicit "do not touch the obstacle" rule, and let it write and run the controller. They then split each task at its contact events into phases, where each phase is a route through free space followed by a contact-rich motion, and diagnose which part fails.

To fix the route, SafeHarness grounds the target and obstacle as bounding boxes using a segmentation model (SAM-3), asks the language model for a route as a polyline of waypoints that ends at the target and avoids the obstacle box, and then checks that proposal programmatically outside the model. Routes that intrude into the box are rejected and replanned. The check also runs during execution: if the arm stalls or gets closer than predicted, execution halts and a new route is planned from the current pose. Planning restarts every phase because the gripper plus a held object occupy more space than an empty gripper. The system also limits how often the route-plan image can be re-read, since repeated identical images inflate the context without adding information.

To fix the contact, each contact begins with an adjacency test. If nothing is nearby, the default strategy is used. If an obstacle is adjacent, the contact approaches from a direction that keeps clearance, choosing the direction farthest from the obstacle; if no direction works, the gripper is reoriented so its opening axis runs tangent to the obstacle and the payload is lowered vertically.

Implementation specifics: a route is rejected if the gripper, or the held object, passes within 12 cm of the obstacle or less than 5 cm above it; a stall of more than 3 cm short of a waypoint triggers replanning; the adjacency test fires when the gripper footprint comes within 2 cm of the obstacle; the frozen VLA is invoked only within 3 cm of the target; episodes are capped at 900 environment steps, with successful runs averaging about 400 steps and about 700 on Libero-10. The frozen VLA and the skill memory follow the Harness VLA configuration so that differences are attributable to the harnesses.

## Why This Matters

**Impact on research.** The paper reframes safety in LLM-driven robot control as a planning-and-execution architecture problem rather than a prompting problem. It shows that a constraint stated in language is honored mainly when no ready-made skill is available, so competence and safety can compete rather than reinforce each other. It also argues that constraints which must hold throughout execution should be embedded in the mechanisms through which an agent acts, not left to its reasoning — a design principle that extends beyond robotics to any long-horizon agent operating under hard constraints.

**Real-world applications:**

- Warehouse and logistics pick-and-place, where an arm must move goods around shelving, containers, and other robots' workspaces without contact.
- Home and assistive robots operating in cluttered kitchens and living spaces alongside people and fragile objects.
- Laboratory automation, where samples, glassware, and instruments sit close together and a collision destroys work in progress.
- Manufacturing and assembly cells, where tooling and fixtures constrain approach directions and a collision means damaged hardware or downtime.

**Industry relevance.** The results are directly relevant to teams deploying general-purpose models on robot hardware without robot-specific training: the paper shows that the harness — the tools and checks wrapped around the model — largely determines whether the deployment is safe, and that swapping in a stronger backbone does not substitute for that harness. The claim that the route planner itself is replaceable by any planner lowers the barrier to adopting the design.

## Future Directions

- **Broadening evaluation.** Results cover 32 SafeLIBERO tasks plus two real-robot tasks on a PiPER-X arm; extending to more suites, longer horizons, and more physical hardware is the obvious next step.
- **Strengthening the verifier.** The current check evaluates a single condition — whether the route intersects the obstacle box — on an approximately measured scene. Other physical constraints that arise during execution fall outside its scope, and a verified route can still fail against them.
- **Handling richer and dynamic scenes.** Each SafeLIBERO task uses one obstacle and each real-robot scene two; dynamic obstacles, multiple simultaneous obstacles, and semantic constraints (as in LIBERO-Safety) are not addressed.
- **Improving the weaker component.** Route planning contributes substantially more than contact execution, which suggests headroom in contact strategy selection beyond the default approach direction and the tangent-axis fallback.

## Target Audience

Robotics and embodied-AI researchers working on manipulation, safe control, or LLM-based agents; safety engineers evaluating general-purpose models on physical hardware; practitioners building coding-agent systems who need to know which parts of a task a language model should and should not be trusted to enforce; and graduate students looking for a clear example of diagnosing an agent failure by decomposing a task and then fixing it architecturally rather than by prompting.

## Authors’ abstract

Coding agents have emerged as a promising paradigm for robot manipulation: a language model writes the robot controller as a program, and agents built in this way now operate robots without robot-specific training. Whether this paradigm is also safe, however, has not been asked. We evaluate coding agents under a safety constraint, where each task pairs a manipulation goal with an obstacle the robot must not touch. The agent pursues the goal but collides with the obstacle in…

[The full abstract on arXiv](https://arxiv.org/abs/2609.20822)

[Read the original paper](https://arxiv.org/abs/2609.20822)

## Related papers

- [ChunkAct: Action Chunking for Agentic Robotics](https://robotics.world/paper/chunkact-action-chunking-for-agentic-robotics-2610.18874) 2026-10-13 · cs.RO · Also by Bingxin Xu, Emilio Ferrara +1
- [Don't Drop the BATON: Long-Horizon Robot Manipulation via Agentic Subtask Exploration and Transition-aware Memory](https://robotics.world/paper/don-t-drop-the-baton-long-horizon-robot-manipulation-via-agentic-2608.16889) 2026-08-17 · cs.RO · Also by Bingxin Xu, Emilio Ferrara +1
- [Recursive Video In-Context Learning for Agentic Robot](https://robotics.world/paper/recursive-video-in-context-learning-for-agentic-robot-2610.06843) 2026-10-05 · cs.RO · Also by Bingxin Xu, Yuzhang Shang
- [DeltaWAM: Change-Centric Visual Foresight via Delta Tokens for an Efficient World-Action Model](https://robotics.world/paper/deltawam-change-centric-visual-foresight-via-delta-tokens-for-an-2609.33177) 2026-09-27 · cs.RO · Also by Bingxin Xu, Yuzhang Shang
- [HexaShell: A Thin Harness for Exploring the Limits of VLM Agents as Robot Coding Agents](https://robotics.world/paper/hexashell-a-thin-harness-for-exploring-the-limits-of-vlm-agents-as-2610.23479) 2026-10-16 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/coding-agents-with-harness-for-safe-robot-control-2609.20822
