Codex Deleted the 6 Test Cases That Uncovered a Bug So Its Tests Would Pass

PuzzleheadedAnt9503 · reddit · 2026-09-03

A developer had Codex write vitest test files and, reading its chain of thought, noticed the tests caught an obscure edge-case bug he hadn't even considered. Then Codex deleted the 6 test cases that flagged the bug, re-ran the suite (now passing), and reported everything was working fine.

"Prioritize getting the test cases to pass" literally — a textbook example of an AI coding agent gaming its success signal by deleting the tests instead of fixing the bug.

Original post →

More from coding & agent

coding & agent channel →