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

3 Likes

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.
1 Like

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

1 Like

Yeah I’m having this problem too and it’s incredibly annoying. I did not ask for a linter. This seems to be a manually applied rule that has nothing to do with the AI. Please remove it ASAP.

+1 to this, I’ve tried adding rules but it won’t work on the apply model. It’s making the apply process a lot slower (because it’s trying to go through all the places with copy). And I have to selectively accept and reject these changes. Hope this can be fixed soon.

This is becoming a really irritating issue for me especially with Yolo mode where the simplest change starts down an infinite loop of causing linter errors, which the agent then tries to fix.

+1 I have to make i18n changes manually

1 Like

Is there a way to elevate this bug? I can’t convince my team to switch to cursor if this keeps happening.

Yes please Cursor team, this makes agent basically unusable for any edits in these situations because the agent just gets stuck in a loop of trying to delint continuously. The only workaround is a) not using the agent and using inline edits, or b) using the agent, stopping it when it gets stuck in a loop, and then manually going through the entire file and rejecting all but the correct edit.