Cursor modifying files on startup

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor is triggering git changes to files on startup. Seems to be from old chats.

Steps to Reproduce

On windows. Commit all changes to branch (note I’m doing this outside of cursor). Close Cursor IDE and reopen. A bunch of prior files are edited as GIT changes. Most of the time there doesn’t seem to be any changes to the files. Maybe hidden chars? Sometimes its old changes though. I’ve tried archiving all previous Agent Chats and it still does it. Anyone else seen this? I’m on 2.0.54, but its been happening for a while.

Expected Behavior

I shouldn’t have any GIT change tracking changes on startup of the Cursor IDE.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.54 (user setup)
VSCode Version: 1.99.3
Commit: 7a31bffd467aa2d9adfda69076eb924e9062cb20
Date: 2025-11-03T22:40:44.657Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

9 Likes

Hey, thanks for the report. This is unusual, and I’d like to gather more details to diagnose it.

Please share:

  • Which files are being modified? Are these the same files Agent/Composer worked on before?
  • What does git show? For example, whitespace-only changes, line ending changes CRLF ↔ LF, or actual code edits?
  • Does it still happen if you:
  • Start Cursor with extensions disabled? (command: cursor --disable-extensions)
  • Open a different/fresh project?
  • Git config: what’s your core.autocrlf value? (command: git config core.autocrlf)
  • Do you have format-on-save settings or extensions like Prettier/ESLint that might auto-format files when Cursor opens them?

Screenshots of the git diff would be very helpful too.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After a Cursor update or sometimes opening a project - Git changes lists a bunch of files that have Changed but there are no code changes just white spaces here and there?

Rather scary!

Steps to Reproduce

Re-open project or after update

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.60 (system setup)
VSCode Version: 1.99.3
Commit: c6d93c13f57509f77eb65783b28e75a857b74c00
Date: 2025-11-05T00:50:54.645Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.19045

Does this stop you from using Cursor

No - Cursor works, but with this issue

It looks like I was able to resolve the issue by reviewing all the prior agent changes and accepting the changes. I have tried reproducing by making additional agent changes, not accepting, and reverting the git changes outside of cursor, but it has no longer produced additional changes on startup. I’ll follow up if it happens again.

2 Likes

Ok it happened again and I have a bit more information.

  • Yes, these are files that were modified in Agent mode from prior chats, but it’s not every file.
  • I tried to select each chat from the history and click the “review” button and accept all the changes” then undo all changes from git (outside of cursor, if it matters), the reopen cursor with the project loading and it will still re-modify the files. These files don’t seem to have any changes
  • However, in Editor view, I see the files flagged as modified, and after selecting them I get UI to undo or keep the change. After I select an option here, I can undo the git changes again, reopen the project, and all other files re-show as modified except the one I reviewed.

It seems there is a process that is trying to identify files that need review and is modifying the file in a way that triggers a git change of the file.

1 Like

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I use cursor with Remote SSH to another machine.

If I close my laptop/disconnect, when I later Reload the cursor window, cursor will insert newlines at the end of files the agent had previously changed.

I believe it only happens for changes that I didn’t hit “Keep” on before disconnecting.

This is frustrating since it can happen for very old agents so I will end up with large git diffs of newline changes.

Steps to Reproduce

Connect to remote vscode workspace.
Run an agent on cursor that will edit some existing files. Then do not accept or reject any of the changes.
Ungracefully interrupt the SSH session (i.e. close laptop/turn off wifi)
Hit Reload Window when it pops up in cursor.
Now the remote workspace will have extra newlines at the end of the files that were edited by the agent.

Expected Behavior

No files should be changed when the window reloads.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.64 (Universal)
VSCode Version: 1.99.3
Commit: 25412918da7e74b2686b25d62da1f01cfcd27680
Date: 2025-11-06T04:35:14.424Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

N/A

For AI issues: add Request ID with privacy disabled

N/A

Does this stop you from using Cursor

No - Cursor works, but with this issue

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Every time Cursor launches, it appends dozens of blank lines to virtually every tracked file in my workspace—Python, Markdown, Vue, etc.—even though the repository is clean when I close it. git status shows hundreds of files touched, and the diffs are nothing but extra trailing newlines (e.g., a single newline becomes ~35). The behavior repeats on every startup and does not occur mid-session.

Steps to Reproduce

Ensure the workspace is clean (git status shows no changes) and all tracked files end with a single newline. .editorconfig either has insert_final_newline = false or is temporarily renamed/removed.
Close all Cursor windows.
Launch Cursor and open the workspace at D:\apps\analytIQ\analytiq5.
Immediately run git status (or inspect any tracked file); hundreds of files show modifications consisting solely of extra trailing blank lines. The issue reappears after every restart.

Expected Behavior

Expected Cursor behavior: when EditorConfig final-newline handling is disabled (or the .editorconfig file is absent), the editor should leave file endings untouched—launching Cursor should not modify a clean working tree or append any newlines automatically. A repo that is clean when you close it should still be clean right after Cursor starts.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.64 (system setup)
VSCode Version: 1.99.3
Commit: 25412918da7e74b2686b25d62da1f01cfcd27680
Date: 2025-11-06T04:35:14.424Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Still happens on Cursor 2.0.69.

Version: 2.0.69
VSCode Version: 1.99.3
Commit: 63fcac100bd5d5749f2a98aa47d65f6eca61db30
Date: 2025-11-07T18:21:29.650Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0


Sample diff:

xxd shows two trailing newlines:

00001430: 6c6c 2061 7661 696c 6162 6c65 2043 6c61  ll available Cla
00001440: 7564 6520 436f 6465 2063 6f6e 6669 6775  ude Code configu
00001450: 7261 7469 6f6e 2073 6574 7469 6e67 7320  ration settings 
00001460: 7769 7468 2063 7572 7265 6e74 2076 616c  with current val
00001470: 7565 7322 290a 7d0a 0a                   ues").}..

I think it also only happens with edits I didn’t accept yet:

1 Like

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

Hi, i’m new here in this Forum.
I want to share a problem.
every time I open cursor in my github Desktop i see many changes with only whitespace. and there are add by cursor every time I open it. there are anyone that have same problem?

I see the option for whitespace only suggestion, but not think it’s working.

Steps to Reproduce

Open Github Desktop and then Open Cursor.

Operating System

Windows 10/11
MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.69
VSCode Version: 1.99.3
Commit: 63fcac100bd5d5749f2a98aa47d65f6eca61db30
Date: 2025-11-07T18:21:29.650Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

This was happening to me today. I managed to resolve this by opening one of the changed files, clicking the Accept all changes, review next file, accept all changes… and so on until all files are accepted.

Then I closed and reopened the cursor window and it didn’t try to append a new line anymore.

@deanrie

1 Like

Need a fix for this! It happens everytime I open cursor on a project !:woozy_face:

The same thing is happening to me. I’ve archived all the chats (I thought it might be due to unaccepted chats), but that’s not the case.

It happens every time I restart Cursor.

I see that in this case could help but in my case no, also cancel the chat help. it will continue and i have more that 30 files with 1 white line that github see as modify

I updated to 2.1.0 and it seemed to run through my files and fixed the issue. Closed and reopened Cursor and there were no files edited.

Never mind, this is still happening. Even in 2.1.6

1 Like

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

It keeps adding new lines + on already finished/commited files every startup

Steps to Reproduce

I would say maybe commit without click to accept / keep edits maybe will be reproduced

Expected Behavior

It should not be adding new lines empty to already commited/finished files

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.77
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0
Date: 2025-11-13T23:10:43.113Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.0.0

For AI issues: which model did you use?

Sonnet 4.5 and Auto

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hello, I have the same issue : blank lines added at the end of files at each cursor startup.

Version: 2.1.26 (user setup)
VSCode Version: 1.105.1
Commit: f628a4761be40b8869ca61a6189cafd14756dff0
Date: 2025-11-24T05:39:06.655Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

1 Like

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I just start Cursor, wait a while without any action and Cursor adds blank lines at the end of some PHP files. I used “some” phrase as I have no idea why it picked these files. I attached a screenshot with only 2 files on tab that were opened. I also attached second screenshot with git diff. Now there are 4 files affected.

Steps to Reproduce

For me it is enough to start Cursor. Each time I launch it, it adds new blank lines to the same files. Maybe it is related to some requests made in the past.

Screenshots / Screen Recordings

Opened tabs

Zrzut ekranu z 2025-11-24 19-54-35

I turned Cursor off and launched again (same files, more empty lines added).

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.54
VSCode Version: 1.99.3
Commit: 5c17eb2968a37f66bc6662f48d6356a100b67be0
Date: 2025-10-21T19:07:38.476Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Linux x64 6.8.0-45-generic

Does this stop you from using Cursor

No - Cursor works, but with this issue

The bug is related with files with not accepted changes from previous chats. However I had got more than 15 files with such changes (3x .js, 1x css and at least 11x .php), but Cursor only changed 4 of them (probably the latest ones).

it’s kinda annoying at this point. it looks like this, just a new empty line every time i open cursor