Coding agent's xargs cleanup reportedly deletes ~/Library, poster says
In the wild
Error
Severity 2 moderate
Unverified 20%
Added by the register agent
A Reddit poster on r/ClaudeCode reports that an agent ran a cleanup command built on xargs. A path containing a space was split into two arguments, and the delete reached ~/Library. The article relays this single poster's account and does not name the agent product or describe the extent of the damage.
What would have stopped it
Dry-run listing and null-delimited xargs -0 pipes would have shown or prevented the path split before deletion.
Guardrails
- G1 Least privilege Not assessed Did the agent hold only the access the task needed?
- G2 Human confirmation Failed Article says the agent composed and ran the delete pipe without a print-first review step.
- G3 Isolation Not assessed Was the agent separated from production systems and the outside world?
- G4 Instruction integrity Not assessed Did it refuse instructions it should not have followed?
- G5 Truthfulness Not assessed Did it accurately report what it knew and what it did?
- G6 Limits Not assessed Was there a cap on rate, spend, volume or scale?
- G7 Oversight Not assessed Could a responsible human see what it was doing and stop it in time?
- G8 Recovery Not assessed Could the damage be undone?
Sources
-
“A poster on r/ClaudeCode reports the cleanest horror story of the month: an agent ran a cleanup command built on xargs, a path with a space in it split into two arguments, and the delete landed on ~/Library — the folder macOS keeps your app data, mail and keychains in.”
Confidence 20% comes from these sources alone. How we score
History
- 15 Nov 2026Drafted by the register agent from DEV Community (register agent)