Ask a coding agent to move a robot arm to a target while avoiding a nearby obstacle, and it will hit the obstacle most of the time anyway.
That is the finding from a new study testing coding agents, AI systems that write robot controllers as executable programs, against tasks pairing a manipulation goal with an object the robot must not touch. Researchers report the agents complete the goal but collide with the forbidden object in most trials, even though the prompt explicitly forbids contact and the agent's own reasoning traces show it recognizing the obstacle. The failure traces to planning, not perception: along the route to the target, the model has no way to check whether its path is clear or to replan when it isn't, and at the moment of contact it does not treat the same safety rule as binding. The researchers built SafeHarness, which adds two structured checks: one that plots routes as waypoints around obstacles marked as bounding boxes and verifies them before execution, and one that constrains where the robot makes contact so the touch itself avoids the obstacle.
With those additions, task success rose to 71.9% and collision avoidance to 87.5%, roughly 2.3 and 1.5 times the same agent's performance without the harness, and ahead of the prior best system by 6.5 and 27 percentage points respectively.
The interesting part isn't the robot arm. It's that an agent can state a safety rule correctly, reason about it in text, and still not act on it, because nothing in its planning loop makes that rule compete for priority against the goal. That is a description of a lot of agentic systems well beyond robotics.
Even with the fix, the agent still clips a forbidden object more than one time in eight. That is progress, not a safety guarantee, and not something you'd want near anyone's fingers yet.