Claude Code Bug Deleted 1,068 Files via Encoding Mismatch in Windows Batch Script
A GitHub issue filed on September 5, 2026, reports that Claude Code 2.1.224 deleted 1,068 files from a repository root on a Windows 11 system running a Japanese locale. The AI tool generated a .cmd batch script in UTF-8 with LF-only line endings, but Windows' cmd.exe parsed it using the system's OEM codepage CP932, causing a trailing full-width Japanese period in a comment to consume the following newline. This silently merged two lines, preventing a variable assignment from executing and leaving the WORK variable unset. When the deletion command ran with the empty variable, it expanded to delete every file in the working directory instead of failing safely. Of the 1,068 deleted files, 123 were unrecoverable, and the issue remained open with no maintainer response at the time of publication.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in