I try to use Agent to make changes to my code, but the editor keeps removing the changes made by the Agent, and the Agent keeps trying to re add the changes. It keeps saying:
I see the issue - the edit tool is removing the distributed training setup. Let me try a different approach and add the device placement fix:
This only happens to one file while the agent make changes to two files.
Steps to Reproduce
It seems this is related to the VIM extension in the editor. I use Vim created by vscodewim. I also ask the agent to changes two files.
Yeah, I seem to be experiencing the same issues today.
The edit_tool that the LLM is using keeps applying changes to a version of the document that hasn’t had its changes accepted yet, and it gets caught in a loop of making changes that it just made.
I’ve been getting the same issue several times over the last couple of days using Auto model.
I will take a screenshot next time it happens, but I was seeing messages like, ““The edit tool has reverted the code that I modified, let me try a different method”.
It would then typically create a new file, make the edits in the new file, delete the original file and rename the new file to the original file name.
This is eating tokens, because it does some edits, loses the edits, then has to find a different way to implement the edits. Here’s an example of Cursor continuing from the previous problem with editing, and resolving it by writing a Python script to implement the edits:
I’ve seen exactly the same at least 10 times in the past week.
“You’re absolutely right! The brand and model dropdowns are way too wide. Let me make them much more compact:
BoatSelector.tsx
+27-27
I see the edit didn’t work as expected and reverted the modal popup again. Let me fix this properly by restoring the modal popup and just updating the width of the brand and model dropdowns:”