Skip to content

Back to the record

Dec 8, 2025Unverified

Claude Code command ending in ~/ expands and wipes a Mac home directory, including the Keychain

Rogue: Caused harmAI loose in the worldData lossDERIVED

Approved by person, Oct 11, 2026. How entries are approved

Showing full summaries.

Claude Code generated and ran 'rm -rf tests/ patches/ plan/ ~/' after a developer asked it to clean up packages in an old repository; the trailing tilde expanded to the home directory. Desktop, Documents, Library, and the Keychain were deleted; TRIM had zeroed the blocks, so nothing was recovered. The Keychain loss broke authentication across every application on the machine, including Claude Code itself, which could no longer reach its own backend.

What this means for youAt home, an AI coding tool can delete personal files and passwords for good if you let it run commands unchecked. At work, keep backups and require approval before an agent runs delete commands. Check that your AI tool asks permission before running commands and that you have an offline backup.

Sources

Incident records from the AI Agent Incident Database by sipi.bot (https://sipi.bot/incidents/), licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).

Source data license: CC BY 4.0. Attribution to sipi.bot is required.

rogue:R4

Covered by snapshot 45

da93f03b406f409940d0a6ef47b526607f82ebf457d98f69299b88aceede576a

This entry is record number 2278. It has not been edited since it was approved; the hash above would not match if it had. How to verify

Claude Code command ending in ~/ expands and wipes a Mac home directory, including the Keychain | Vigilo AI Watch