Do you trust the code your AI assistant just wrote for you?
I did. More than I should have.
Lately, right after my AI (I use Claude Code) writes something, I ask it one more thing: pretend you didn't write this. Review it like a skeptical senior engineer who's never seen it before.
Last week, that one extra step found 3 bugs. In code the same AI had written minutes earlier. Bugs it hadn't noticed at all when it wrote it.
Turns out, the person who writes something can't see its flaws. And apparently, that's true for AI too.
The bug that started it
I'm building a Windows app that translates screenshots on the fly. Paste a screenshot, it OCRs the text and overlays a translation.
One screen type kept beating it: white text on a dark navy header. Buttons like "Sign up" or "Help" — completely skipped. Not mistranslated, just never even detected as text.
The cause: the OCR pipeline decided "dark background = ignore this region" and threw the whole header away before even trying to read it.
I asked Claude Code to fix it — detect dark regions, invert them locally, then run OCR. That part worked. "Sign up" and "Help" started translating correctly.
I thought I was done.
Then I made the AI doubt itself
Here's the habit: I never let the AI mark its own work "finished." Right after it writes something, I ask the same AI to switch roles — become a skeptical reviewer who's never seen this code, and rip apart the diff it just wrote.
This time, it found 3 real bugs in the fix it had just shipped:
1. "Anything long and thin must be a button"
The button-detection logic was missing a width check. A single thin vertical stroke of text got mistaken for a button edge — splitting words like "DASHBOARD" into fragments and making them unreadable.
2. The noise-removal rule was too aggressive
A rule meant to clean up small artifacts was matching a much wider range than intended, and it was quietly deleting text it should have kept.
3. Brightness was measured the wrong way
The logic deciding whether to invert a region measured brightness by looking at how much of a character's ink was bright — so a bold white letter (lots of bright pixel area) got misread as "this is a bright button," and the region never got inverted at all.
None of these were caught when the code was written. Everything looked like it worked.
Why does the same AI catch its own blind spots when you just... ask differently?
This is the part I keep thinking about.
The model that wrote the code and the model that reviewed it are the same model. Nothing changed except the role I asked it to play.
My best guess: writing code and reviewing code point your attention in different directions. When you're writing to satisfy an intent, you're checking "does this match what I meant to do?" Whether the intent itself was wrong barely enters your field of view.
Reviewing flips that. You start from "is this intent even correct?" — no assumption that the goal was right in the first place.
It's the same reason a second human catches a bug in code you just wrote, instantly, that you missed for an hour. You remember what you meant. That memory is exactly what blinds you.
One more thing: don't trust the review either
Switching the AI's role produces a lot of findings. Not all of them are real bugs. Some are intentional design choices getting flagged as "wrong." Some are just misreadings.
So I never apply a finding straight from the review. Everything gets triaged first: real bug, intentional, or false positive — with the reasoning grounded in the actual code, not a guess. Only confirmed real bugs get fixed, and only with the smallest change that doesn't break the original intent.
Skip that step and you'll end up thrashing perfectly correct code because an overeager review said so.
The actual takeaway
The person who wrote it can't see its flaws. That's not a human-only limitation — it applies to AI too.
So now, every time I have an AI write or fix something, I make it play a second role before I call it done: someone who's never seen this code, whose job is to find what the author missed.
Since I started doing this, I catch noticeably more bugs before a user ever does.
I actually use two specific prompts every time I do this — one to force the "skeptical reviewer" review itself, one to triage what comes back so I don't blindly apply every finding. If people want the exact prompts, let me know in the comments — I might put together something more detailed with the full toolkit.
I post more of this kind of thing (solo dev + AI, the wins and the messes) on Threads.
Top comments (0)