AI Joe
← Blog· Engineering Reality

The Bug That Never Crashes

November 11, 2026

The scariest failures in AI-generated code never throw an exception. They just quietly return a default value and let the dashboard stay green while the actual job stops happening.

The Details:

  • AI coding assistants are trained on data where "helpful" often means "didn't crash." Faced with a risky call like a token refresh or network request, the model wraps it in a try/except, logs a mild warning, returns a safe fallback, and moves on. That pattern passes code review and looks defensive, but it was optimized to avoid noise, not to preserve truth.

  • Generation happens one function at a time, so the model can see the exception it is catching but not whether anything three layers up ever checks the return value. A caught error with nobody watching becomes a permanent blind spot. Multiply that across a codebase and you get a system that reports success while doing nothing.

  • The fix is to name the contract before writing the handler: what does this function promise, and who breaks if that promise is silently unkept. A flaky DNS retry is safe to swallow quietly. A failed token refresh is not, because the whole system exists to post something. Telling an assistant the verb a system must fulfill changes the code it writes.

  • Structural witnesses catch what review misses: correlation IDs that match an attempt to its confirmation, dead man's switches that fire when an expected event goes missing, and tracing spans that stay visibly open when nothing closes them. The alarm should sit on the check that proves an action happened, not on the exception that was supposed to report its absence.

Bottom Line: Quiet logs are not proof of stability; they are proof that nobody is watching the thing that actually matters.

Enjoy this article?

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