[BUG] Claude Code VS Code extension truncates HTML files on save (LF→CRLF rewrite chops trailing scripts)
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?
Claude Code for VS Code extension (latest, installed 2026-05-27) silently truncated several large HTML files in my project when saving. Trailing <script> blocks, </body>, and </html> tags were cut off. Line endings flipped from LF to CRLF on the same files.
What Should Happen?
Disabling Claude Code stopped the issue. Files were ~700-900 lines, contained inline <style> and <script type="module"> blocks. Windows 11, VS Code latest, only other extension was Live Server.
Error Messages/Logs
Steps to Reproduce
Disabling Claude Code stopped the issue. Files were ~700-900 lines, contained inline <style> and <script type="module"> blocks. Windows 11, VS Code latest, only other extension was Live Server.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
5-2026
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗