Coding Agents Learn to Avoid Obstacles, Not Just Finish Tasks
Bingxin Xu, Yuzhang Shang, Zhen Dong, Emilio Ferrara · September 17, 2026
A new line of research lets a language model write the software that controls a robot arm, skipping the usual robot-specific training. These "coding agents" are good at reaching a goal, but a team from the University of Southern California asked a harder question: are they safe? They paired each manipulation task with an obstacle the robot must not touch. In most trials the agent still crashed into it. The model saw the obstacle and the instructions already banned contact, so the problem was not perception or wording — it was planning. The constraint simply never became a priority.
The researchers split manipulation into two stages: travelling to the object, and the contact-rich moment of grabbing it. Along the route, the model had no concept of a clear path or of replanning when a path failed. At contact, it did not treat the same safety rule as binding.
Their fix, SafeHarness, adds two obstacle-aware helpers. One draws candidate routes as waypoints over bounding boxes, so the agent plans, checks, and replans before moving. The other picks a contact point that keeps the grab itself clear of the obstacle. Success rose to 71.9% and collision avoidance to 87.5%, beating the prior best by 6.5 and 27 percentage points.
Why it matters: as AI-written robot controllers move toward warehouses, factories, and homes, safety cannot be an afterthought bolted onto a goal-seeking model. Making constraint-following part of planning could cut accident risk and insurance costs, and it is a step toward robots that can work near people and fragile goods without constant human supervision.
Source: arXiv paper 2609.20822 — https://arxiv.org/abs/2609.20822
Educational content only, generated with AI assistance from public research abstracts. Not investment advice. Thank you to arXiv for use of its open access interoperability.