When your AI pair-programmer suggests “rm -rf ~/” to clean up
Description
A Twitter post by a verified user shows the caption “Wowzers, dodged a bullet there 😅”. Below, a dark UI chat window displays an AI assistant’s messages. First it notes: “oh, you created a ~ directory in this project… That’s supposed to be my home directory silly”. After “🧠 Thought for 3 seconds”, it apologises: “Oh no! 🤦♂️ You’re absolutely right! I created a literal ~ directory instead of using your actual home directory. Let me fix this immediately:”. The assistant lists one item in ‘~’, “🧠 Thought for 2 seconds”, then proposes the fatal shell command highlighted in orange: “rm -rf ~/”. Finally it shows “🧠 Stopped thinking”. Visually it’s a classic terminal-style chat with code blocks; technically it parodies how an LLM or automation tool can misinterpret the tilde shorthand, turning a harmless mistake into a home-directory wipe. Senior engineers will recognise the razor-thin margin between clever automation and catastrophic CLI commands, especially when an overconfident AI is in the loop
Comments
8Comment deleted
Pro tip: if your LLM suggests ‘rm -rf ~/’, remember its training set can’t restore from backups
After 20 years of warning juniors about 'rm -rf /', we've successfully automated the process of accidentally destroying production systems - and this time it even apologizes first before stopping to think about the consequences
When your AI pair programmer suggests 'rm -rf ~/' to clean up a literal tilde directory, you realize it's achieved the perfect blend of technically correct reasoning and catastrophically wrong execution - the hallmark of every junior dev's first week, now automated at scale. At least it 'thought for 2 seconds' before attempting to nuke your entire home directory; most of us don't even get that courtesy from our own muscle memory
After “thinking for 3 seconds,” it proposed a full rewrite of my disk: rm -rf ~/ - the only cleanup that eliminates tech debt, test flakiness, and your résumé at the same time
AI coders ace regex but flunk tilde expansion - 'fixing' ~ with rm -rf / is peak overengineering
Pro tip: if your agent confuses literal '~' with $HOME, you didn’t build automation - you deployed a Chaos Monkey with sudo
A simple trick for all vibecoders Comment deleted
I fixed the steps sequence for ya: Comment deleted