Back to notes

September 8, 2026 · 4 min read

My AI Pair Programmer Is Confidently Wrong More Often Than I'd Like

It never hedges. It writes broken code with the same unwavering tone it writes correct code, and that tone is the actual danger, not the error rate.

Hot TakeAI Engineering

I asked my AI coding assistant to write a function handling a timezone edge case last week, and it produced code that looked completely reasonable, used the right library, had sensible variable names, and was subtly wrong in a way that would have silently shifted timestamps by an hour for users in exactly one timezone during exactly one week of the year. It presented this with the exact same tone it uses for code that's completely correct.

The error rate isn't the problem

Every engineer makes mistakes, and a reasonable error rate from a tool is fine if you know where to expect it. What's different here is the complete absence of a confidence signal. A junior engineer who isn't sure about a timezone edge case will usually say so, or at least write a comment flagging the uncertainty. The assistant doesn't do that. It writes the wrong answer with the identical polish and tone as the right one, and that erases the one signal I actually rely on to know where to look harder.

A junior engineer who's unsure tells you. A model that's unsure writes the wrong code just as smoothly as the right code.

How I've adjusted, not abandoned

  • Treat any code touching dates, money, or concurrency as requiring full manual review, regardless of how clean it looks — those are where confident-wrong shows up most.
  • Ask it to explain its own reasoning after the fact, which sometimes surfaces the gap even when the first-pass code didn't flag one.
  • Never merge generated code for a domain I don't understand well enough to spot a subtle error myself — the tool is a multiplier on my judgment, not a replacement for it.
  • Write the test first, independently, before seeing the generated implementation, so the test isn't accidentally shaped by the same blind spot.

I still use it constantly, and it still makes me faster on net. But the mental model I'd tell anyone to adopt is: it's not confident because it's right, it's confident because confidence is just how it writes, always. Calibrate your review effort to the stakes of the code, not to how sure it sounds, because how sure it sounds carries zero information.