Cursor's apply model unexpectedly converts typographic quotes and apostrophes on existing code

I’m having a fairly major problem with Cursor’s apply model using Composer agent mode for any model that supports agent mode.

Steps to reproduce:

  1. Ask an agent model to make any change to a file containing typographic quotes

Expected:
The changes made are restricted to the scope of what the agent generates, and typographic quotes are left unchanged

Actual:
Cursor’s apply model changes typographic quotes (i.e. “ ‘ ” ’ ) across the entire file in completely unrelated code to straight quotes " ', having nothing to do with what I asked for, which sometimes can cause linter errors, or, when within a string, can cause an application to break:



Notes:
Adding a rule to “Rules for AI” or cursor rules doesn’t help, because it’s the apply model that applies the diffs that has the problem. Tried with Claude and o3-mini, neither produce suggested code having anything to do with the affected parts.

Cursor version:
0.45.11, MacOS Sequoia

Tell us if the issue stops you from using Cursor:
Not the end of the world but it is problematic - requires manually scanning and rejecting multiple lines of code just to accept a single change

1 Like

Having the same problem, very infuriating as of late. While Cursor is suggesting a code fix in one part of a file, it then suggests fixing all typographic quotes throughout the rest of the file too, unrelated to the code fix. This means I need to Reject it’s whole suggestion.

I’ve tried adding this Rule but it does not seem to be working:

Never suggest changes that only modify:
- Straight quotes (") to curly/smart quotes (")
- Straight quotes (') to curly/smart quotes (')
- Apostrophes (') to curly/smart apostrophes (')
Any edit that only changes these characters should be ignored completely.

Yes unfortunately, adding a rule for it does not work because the AI chat / composer model is aware of it, but the apply model is not. The AI chat / composer model is not even suggesting those edits in the first place e.g. just uses // ... existing code ... but then the apply model does a diff across the entire file and that’s where the breakdown occurs