AI Joe
← Blog· AI Axiom

The Bugs That Pass Every Test and Still Break Production

November 26, 2026

Why it matters: AI-generated code can look flawless and pass every test while quietly relying on assumptions about the world that nobody wrote down or checked.

The Details:

  • An implicit contract is an unstated belief baked into code about its operating environment: that a credential stays valid, that a response arrives fast enough, that a write is visible instantly. These beliefs are often reasonable on their own, but they are never surfaced, never checked against your actual system, and never flagged for review. A pipeline can run cleanly for weeks before one of these quiet assumptions stops holding and the whole thing goes dark with no error message at all.
  • Tests generated in the same session as the code do not act as independent verification. The model that wrote the function and the model that wrote its test share the same blind spot, so a green test suite can simply mean the code agreed with itself twice rather than that it was checked against reality.
  • The fix is a different question during review. Instead of asking whether the code is correct, ask what it assumes: about input order, about timeouts, about token lifetimes. Writing those assumptions out as plain text, then handing that list to a fresh session with no memory of the original code, tends to surface the failure modes the first pass quietly ignored.
  • Not every assumption deserves a runtime check. Triage by asking whether a violation fails loudly or silently. Internal failures that throw exceptions are usually fine to leave undocumented beyond a comment. Anything crossing a boundary you do not control, external APIs, quotas, clock skew, deserves alerting, because those are the failures that hide behind a dashboard reading nominal.

Bottom Line: Writing the code was never the hard part; noticing what it silently assumes about the world it runs in is.

Enjoy this article?

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