Menu

1 / 2

An empty variable turned rm -rf and rsync --delete into "delete /". Coding agents did it three times this fall

DEV Community: opensource·Myeongseok Kang·2 days ago
#isEY4om6
#devtoopensource#devto#dev#command#delete
Reading 0:00
15s threshold

Three reports on the Claude Code issue tracker this autumn describe the same accident from different angles. In each one an agent built a destructive command around a value it never printed, the value came out empty or pointed at a drive root, and the command did exactly what it said.

Three incidents

#95426 , Windows with Git Bash. As a "clear old test state" step the agent ran:

rm -rf "$(cygpath -u 'C:\')" 2 > /dev/null

Enter fullscreen mode

Exit fullscreen mode

cygpath -u 'C:\' prints /c/ , the whole drive. stderr went to /dev/null , so nothing appeared on screen while it ran for about 35 minutes. The reporter lost roughly 600 GB, including the Windows user profile and several git repositories.

#109735 , Windows with WSL, opened this week.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.