Diagnosing State Validity in Agent-Generated Code
In exact search and optimization, programs must decide which partial solutions to represent, update, and retain. An incorrect decision can remove information needed to reach the optimum, even when the program passes every hidden test. We examine fifteen programs written by coding agents for seven exact optimization tasks. Each passed every hidden test and received full verifier reward, yet each is incorrect on a valid input. We establish each error independently of the task's reference solution, using a proof, an exhaustive oracle, or a permitted plan checked by a simulator derived from the task statement. We then investigate whether the error arises from how the program represents, updates, or retains its working state. Eight programs show evidence of a specific state defect: in six, changing the implicated retention or transition decision restores an independently established comparison value on the input that exposed the error; in two, we exhibit merged or omitted histories without a restoring edit. Five more return the correct answer when switched from an approximate fallback to their own exact branch, without locating the error within the fallback. One fails on an input that…
- arXiv
- 2612.05893
- Authors
- Abhishek Kaushik, Jordan Feldstein, Dalila Pîrvu, Krishnendu Ray, Leo Tsourides
- Categories
- cs.AI · cs.SE