| ▲ | frostiness 2 hours ago | |||||||||||||||||||
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. | ||||||||||||||||||||
| ▲ | tauwauwau 24 minutes ago | parent | next [-] | |||||||||||||||||||
It should work, unless you're working on a very large codebase. I give the AI all the information that I would consider before implementing the solution, my prompts sometimes are multiple paragraphs, it's tedious but it gives good results. Information that I provide may include links to different repositories that may impact the feature being implemented, broad description of some terms, instructions to use a local temp/ directory to create temporary/reusable scripts when needed. Sometimes when I don't trust it, I explicitly ask it to come up with a plan without changing anything. Other times, I ask it to implement, build deploy, test deployed app and loop till the feature works. One of the instructions that I have in Agents.md is to periodically save session summaries in ./docs/ directory, you can use an external file. I haven't tried any context-management tools other than context-mode, which seemed to make it worse. But I haven't needed anything more than the docs/ directory yet, and that's when I leave it working for hours at a time to in implement/test/build/deploy loop. Interrupting it at every stage is going to make it slow, so it's better to see the end result and if you don't like the end result, you can try again with new instructions. | ||||||||||||||||||||
| ▲ | davnicwil 33 minutes ago | parent | prev | next [-] | |||||||||||||||||||
I think this gets to something quite fundamental which is in the information loss when delegating a task in plain English. It's very hard and actually a lot of work to draw an appropriate buffer around a problem in terms of how much agency you want to be exercised in considering other concerns when fixing it. It takes a lot of skill on both sides to negotiate this even in an ongoing conversational loop. There comes a point of course where essentially doing this communication and negotiation is equivalent to the work. At that point, you really aren't saving all that much time by not writing the code yourself in a lot of cases. Maybe greenfield type work is the exception, where generating the code can actually save hours of typing, but certainly for bugfixes on mature systems where the right fix with all factors and competing priorities considered and negotiated only results in say 10 lines of new code, you start to wonder what actually is the benefit of delegation and automation here. | ||||||||||||||||||||
| ▲ | WillPostForFood 38 minutes ago | parent | prev | next [-] | |||||||||||||||||||
* It rarely considers or recommends solutions that have tradeoffs that may change behavior but will eliminate an entire class of similar bugs.* Are you specifically asking it to do that? You can just point AI at a bug and say "fix" or you can ask it to review, plan, offer alternatives. You can get a lot more out of it if you actively engage. | ||||||||||||||||||||
| ▲ | ex-aws-dude an hour ago | parent | prev | next [-] | |||||||||||||||||||
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 | ||||||||||||||||||||
| ||||||||||||||||||||
| ▲ | Unproven4275 33 minutes ago | parent | prev | next [-] | |||||||||||||||||||
I mean I also think it's the way you prompt it. Whenever I bug fix, I prompt it specifically to solve the problem not fix the symptom of the problem, and do so with the least amount of code changes possible to fix the problem. And I also tell it that if there's a more maintainable way to solve the problem(like prevent similar issues in other parts of the project, ie problems with a particular dependency or library being used) to suggest alternatives. I think it's also important that the AI either has context to your entire project(like ability to read the source), or you put the context of what it's solving in the prompt you give it specifically. | ||||||||||||||||||||
| ▲ | shipsafestack an hour ago | parent | prev [-] | |||||||||||||||||||
[flagged] | ||||||||||||||||||||