Skip to content

[Bug] Unsafe rm command execution deletes entire home directory #12637

Closed as not planned

Description

@JeffreyUrban

Bug Description
In a previous session, claude created a directory named ~ in error, and then ran rm -rf * in the parent directory, which the shell expanded to include my home directory, so it proceeded to start wiping my home directory. It would be great if you could catch either of these steps and prevent claude from taking these actions... at least stopping and asking if that's really what you want to do. I'd suggest that rm -rf * should never be done (list specific directories instead) and the presence of a directory named ~ is problematic (seems some glitch resulted in that directory). Loving claude, but this was and is continuing to be super frustrating to recover from.

Environment Info

  • Platform: darwin
  • Terminal: pycharm
  • Version: 2.0.55
  • Feedback ID:

Errors

[{"error":"Error: Plugin source missing\n    at lR0 (/$bunfs/root/claude:1528:36819)\n    at lR0 (/$bunfs/root/claude:1528:37506)\n    at bw8 (/$bunfs/root/claude:1529:4122)\n    at bw8 (/$bunfs/root/claude:1529:4194)\n    at Sw8 (/$bunfs/root/claude:1529:1623)\n    at Sw8 (/$bunfs/root/claude:1529:1925)\n    at <anonymous> (/$bunfs/root/claude:1530:3002)\n    at <anonymous> (/$bunfs/root/claude:1530:3197)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-28T16:33:10.210Z"},{"error":"Error\n    at dU (/$bunfs/root/claude:27:1143)\n    at <anonymous> (/$bunfs/root/claude:32:10086)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:34:2147)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-28T16:33:10.270Z"},{"error":"Error\n    at dU (/$bunfs/root/claude:27:1143)\n    at <anonymous> (/$bunfs/root/claude:32:10086)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:34:2147)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-28T16:33:10.288Z"},{"error":"Error\n    at dU (/$bunfs/root/claude:27:1143)\n    at <anonymous> (/$bunfs/root/claude:32:10086)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:34:2147)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-28T16:33:10.348Z"},{"error":"Error\n    at dU (/$bunfs/root/claude:27:1143)\n    at <anonymous> (/$bunfs/root/claude:32:10086)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:34:2147)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-28T16:36:32.627Z"}]

Activity

  1. github-actions commented on Nov 28, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] ## CRITICAL: Claude Code executed rm -rf deleting entire home directory #10077
    2. Critical: rm -rf command deleted parent directory instead of subdirectory #10978
    3. [BUG] Claude code ran rm -rf command without permission #6608

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. JeffreyUrban commented on Nov 28, 2025

    @JeffreyUrban
    Author

    Not a duplicate of #10077, #10978, #6608

    Claude executed rm -rf * without asking or permissions. --dangerously-skip-permissions was not enabled.

  3. MarcinOrlowski commented on Dec 11, 2025

    @MarcinOrlowski

    That's one of the reasons I jailed Claude in Docker container.

  4. github-actions commented on Jan 11, 2026

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  5. github-actions commented on Feb 11, 2026

    @github-actions

    This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

  6. github-actions commented on Feb 21, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  7. locked as resolved and limited conversation to collaborators on Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions