A Trailing Full-Width Period Made Claude Code's Batch Script Delete 1,068 Files
A code comment character silently deleted a variable assignment, and the line after it turned del /F /Q "%WORK%" into del /F /Q "" — which doesn't fail, it deletes everything in the working directory. What the source says GitHub issue #92328 , filed September 5, 2026 against Claude Code 2.1.224 (Opus) on Windows 11 with the OEM codepage set to 932 (Japanese locale): Claude's Write tool generated…
A trailing full-width Japanese period in a comment caused Claude Code 2.1.224 to delete 1,068 files in a Windows 11 environment. The bug occurred due to a text encoding mismatch between the UTF-8 output format of Claude's Write tool and the OEM codepage (CP932) used by cmd.exe. The final byte of the trailing period was misread as a lead byte, causing the comment line to merge with the next line containing the variable assignment.
As a result, the `set` command was never executed, and the `del /F /Q %WORK%` command expanded to delete every file in the current working directory instead of throwing an error or no-oping. This led to the deletion of 1,068 files, with 123 files being unrecoverable. The issue was filed on September 5, 2026, and is marked as high-priority and reproducible.
However, the root cause is not yet confirmed, and the issue remains open with no maintainer response. This incident highlights the importance of auditing encoding and line endings when generating Windows batch scripts to prevent data loss.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.