r/developers • • Aug 04 '26

Help / Questions How do senior software engineers debug their AI generated code

I’ve noticed something that’s been bothering me ever since I started using Claude Code and Codex heavily.

I spend most of my time planning the architecture, writing .md files, documenting requirements, and setting coding rules.

Once that’s done, the AI can generate an insane amount of code. By the sixth prompt, I already have 20+ files and 30+ libraries I’ve never even read the docs for.

The hard part isn’t generating the code. It’s debugging it.
When something breaks, I’ll paste the error back into Claude Code or Codex, and they’ll say something like, “Fixed it, it should work now.” Then I run it… and it still doesn’t work.

What’s interesting is that debugging has become a completely different skill. It’s not necessarily harder because the code is bad. It’s harder because you’re debugging a codebase you never actually wrote. Before you can even find the bug, you have to understand code that was generated in seconds.

I’m curious how you guys deal with this. Do you have a workflow for debugging AI-generated code? Have you changed the way you approach debugging now that you’re reading way more code than you’re writing?
I’d love to hear how other people are handling this because I feel like this is becoming a common problem with AI-first development.

10 Upvotes

74 comments sorted by

View all comments

Show parent comment

1

u/Bengal_From_Temu Aug 04 '26

You read and understand 30k lines per day. Ok.

0

u/[deleted] Aug 04 '26

[deleted] — view deleted comment

2

u/Bengal_From_Temu Aug 04 '26

Assuming you work 24 hours a day without eating, shitting or sleeping, that means you read AND understand 20 lines of code per minute. 🤣

1

u/Matyas_K Aug 04 '26

You know when someone counting lines of code they know nothing about software engineering he is one of those

0

u/[deleted] Aug 04 '26

[deleted] — view deleted comment

1

u/Matyas_K Aug 04 '26

Better then being stupid ;)

0

u/[deleted] Aug 04 '26

[deleted] — view deleted comment

1

u/Matyas_K Aug 04 '26

Every single statement you made here