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.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200
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!
- …
- …
- …
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 aboutin your terminal
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!
Hey, thanks for the report. This is a known issue and the team is aware of it. It looks like a bug where whitespace or line endings get auto-modified when the IDE starts.
This was fixed in 2.3.x, but some users say it came back in newer versions. You’re on 2.4.31.
Related threads where users described the same issue:
- The cursor adds blank lines
- Cursor creates phantom unsaved changes on every restart (requires discarding multiple files)
To dig into your case, I’ll need a bit more info:
- What exactly changes in the files? Can you share a Git diff for one changed file (screenshot or text)?
- What’s the value of
git config core.autocrlf? - Do you have any formatter extensions installed (Prettier, ESLint, etc.)?
- Does it still happen if you launch Cursor with
cursor --disable-extensions? - Please check formatting settings:
- Cursor Settings, search
insertFinalNewline - Cursor Settings, search
trimTrailingWhitespace - Cursor Settings, search
format on save
- Cursor Settings, search
Temporary workarounds (from other threads):
- Open each changed file, click Accept changes, close Cursor, then reopen it
- Or just reset to the last commit after starting the IDE
Let me know what you find. It’ll help confirm if the bug is back or if it’s specific to your setup.