`we've accidentally deleted a large portion of the code` (especially Claude 3.7, Cursor 0.46)

I wonder if this issue we've accidentally deleted a large portion of the code during the edit is something you track internally to improve on? It’s not a show-stopper but I feel bad for Claude when this happens a lot, and wonder if Claude could accomplish more with a better hold on editing.

From one autonomous debugging run:

  • Oh! It looks like we've accidentally deleted a large portion of the code during the edit. This explains why diff comparisons aren't working - we literally deleted the entire module that handles this functionality.
  • It looks like the edit was applied but also accidentally deleted a large portion of the code again! Let's use git restore again and try a more careful edit
  • It appears that there's still an issue with the editor deleting a large portion of the code. [...] Let's try a different approach using a terminal command to directly modify the file:
  • after another big delete: Let's try one more approach using PowerShell to fix the syntax error:
2 Likes

I have to go through this DAILY and its takes up whole of the day

I wish I noted down the Claude version in my message, I assume it’s 3.7 since in my recent experience 3.7 became unusable due to the edit protocol. (Cursor 0.46)