I don't know if I'm doing something wrong but bug fixing with AI has always been a crapshoot. You can absolutely tell an agent to fix an issue, and it will fix that issue, but the vast majority of the time that solution will be by adding code to cover the specific symptom in the bug report. It rarely considers or recommends solutions that have tradeoffs that may change behavior but will eliminate an entire class of similar bugs.
This is mostly a problem of agents not having the autonomy of managing an entire project and having the ability to make tradeoffs to increase simplicity or maintainability, but when given that autonomy no AI model I've used uses that privilege to write simpler, more maintainable code.
It makes me wonder if it could be solved with better context management
A real developer builds up global context of the whole project over time, you always hold the overall architecture in your head
Whereas with agents there is a still a lot lost between sessions
Its similar in a sense that a new developer to a project does more hacky local solutions whereas the senior on the team knows when the architecture needs to change as part of a fix
> It makes me wonder if it could be solved with better context management
There's a reason that repos are now bloated with AGENTS.md files that try to cram context in as pre-text. And that there's so many vibe-coded context/memory aggregation frameworks.
This is mostly a problem of agents not having the autonomy of managing an entire project and having the ability to make tradeoffs to increase simplicity or maintainability, but when given that autonomy no AI model I've used uses that privilege to write simpler, more maintainable code.