top | item 44121009

Show HN: An Agent That Resolves Merge Conflicts Automatically

3 points| someguy101010 | 9 months ago |github.com

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.

2 comments

order

glitch253|9 months ago

I really like your agent-loop blog post.

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|9 months ago

Thanks but its not mine! I just found it inspirational.

> 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.