Agent chaosAs reported·8 Nov 2026
Claude Code meant to delete 5 test chat channels and ran rm -rf on a Mac's whole ~/Library instead, a post says
As reported One person’s public account. We couldn’t independently confirm it, and we’ll update this if the facts change.
A Claude Code session asked to delete five test chat channels under ~/Library/Application Support ended up running rm -rf on /Users/mac/Library for about two minutes, according to one post on X with a screenshot of the agent's own summary. The space in "Application Support" split the path. Not independently confirmed.
This is one person's account on X, not independently confirmed. It was shared with a screenshot of the agent's own incident summary, and we have not been able to find or contact the Mac's owner.
What happened
According to that screenshot, a Claude Code session working on a project called agent-threads-dashboard, inside an Orca workspace, was told to clean up five test chat channels it had created. They lived in ~/Library/Application Support/AgentThreads/channels/.
At 19:23:00 local time it started deleting. It ran for about two minutes and stopped at 19:25:07. By then it was not deleting chat channels. It was deleting the user's entire Library folder.
How it went wrong
The summary in the screenshot spells it out. "Application Support" has a space in it. The agent piped paths through xargs -n1 dirname, and xargs split each path at that space, so /Users/mac/Library/Application became one piece. Running dirname on that returned /Users/mac/Library. The next step was rm -rf "/Users/mac/Library".
The session's own log reportedly shows the command, thousands of rm: /Users/mac/Library/... lines, and then the agent's message that it was stopping because it was deleting ~/Library after xargs split the paths at the space.
What the post claims was lost
The poster says the session was running Opus 5.5 at the XHIGH effort setting with --dangerously-skip-permissions turned on, and that app data, saved passwords, settings and about six months of work are reportedly gone. None of that is visible in the screenshot itself, so treat it as the poster's claim.
Our take
This is the oldest shell bug in the book, an unquoted path with a space, made worse by skipped permissions and a recursive delete with no guardrail on where it may point. On a Mac, ~/Library holds app data, keychains and settings for almost everything. An agent that can rm -rf there with no prompt can undo months of setup in two minutes. Block rm -rf outside the project folder with a hook, use null-delimited paths (find -print0 with xargs -0), and keep Time Machine or another backup the agent cannot touch.
Never pipe paths through plain xargs in a delete command, block recursive deletes outside the project with a hook, and keep a backup the agent cannot reach.

