[Bug] Write Tool Creates CRLF Line Endings on Linux Platform
Resolved 💬 2 comments Opened Aug 29, 2025 by mattgodbolt Closed Aug 29, 2025
Bug Description
Issue: The Write tool appears to create files with CRLF (Windows) line endings even when running on Linux.
Evidence:
- Platform: Linux (from env info)
- Created typing-effect.js using Write tool
- File has CRLF line endings according to file command
- This is inconsistent with Linux convention (should be LF only)
Impact: Creates files with wrong line endings for the platform, causing issues with git diffs and potential problems with some tools.
Suspected cause: The Write tool might be using \r\n internally regardless of platform, or preserving line endings from how the content string was constructed.
This does seem like a bug worth reporting - tools should respect the platform's line ending conventions when creating new files.
Environment Info
- Platform: linux
- Terminal: gnome-terminal
- Version: 1.0.96
- Feedback ID: 012b9b13-a8c8-49c9-a99d-23dba54fec6a
Errors
[{"error":"SyntaxError: JSON Parse error: Unexpected identifier \"I\"\n at <parse> (:0)\n at parse (unknown)\n at <anonymous> (/$bunfs/root/claude:554:9928)\n at W (/$bunfs/root/claude:492:13280)\n at bEG (/$bunfs/root/claude:944:1928)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-08-29T12:31:53.390Z"},{"error":"Error: Could not load the \"sharp\" module using the linux-x64 runtime\nPossible solutions:\n- Ensure optional dependencies can be installed:\n npm install --include=optional sharp\n- Ensure your package manager supports multi-platform installation:\n See https://sharp.pixelplumbing.com/install#cross-platform\n- Add platform-specific dependencies:\n npm install --os=linux --cpu=x64 sharp\n- Consult the installation documentation:\n See https://sharp.pixelplumbing.com/install\n at <anonymous> (/$bunfs/root/claude:305:37169)\n at <anonymous> (/$bunfs/root/claude:12:838)\n at <anonymous> (/$bunfs/root/claude:306:78)\n at <anonymous> (/$bunfs/root/claude:12:838)\n at <anonymous> (/$bunfs/root/claude:306:79845)\n at <anonymous> (/$bunfs/root/claude:12:838)\n at <anonymous> (/$bunfs/root/claude:694:1708)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-08-29T12:44:59.711Z"},{"error":"Error: Request was aborted.\n at new XY (unknown:1:28)\n at new V9 (/$bunfs/root/claude:799:1962)\n at new nQ (/$bunfs/root/claude:799:2750)\n at makeRequest (/$bunfs/root/claude:816:3864)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-08-29T12:45:08.294Z"},{"error":"TypeError: (Y.default||Y) is not a function. (In '(Y.default||Y)(Z)', '(Y.default||Y)' is an instance of Object)\n at CW0 (/$bunfs/root/claude:694:1731)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-08-29T12:59:27.398Z"},{"error":"TypeError: (Y.default||Y) is not a function. (In '(Y.default||Y)(Z)', '(Y.default||Y)' is an instance of Object)\n at CW0 (/$bunfs/root/claude:694:1731)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-08-29T12:59:50.843Z"},{"error":"Error: Request was aborted.\n at new XY (unknown:1:28)\n at new V9 (/$bunfs/root/claude:799:1962)\n at new nQ (/$bunfs/root/claude:799:2750)\n at _createMessage (/$bunfs/root/claude:807:7955)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-08-29T13:00:08.011Z"},{"error":"Error: Request was aborted.\n at new XY (unknown:1:28)\n at new V9 (/$bunfs/root/claude:799:1962)\n at new nQ (/$bunfs/root/claude:799:2750)\n at makeRequest (/$bunfs/root/claude:816:3864)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-08-29T13:54:43.986Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗