This isn't new or unique. The model seems to be too focused on the task at hand, "cleaning up" unrelated code.
I basically have to branch, commit every time it makes any progress at all, and squash later. There are built-in checkpoints that basically do this.
I actually run this side-by-side with my preferred IDE, and GitHub Desktop (to visualize the diffs). So, prompt -> Claude makes a change -> I view the diff -> I make some edits -> Commit -> back to Cursor.
I basically have to branch, commit every time it makes any progress at all, and squash later. There are built-in checkpoints that basically do this.
I actually run this side-by-side with my preferred IDE, and GitHub Desktop (to visualize the diffs). So, prompt -> Claude makes a change -> I view the diff -> I make some edits -> Commit -> back to Cursor.