← News

Agents & MCPSources: arXiv · 4 Dec 2026

Study finds agent-written code can pass every hidden test yet still be wrong

A new arXiv paper examines fifteen programs produced by coding agents for exact optimization tasks. All passed their hidden test suites, yet the authors show each one fails on some valid input.

In plain words

Researchers tested programs written by AI coding agents on optimization problems, where software must carefully track partial solutions. Every program passed the official hidden tests, but the authors found a valid input that breaks each one. They traced most failures to how the code stores and updates its working data.

What was announced

The authors, writing on arXiv, analyzed fifteen agent-generated programs covering seven exact optimization tasks. To confirm each failure, they avoided relying on a task's reference solution. Instead they used a mathematical proof, an exhaustive oracle, or a simulator built from the task statement to check a permitted plan, establishing that every program is incorrect on at least one valid input despite earning full verifier reward.

Eight programs showed evidence of a specific defect in how they represent, update, or retain working state. In six cases, editing the implicated retention or transition decision restored the correct comparison value on the failing input; in two, the authors demonstrated merged or omitted histories without such an edit. Of the rest, five returned correct answers once switched from an approximate fallback to their own exact branch, one failed when its fallback activated, and one error stayed unlocalized. The authors stress that no edit proved global correctness, and some hidden suites never exercised the faulty decisions at all. They suggest evaluations should also check whether a program's state handling preserves information for later steps.

What it does not show

  • The findings come from the paper's abstract only, so full method details are not available.
  • The authors state these cases show false-positive verifier outcomes exist but do not measure how common they are or any effect on training.
  • No edit in the study established that a corrected program is globally correct.

For security and IT teams

Scope
The evidence covers fifteen agent-written programs across seven exact optimization tasks; hidden test suites sometimes never reached the decisions that caused failures.

Sources

Source-support review completed 4 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.

Coverage: arXiv: abstract.

Updates and corrections

No corrections so far.

First published 4 Dec 2026

New to the subject? AI from the Ground Up starts from the beginning.