# Urgent: Cursor auto-suggestion breaking code on save (unusable after latest updates)

**URL:** <https://forum.cursor.com/t/urgent-cursor-auto-suggestion-breaking-code-on-save-unusable-after-latest-updates/157569>\
**Category:** Bug Reports\
**Tags:** tab\
**Created:** [April 13, 2026, 9:59pm UTC](https://forum.cursor.com/t/urgent-cursor-auto-suggestion-breaking-code-on-save-unusable-after-latest-updates/157569 "2026-04-13T21:59:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RicFerr](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@RicFerr](https://forum.cursor.com/u/RicFerr)\
**Post date:** [April 13, 2026, 9:59pm UTC](https://forum.cursor.com/t/urgent-cursor-auto-suggestion-breaking-code-on-save-unusable-after-latest-updates/157569/1 "2026-04-13T21:59:29Z")

</div>

Hi everyone,

After the latest updates, Cursor is breaking valid JSX/TSX code on save.

This happens **every single time I save a file** , even with very small edits. It affects not only className strings (Tailwind), but also **entire JSX tags and structure**.

The IDE removes closing quotes or breaks JSX syntax, making the code invalid. I constantly have to undo (Cmd + Z) after saving.

This is happening **on every file** , not just specific components.

**Steps to Reproduce**

1. Create a JSX/TSX component

2. Add a long className string

3. Move part of the string to a new line

4. Save the file

Example:

\<ScrollAreaPrimitive.Viewport  
data-slot=“scroll-area-viewport”  
className=“focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1”

After save (broken):

\<ScrollAreaPrimitive.Viewport  
data-slot=“scroll-area-viewport”  
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none

Here you can see some real example of what is happening every time I save the file (first gif) or I press tab (second gif):

![ezgif-28d974868191c3fe](https://us1.discourse-cdn.com/cursor1/original/3X/8/d/8dd6b55195441d6d262538483f696db3507d5b8f.gif)

![ezgif-2785af2c94fb129a](https://us1.discourse-cdn.com/cursor1/original/3X/2/c/2c9a5aa8146803be25c946cae8a267b518fbd269.gif)

**Expected Behavior**

Saving the file should not modify or break valid JSX.

Formatting should preserve valid syntax and never remove quotes or JSX structure.

**Operating System**

☑ MacOS

**Version Information**

IDE:

Version: 3.1.10

VSCode Version: 1.105.1

Commit: dacbe9b31599a253763e4910eb6ab38704653320

**Model:** Unknown (default Cursor autocomplete / AI)

**Additional Information**

- Happens on every save

- Affects multiple components/files

- Looks like auto-formatting or AI suggestion applied automatically

- Breaking JSX syntax (missing quotes / tags)

- Makes working with Tailwind classes very problematic

- Requires constant undo (Cmd + Z)

**Does this stop you from using Cursor?**

☑ Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [April 13, 2026, 9:59pm UTC](https://forum.cursor.com/t/urgent-cursor-auto-suggestion-breaking-code-on-save-unusable-after-latest-updates/157569/2 "2026-04-13T21:59:42Z")

</div>

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the **Bug Reports** category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

> **Bug Report Template - Click to expand**
>
> **Where does the bug appear (feature/product)?**
> 
> - Cursor IDE
> - Cursor CLI
> - Background Agent (GitHub, Slack, Web, Linear)
> - BugBot
> - Somewhere else…
> 
> * * *
> 
> **Describe the Bug**  
> A clear and concise description of what the bug is.
> 
> * * *
> 
> **Steps to Reproduce**  
> How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!
> 
> 1. …
> 2. …
> 3. …
> 
> * * *
> 
> **Expected Behavior**  
> What is meant to happen here that isn’t working correctly?
> 
> * * *
> 
> **Screenshots / Screen Recordings**  
> If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)
> 
> * * *
> 
> **Operating System**
> 
> - Windows 10/11
> - MacOS
> - Linux
> 
> * * *
> 
> **Version Information**
> 
> - For Cursor IDE: Menu → About Cursor → Copy
> - For Cursor CLI: Run `agent about` in your terminal
> 
> ```auto
> IDE:
> Version: 2.xx.x
> VSCode Version: 1.105.1
> Commit: ......
> 
> CLI:
> CLI Version 2026.01.17-d239e66
> 
> ```
> 
> * * *
> 
> **For AI issues: which model did you use?**  
> Model name (e.g., Sonnet 4, Tab…)
> 
> * * *
> 
> **For AI issues: add Request ID with privacy disabled**  
> Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1  
> For Background Agent issues, also post the ID: bc-…
> 
> * * *
> 
> **Additional Information**  
> Add any other context about the problem here.
> 
> * * *
> 
> **Does this stop you from using Cursor?**
> 
> - Yes - Cursor is unusable
> - Sometimes - I can sometimes use Cursor
> - No - Cursor works, but with this issue

The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!

---

<div class="post-metadata">

**Author:** ![RicFerr](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@RicFerr](https://forum.cursor.com/u/RicFerr)\
**Post date:** [April 13, 2026, 11:37pm UTC](https://forum.cursor.com/t/urgent-cursor-auto-suggestion-breaking-code-on-save-unusable-after-latest-updates/157569/4 "2026-04-13T23:37:29Z")

</div>

**Update / Possible Fix**

It looks like the issue was not only related to Cursor suggestions, but also to editor.codeActionsOnSave.

I had:

 ![Screenshot 2026-04-14 at 01.34.55](https://us1.discourse-cdn.com/cursor1/original/3X/5/6/5687f6e451ff33cf6f0f7c2da97df168b1e7cc79.png)

This was running all auto-fixes (including ESLint) on save and was breaking JSX (especially multiline className).

Switching to:

 ![Screenshot 2026-04-14 at 01.35.14](https://us1.discourse-cdn.com/cursor1/original/3X/c/f/cf1680dfc2f7f8f2a4eec9d257ec95d4c02bf435.png)

or removing source.fixAll improve the behavior and it’s a bit more stable.

Still not sure why this didn’t happen before, it’s long time I’ve this setup and it started this strange behavior just after last update of cursor (possibly due to updates in Cursor / ESLint / plugins), but sharing in case others hit the same issue.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [April 14, 2026, 8:46am UTC](https://forum.cursor.com/t/urgent-cursor-auto-suggestion-breaking-code-on-save-unusable-after-latest-updates/157569/6 "2026-04-14T08:46:31Z")

</div>

Hey, thanks for the detailed report and for figuring out the root cause yourself.

Your find with `editor.codeActionsOnSave` and `source.fixAll` looks like the right direction. It was most likely a conflict between ESLint auto-fix running via `source.fixAll` and Tab autocomplete. They both try to change the code, and JSX ends up getting broken.

A few things that can help confirm what’s happening:

1. Check your ESLint extension version. It may have updated along with Cursor and triggered the conflict. You can try rolling the extension back to a previous version right click the extension \> Install Another Version.

2. If the Tab issue still shows up, try temporarily turning off Cursor Tab in Cursor Settings \> Features \> Cursor Tab, then see if the problem goes away on save. This helps isolate whether it’s Tab or ESLint.

3. You can also try adding a timeout: `"editor.codeActionsOnSaveTimeout": 5000`. Sometimes a race between formatting and code actions can cause issues like this.

If switching to `source.fixAll.eslint` fully fixed it, you can mark the thread as solved so it’s easier for other users with the same setup. Let me know if anything else still reproduces.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [May 6, 2026, 8:47am UTC](https://forum.cursor.com/t/urgent-cursor-auto-suggestion-breaking-code-on-save-unusable-after-latest-updates/157569/7 "2026-05-06T08:47:07Z")

</div>

Closed on May 6, 2026, 8:47am UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
