Feature request for product/service
Cursor IDE
Describe the request
The default behavior of git in case of merge conflict is to generate only a two-way diff (merge.conflictstyle merge). This is OK for humans, because humans mostly know from their general work context what the intended target state of the changes that are being merged was. However, the AI agent lacks this context.
Cursor IDE’s current prompt when clicking ‘resolve in chat’ is just something like “Solve the merge conflicts”. In my tests on a fairly complex merge conflict, with this prompt, neither sonnet 4.5 nor gpt-5 made any attempt to compute a three-way diff, and instead they resolved the merge conflict in a semantically incorrect way. When I instead prompted the agent to compute a three-way diff first and think about the intention behind the diff, the agent was able to resolve the merge conflict correctly.
As a simple example, consider the following three-way diff:
- John
- Jack
- Jim
- Jane
<<<<<<< HEAD
||||||| 32c2913
- Jill
=======
- Jill
- Jared
>>>>>>> branch1
- Janet
One branch removed Jill. The other branch added Jared. With cursor’s default prompt “Resolve this merge conflict” this results in both Jill and Jared ending up in the merge result, even though it was the intention of the changes on branch2 (32c2913) that Jill be removed.
If instead the following prompt is used with sonnet 4.5, the merge conflict is resolved correctly:
Resolve this merge conflict by considering the three-way merge and thinking about the changes that were made on the respective branches to conclude the intention behind the changes and merge them in a semantically correct way.
Prompting the agent in this way should be cursor’s default.
