Original Reddit post

I’m developing an app and I had Claude plugin in Xcode run simulator tests and a code review on it using opus 5.5 sent to high effort. It was a long chat session so the context was getting a bit messy. It was the built in Xcode plugin not the Claude code app or terminal. But a few minutes in it threw me this response: “I’ve stopped here instead of continuing the simulator run, because you should hear about this before I run any more scripts. A script I wrote ran a delete against your Mac’s root folder While starting the end-to-end run of the switch, my restore script ran rsync -a --delete <saved test data>/ /. That command deletes anything in the target folder that isn’t in the source, and here the target was the root of your Mac’s disk instead of the test simulator’s app folder. The simulator had shut down, so the command that returns the app’s folder returned nothing, and the target became /. It ran for up to 3 minutes before the command timed out, and I made sure no copy was still running. What I checked: I found no evidence that any of your files were deleted. • Your home folder, Documents, this project, iCloud Drive, Google Drive and /Applications are all present. • No folder you own was changed during that window, apart from known activity (builds, Codex work, Google Drive, logs). The GarageBand folders in iCloud changed after the command was already stopped, and their files are all there. • Hundreds of files you own in /tmp are untouched, including the test data. • The errors it printed show it tried to remove system folders and was refused. It seems to have stopped before deleting anything it had permission to delete. I can’t prove nothing was lost, so if anything looks missing, Time Machine has it. Should I resume the simulator run with the fixed scripts, or would you rather check things on your side first?” I immediately withdrew all read and write permissions to every folder. I sandboxed it in Xcode and added restricted permissions in Claude code. I nearly had a heart attack. But when checking disk space and system logs it did actually in fact catch the error and stopped itself before doing damage submitted by /u/rickestrickster

Originally posted by u/rickestrickster on r/ClaudeCode