Wanted to take a crack at agents so I wrote one for resolving merge conflicts based on this blog post
https://sketch.dev/blog/agent-loop. I have found this to be pretty effective on some prs i've thrown at it but I'd run this in a vm because it just runs shell commands locally.
glitch253•1d ago
How does the agent know which to keep and which to discard for a conflict? This would that it has deep contextual information about the codebase it's looking at.
someguy101010•1d ago
> How does the agent know which to keep and which to discard for a conflict? This would that it has deep contextual information about the codebase it's looking at.
There is no guidance regarding this in the agent. For some conflicts this is important but I have found that for the conflicts I've tried this on it does not need the additional context to do the right thing! There is a option to add additional prompting before it solves a conflict. I will add notes in here to guide it such as "ignore auto generated files, i will generate them again later" so that it doesn't get stuck on generated data.