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 relevant setting is configured for LF:
Setting Value Would cause CRLF?
files.eol (Cursor user settings) “\n” (LF) No
.gitattributes *.py text eol=lf No
.editorconfig Not present N/A
.vscode/settings.json No eol setting N/A
.cursor/settings.json Not present N/A
core.autocrlf (global/local/system) Not set No
core.eol Not set No
Your configuration is all correct for LF. The CRLF is being introduced by Cursor’s AI agent file-writing tools themselves. When the agent creates or writes a file via its internal Write/StrReplace tools, the content passes through an API layer that appears to use CRLF line endings regardless of your files.eol setting. This is a known Cursor bug/behavior — the agent tooling doesn’t honour the editor’s EOL preference when writing files."
Steps to Reproduce
Configure your environment for LF line-endings and ask the agent to create a hello world python app.
Expected Behavior
It should generate files with LF line-endings when the IDE is configured for it.
Operating System
MacOS
Version Information
Version: 2.4.28
VSCode Version: 1.105.1
Commit: f3f5cec40024283013878b50c4f9be4002e0b580
Date: 2026-02-03T00:56:18.293Z
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: Darwin arm64 21.6.0
For AI issues: which model did you use?
Opus 4.6 thinking, GPT-5.2 High thinking
Does this stop you from using Cursor
No - Cursor works, but with this issue