Claude Opus Solved a 4-Year-Old Bug the Dev Couldn't Find

2 days ago 4

Background: I'm a C++ dev with 30+ years experience, ex-FAANG Staff Engineer. I'm generally the person on the team that other developers come to after they struggled with a problem for a week, and I would solve it while they are standing in my office.

But today I was humbled by Claude Opus 4.

I gave it my white whale bug which arose from a re-architecting refactor that was done 4 years ago. The original refactor span around 60k lines of code and it fixed a whole slew of problems but it created a problem in an edge case when a particular shader was used in a particular way. It used to work, then we rearchitected and refactored, and it no longer worked.

I've been playing on and off trying to find it, and must have spent 200 hours on it over the last few years. It's one of those issues that are very annoying but not important enough to drop everything to investigate.

I worked with Claude Code running Opus for a couple of hours - I gave it access to the old code as well as the new code, and told it to go find out how this was broken in the refactor. And it found it. Turns out that the reason it worked in the old code was merely by coincidence of the old architecture, and when we changed the architecture that coincidence wasn't taken into account. So this wasn't merely an introduced logic bug, it found that the changed architecture design didn't accommodate this old edge case.

This took a total of around 30 prompts and one restart. I've also previously tried GPT 4.1, Gemini 2.5 and Claude 3.7 and neither of them could make any progress whatsoever. But Opus 4 finally found it.

Read Entire Article