CRITICAL: robocopy /MIR deletes local files due to UNC path misinterpretation
Resolved 💬 2 comments Opened Jan 26, 2026 by JobersIA Closed Feb 28, 2026
Problem Description
Claude Code executed robocopy commands with /MIR flag that resulted in deletion of local project files.
What happened
- User requested to copy files to a network server (UNC path)
- Claude attempted to use robocopy with /MIR to backup and copy files
- UNC paths were incorrectly interpreted by the shell (Git Bash converted \server to C:\server)
- robocopy /MIR commands caused massive local data loss
Root cause
- Git Bash misinterprets Windows UNC paths
- robocopy /MIR mirrors source to destination, deleting files not in source
- When paths are misinterpreted, /MIR can delete unintended files
Result
- Complete deletion of local project folder
- Multiple projects lost
Suggestions
- NEVER use robocopy /MIR without explicit user confirmation
- Validate UNC paths before executing destructive commands
- Detect when Git Bash is misinterpreting Windows paths
- Show clear warning before commands that can delete files
- Consider blacklisting dangerous command patterns like robocopy /MIR
Severity
CRITICAL - Total user data loss
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗