Document Corruption in composer mode (Sonnet 3.5)

When using the Composer Mode in Sonnet 3.5 to apply changes, the document breaks. Instead of expected modifications, repetitive lines such as "[Previous content remains exactly the same until the reference image section...]" appear. This behavior disrupts the editing process. It started happening more recently. I’m on a org with privacy forced, so i cannot report it.

Steps to Reproduce:

  1. Open a document in Cursor.
  2. Enable Agent Mode (Sonnet 3.5).
  3. Make changes and allow the Agent to process them.

It happens more in long files (not so long 300 lines vue component). It can be reproduced and doing few tries doesnt help, even creatin a new composer session wont help.

Attachments:

Environment:
Version: 0.44.11
VSCode Version: 1.93.1
Commit: fe574d0820377383143b2ea26aa6ae28b3425220
Date: 2025-01-03T07:59:06.361Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.2.0

Impact:
This issue stops me from effectively using Cursor in Agent Mode, as the document becomes unusable after applying changes.

Hey, thanks for reporting this.

It seems like the AI is ignoring the instructions we give it on how to respond to user prompts!
Can you confirm that starting a new composer session resolves this?

No, the weird thing is that a new session don’t work , I tried removing my custom rules, but it doesn’t do anything. I’ll say it happens on some files more often than others but no sure how or why . In agent mode it retries many times , without success . There’s anything I can provide to give you more debugging info ??

Hey, we should have some upgrades to our apply model soon which we hope will issues like this! Should be available this week, but I’ll check back in with you once it is out to see if it does resolve this issue.