AI Joe
← Blog· AI Axiom

The Bug Isn't in the Code, It's in the Unstated Assumption

July 12, 2026

Green tests and clean review mean nothing if the model quietly picked one interpretation of "empty" and never told you which. That is the real reason AI-written code passes every gate and still breaks the moment production data shows up.

The Details:

  • Writing your own code leaves a mental trail you can retrace when something goes wrong. Code generated by a model has no such trail in your head, so debugging it is less like remembering and more like archaeology: inferring intent from an artifact you never watched get built.

  • Ordinary inputs hide forked meanings a model resolves silently. An empty list, a null, a missing key, and an empty string are four different states, and a function that "handles empty" usually handles exactly one. The same goes for timestamps: a model may quietly assume UTC or normalized input, and the tests pass because they were generated under the identical assumption.

  • Standard test suites cannot catch this because they validate internal consistency, not real-world accuracy. The fix is a separate pass before testing: read the code specifically to list what it assumes about input shape, then throw weird inputs at it on purpose, null where a list is expected, a foreign timezone, a malformed string, and simply ask the model what it assumed and where it would break.

  • Runtime observability closes the remaining gap. Log the actual shape of data at system boundaries, type, nullness, length, timezone, instead of a generic failure message, and turn silent assumptions into loud assertions at entry points so failures surface at the source rather than three functions downstream.

Bottom Line: The skill that matters now is not writing intent clearly, it's reading someone else's, including a model's, and dragging its hidden assumptions into the light before production does it for you.

Enjoy this article?

Listen to the Claude Code Conversations radio show or join the community.