# Cursor update changed line endings in entire codebase without consent

**URL:** <https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566>\
**Category:** Bug Reports\
**Tags:** installation, windows\
**Created:** [February 2, 2026, 3:15am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566 "2026-02-02T03:15:43Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Starvision\_ltd](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Starvision\_ltd](https://forum.cursor.com/u/Starvision_ltd)\
**Post date:** [February 2, 2026, 3:15am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/1 "2026-02-02T03:15:43Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

After updating Cursor, it automatically converted line endings (LF→CRLF)  
in a large legacy file (47,000+ lines), mixing legitimate code changes  
with line ending changes. This happened even with AI in “Ask Mode” (read-only).

### Steps to Reproduce

When there is a popup for new version update, click the update button.

### Expected Behavior

- Cursor should preserve existing line endings by default
- Updates should not modify editor settings that affect file content
- Users should be warned if line ending auto-conversion is enabled

### Operating System

Windows 10/11

### Version Information

Version: 2.4.27 (system setup)  
VSCode Version: 1.105.1  
Commit: 4f2b772756b8f609e1354b3063de282ccbe7a690  
Date: 2026-01-31T21:24:58.143Z  
Build Type: Stable  
Release Track: Default  
Electron: 39.2.7  
Chromium: 142.0.7444.235  
Node.js: 22.21.1  
V8: 14.2.231.21-electron.0  
OS: Windows\_NT x64 10.0.26200

### Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

---

<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:** [February 2, 2026, 5:46am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/3 "2026-02-02T05:46:40Z")

</div>

Hey, thanks for the report. Looks like a known issue with files changing on Cursor update/launch on Windows - usually tied to line endings settings and unaccepted changes from Agent/Composer.

Need a bit more info to pinpoint the exact cause:

Git config:

- What does `git config --global core.autocrlf` return?

Cursor settings `Ctrl+,`:

- `files.eol` - what’s the value?
- `files.insertFinalNewline` - enabled?
- `files.trimTrailingWhitespace` - enabled?

Project:

- Any `.editorconfig` or `.gitattributes` in the project?
- Was there a pending review from Agent/Composer in this file that you didn’t accept before updating?

Temporary workaround (based on similar cases):  
If there are unaccepted changes in the Review panel - try opening each file and hitting “Accept all changes”, then revert git changes and restart Cursor. This fixed it for a few users.

Let me know the results - it’ll help figure out if we need a new ticket or if it’s a variant of the known issue.

---

<div class="post-metadata">

**Author:** ![Starvision\_ltd](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Starvision\_ltd](https://forum.cursor.com/u/Starvision_ltd)\
**Post date:** [February 3, 2026, 3:06am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/4 "2026-02-03T03:06:32Z")

</div>

Hi Dean,

Git config:  
I’ve set it to true after I encountered the bug. I don’t know what was the value before.

files.eol - what’s the value? auto  
files.insertFinalNewline - enabled? no  
files.trimTrailingWhitespace - enabled? no

I used Cursor to create .editorconfig and .gitattributes, but only after I encountered the bug.  
I don’t remember any pending review.

---

<div class="post-metadata">

**Author:** ![Starvision\_ltd](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Starvision\_ltd](https://forum.cursor.com/u/Starvision_ltd)\
**Post date:** [February 4, 2026, 9:01am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/5 "2026-02-04T09:01:12Z")

</div>

Hi Dean,  
The problem is more serious than I thought.  
I just opened the app, and it updated these 3 files.  
Since I started using Cursor, these are the only files I have ever asked the app to create or update.

![image](https://us1.discourse-cdn.com/cursor1/original/3X/9/4/94ce4efb97348266f10f599e716a82d58178581c.png)

---

<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:** [February 4, 2026, 5:17pm UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/6 "2026-02-04T17:17:05Z")

</div>

I can see the issue is more serious. The files change every time you open the IDE, not only during an update.

This looks a lot like a bug that was fixed in version 2.3. The IDE used to add blank lines on startup to files that Agent had edited before. You’re on 2.4.27, so this is either a regression or a slightly different case related to line endings.

Main question: do you have any pending changes for these files in the Review panel?

- Open the Review panel
- Check if those 3 files are listed there (DataProvider.cs, CacheRace.aspx, CacheRace.aspx.cs)

If they are, try this workaround that helped many users with a similar bug:

1. Open each file from the Source Control tab
2. Click the Keep button (or press `Ctrl+Y`)
3. Remove the extra changes (in your case, revert to the original line endings)
4. Restart Cursor

After that, the files should stop “sticking” on IDE startup.

Let me know what you see in the Review panel and whether the workaround helped. If not, I’ll create a ticket for the team since this looks like a regression of a bug that was already fixed.

---

<div class="post-metadata">

**Author:** ![Starvision\_ltd](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Starvision\_ltd](https://forum.cursor.com/u/Starvision_ltd)\
**Post date:** [February 5, 2026, 9:28am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/7 "2026-02-05T09:28:53Z")

</div>

Review panel:  
There are no pending changes for these files in the Review panel.  
When opening Cursor, no Review panel appears, and the following files are not listed there:  
\* DataProvider.cs  
\* CacheRace.aspx  
\* CacheRace.aspx.cs

No Accept/Reject UI is shown at any point. The changes do not go through the Review workflow.

Findings / repro:

\* DataProvider.cs contains pure CRLF line endings (LF-only lines: 0, verified at byte level).  
\* On reopening Cursor, the file is rewritten to LF without any user edits.  
\* LastWriteTime changes on reopen, confirming the file is written on open.  
\* This happens even when launching Cursor with --disable-extensions (so not extension-related).  
\* .editorconfig is being read (indentation rules apply), including [\*.cs] end\_of\_line = crlf.  
\* Workspace/folder settings do not override anything.  
\* .gitattributes includes \*.cs text eol=crlf, but Cursor still writes LF.  
\* files.eol was tested with “\r\n” and “auto”; behavior is unchanged.

Conclusion:  
Cursor core (not Agent/Review, not extensions) is saving files on open and normalizing line endings to LF, bypassing the Review panel and ignoring EditorConfig end\_of\_line = crlf.

---

<div class="post-metadata">

**Author:** ![aebp](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@aebp](https://forum.cursor.com/u/aebp)\
**Post date:** [February 12, 2026, 9:22am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/8 "2026-02-12T09:22:06Z")

</div>

Me and my coworkers are also experencing this which is quite annoying

---

<div class="post-metadata">

**Author:** ![Troy\_eps](https://avatars.discourse-cdn.com/v4/letter/t/e19adc/32.png) [@Troy\_eps](https://forum.cursor.com/u/Troy_eps)\
**Post date:** [February 12, 2026, 2:28pm UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/9 "2026-02-12T14:28:38Z")

</div>

We are also experiencing this. It’s not just inconvenient, its costing us money in time. Please considering fixing this as an urgent hotfix issue. If it helps, when viewed in VS afterwards, the message appears “These files have different encodings. Left file: Unicode (UTF-8) with signature. Right file: Unicode (UTF-8) without signature. You can resolve the difference by saving the right X  
file with the encoding Unicode (UTF-8) with signature.” I don’t see UTF-8 with signature as an option in the Cursor encoding dropdown, so maybe that needs to be added? In Github online, it mentioned with or without a BOM-so maybe that one too?

---

<div class="post-metadata">

**Author:** ![Manuel\_Riviere](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@Manuel\_Riviere](https://forum.cursor.com/u/Manuel_Riviere)\
**Post date:** [February 13, 2026, 11:09am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/10 "2026-02-13T11:09:06Z")

</div>

This issue is making Cursor unusable for our team.

---

<div class="post-metadata">

**Author:** ![Nick\_Williams](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@Nick\_Williams](https://forum.cursor.com/u/Nick_Williams)\
**Post date:** [February 16, 2026, 10:32am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/11 "2026-02-16T10:32:59Z")

</div>

Same here - I have to remember to commit all work before even thinking about opening cursor otherwise it edits 300+ files to change their line endings to LF. If i forget, then my working folder is polluted with these changes and its time consuming to recover from. I have tried all VS Code settings (in Cursor) to do with line endings, and nothing works. As the OP says, this also occurs after deleting the workspace cache from AppData so that Cursor loads with no files open at all, just a new agent on screen. It still tramples over the same files on the next load. I love Cursor, but this is making the workflow difficult.

Incidentally, this is what Cursor itself advises after spending hours trying to fix it:

_**If it’s Cursor (no extension)**_

_Then there is no setting we can change in your project to make it “stop touching all my files.” The only real fix is Cursor changing their code so they don’t write files when they shouldn’t. Your options are:_

- _Report the behavior (e.g. “Cursor rewrites 100+ files to LF on startup despite files.eol and files.eolConversion”)._

- _Check Cursor release notes / settings for anything like “indexing”, “codebase”, “normalize”, or “line endings” and turn it off if it exists._

- _As a last resort, use another editor for this repo until Cursor fixes it._

_So: run with --disable-extensions first; that tells you whether we can fix it (extension) or we’re blocked on Cursor (core behavior)._

---

<div class="post-metadata">

**Author:** ![mgajek](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mgajek/32/98460_2.png) [@mgajek](https://forum.cursor.com/u/mgajek)\
**Post date:** [February 16, 2026, 3:33pm UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/12 "2026-02-16T15:33:56Z")

</div>

also experiencing the same issue.  
Cursor 2.4.31

---

<div class="post-metadata">

**Author:** ![Starvision\_ltd](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Starvision\_ltd](https://forum.cursor.com/u/Starvision_ltd)\
**Post date:** [February 25, 2026, 3:20am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/13 "2026-02-25T03:20:48Z")

</div>

I installed the latest version (2.5.25) and it seems to have fixed the bug.  
Thank you.

---

<div class="post-metadata">

**Author:** ![dingetje](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dingetje](https://forum.cursor.com/u/dingetje)\
**Post date:** [March 6, 2026, 3:06pm UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/15 "2026-03-06T15:06:59Z")

</div>

I have Cursor 2.6.12 and the issue is either back or not fixed:

Version: 2.6.12 (user setup)  
VSCode Version: 1.105.1  
Commit: 1917e900a0c4b0111dc7975777cfff60853059d0  
Date: 2026-03-04T21:41:18.914Z  
Build Type: Stable  
Release Track: Default  
Electron: 39.6.0  
Chromium: 142.0.7444.265  
Node.js: 22.22.0  
V8: 14.2.231.22-electron.0  
OS: Windows\_NT x64 10.0.26100

We’re using svn for revision control, all files are committed. Then I open my project in Cursor and line endings from several files (not all) are converted from CRLF (Windows) to LF (Linux).

It’s very annoying to say the least.

---

<div class="post-metadata">

**Author:** ![tom\_hindle](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@tom\_hindle](https://forum.cursor.com/u/tom_hindle)\
**Post date:** [March 27, 2026, 9:29pm UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/16 "2026-03-27T21:29:45Z")

</div>

Still happens in 2.6.21

---

<div class="post-metadata">

**Author:** ![Alex\_Quinn](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Alex\_Quinn](https://forum.cursor.com/u/Alex_Quinn)\
**Post date:** [March 31, 2026, 2:53am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/17 "2026-03-31T02:53:11Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

Cursor agent on Windows creates new files with CRLF line endings no matter what, even though LF line ending was specified in all settings (i.e., `files.eol`, `.editorconfig`, and `.gitattributes`), `git config --global core.autocrlf` is not set, and the whole project uses LF (not CRLF).

### Steps to Reproduce

Set `files.eol` (editor setting) to `\n` (LF).  
Create an `.editorconfig` in the project root with `end_of_line = lf`.  
Create `.gitattributes` with `* text=auto eol=lf` (and no mention of crlf).

Open new chat with any model (tested with Composer 2 and Opus 4.6) and execute this prompt:

> ❝Create a new test file called hello\_world.js that prints “Hello World” to the console when run with Node.❞

[cursor\_hello\_world\_test\_file.txt](https://forum.cursor.com/uploads/short-url/oVPm3dA3JYwMVeHN9joOvE2cg3h.txt) (944 Bytes)

### Expected Behavior

The new file should have LF line endings.

### Operating System

Windows 10/11

### Version Information

Version: 2.6.22 (user setup)  
VSCode Version: 1.105.1  
Commit: c6285feaba0ad62603f7c22e72f0a170dc8415a0  
Date: 2026-03-27T15:59:31.561Z  
Build Type: Stable  
Release Track: Default  
Electron: 39.8.1  
Chromium: 142.0.7444.265  
Node.js: 22.22.1  
V8: 14.2.231.22-electron.0  
OS: Windows\_NT x64 10.0.19045

### For AI issues: which model did you use?

Composer 2  
Opus 4.6

### Additional Information

This is causing headaches for our team. I’m guessing developers at Cursor are Mac-centric, but we would really appreciate if you could give this some attention. Fancy new features are not valuable if editor basics are broken.

**This bug report is a DUPLICATE of the first one below (151096).** I am re-reporting because that one no longer allows comments, and Cursor’s bug reporting guidelines say that bugs affecting more users will get more attention. I see no other way to let the Cursor team know that this is still an issue affecting Windows users.

Issues with Cursor converting LF to CRLF or creating files with CRLF despite LF settings have been reported repeatedly for the past 2 months.

* * *

New files (DUPLICATE of this bug report)

2/6/2026

> [@Incorrect line-endings on new files](https://forum.cursor.com/t/incorrect-line-endings-on-new-files/151096):
>
> Where does the bug appear (feature/product)? Cursor IDE Describe the Bug For the last week or so all new files generated by the agent have CRLF instead of LF line-endings. I have had the agent investigate this (both Opus and GPT) and they have both concluded that it is not a configuration issue. This also happens with cursor-cli. (I have to convert line endings manually because bash scripts do not run correctly with CRLF on macOS) Opus 4.6 conclusion: "OK, so here’s the full picture. Every r…

* * *

Changing files

1/30/2026

> [@Cursor converts line endings on Windows](https://forum.cursor.com/t/cursor-converts-line-endings-on-windows/150424):
>
> Where does the bug appear (feature/product)? Cursor IDE Describe the Bug This is a carry-over of issue #3537 on GitHub. Unfortunately, all of the discussion is lost there. From time to time, on Windows, Cursor will wholesale replace CR/LF endings with LF endings. This slows down my workflow because I need to manually open each affected file and restore the line endings. This has been consistently happening for many months. I’ve never had this problem with vanilla VS Code after many years of us…

2/1/2026

> [@Cursor update changed line endings in entire codebase without consent](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566):
>
> Where does the bug appear (feature/product)? Cursor IDE Describe the Bug After updating Cursor, it automatically converted line endings (LF→CRLF) in a large legacy file (47,000+ lines), mixing legitimate code changes with line ending changes. This happened even with AI in “Ask Mode” (read-only). Steps to Reproduce When there is a popup for new version update, click the update button. Expected Behavior Cursor should preserve existing line endings by default Updates should not modify editor …

2/4/2026

> [@AI-edited files get corrupted (CRLF→LF conversion) on IDE restart, causing data loss risk](https://forum.cursor.com/t/ai-edited-files-get-corrupted-crlf-lf-conversion-on-ide-restart-causing-data-loss-risk/150828):
>
> Where does the bug appear (feature/product)? Cursor IDE Describe the Bug When Cursor’s AI modifies files on Windows, the IDE caches the AI’s version. Even after converting line endings to CRLF and saving to disk, on IDE restart Cursor restores its cached version (with LF), silently and without user consent overwriting the correct file. This does NOT happen for every AI-edited file - additional trigger conditions are unknown Only AI-modified files are affected, not other files Corruption does …

2/12/2026

> [@Unexpected File Modification on Startup](https://forum.cursor.com/t/unexpected-file-modification-on-startup/151638):
>
> Where does the bug appear (feature/product)? Cursor IDE Describe the Bug Whenever I open Cursor or the IDE performs a background scan, several files are marked as “Modified” in the Source Control (Git) tab. Upon inspecting the diff, there are no actual code changes; the only difference is the line separator (e.g., from CRLF to LF or vice versa). This leads to “ghost” changes that clutter the commit history and require manual rollbacks. Steps to Reproduce Open a project in Cursor that has a sp…

2/9/2026

> [@Formatting issues with Cursor](https://forum.cursor.com/t/formatting-issues-with-cursor/151376):
>
> The editor automatically modifies file formatting (spaces, line endings, indentation) when opening a project, causing Git to mark files as modified with only whitespace changes and introducing many irrelevant changes on commit. Version Information: Version: 2.4.31 (user setup) VSCode Version: 1.105.1 Commit: 3578107fdf149b00059ddad37048220e41681000 Date: 2026-02-08T07:42:24.999Z Build Type: Stable Release Track: Default Electron: 39.2.7 Chromium: 142.0.7444.235 Node.js: 22.21.1 V8: 14…

### Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

---

<div class="post-metadata">

**Author:** ![Nick\_Williams](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@Nick\_Williams](https://forum.cursor.com/u/Nick_Williams)\
**Post date:** [April 16, 2026, 9:23am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/18 "2026-04-16T09:23:27Z")

</div>

This issue “seemed” to be fixed for a cpl of versions recently, but is back - i am running 3.1.10 - would be good to get some acknowledgment from the cursor team of this???

---

<div class="post-metadata">

**Author:** ![Matthew\_Olenik](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@Matthew\_Olenik](https://forum.cursor.com/u/Matthew_Olenik)\
**Post date:** [April 23, 2026, 1:16am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/19 "2026-04-23T01:16:30Z")

</div>

This issue is very much still present. It seems that fixes followed by regressions are a very common problem with Cursor. To clarify, this is happening on macOS, in a codebase that never had CRLF ever in it before, ever.

---

<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 15, 2026, 1:17am UTC](https://forum.cursor.com/t/cursor-update-changed-line-endings-in-entire-codebase-without-consent/150566/21 "2026-05-15T01:17:15Z")

</div>

Closed on May 15, 2026, 1:17am UTC

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