[BUG] Edit/Write tools convert CRLF to LF on Windows, breaking Delphi projects
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I am in Windows with Delphi projects
My files originally had CRLF line endings
When Claude Code edits files using Edit/Write tools, they're saved with LF endings
RAD Studio/Delphi requires CRLF and shows warnings
This seems to be a recent change as it hadn't been happeing up to today.
Windows 11. Sonnet 4.5, Claude Cod Max. OpeusPlan. Files affected are Delphi 'text' type files. i.e. .pas, .dfm, /dpr, etc.
What Should Happen?
Tools should preserve original line endings or respect Windows default (CRLF)
Error Messages/Logs
Steps to Reproduce
Ask Claude code to make some changes to a Delphi source file.
Claude Model
Other
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.12
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Workable but unacceptable Workaround: Running unix2dos after every edit
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗