[Bug] Unintended file deletion: Claude deleted untracked file outside requested scope
Resolved 💬 5 comments Opened Apr 6, 2026 by jeffrigby Closed May 17, 2026
Bug Description
Claude somehow bypassed permssion and deleted an untracked file. It wasn't even what I asked it to do. Something is wrong here.
It ran an rm <file> without asking. I asked how and got this response:
You're right — rm is not in your allow list. Looking at your permissions, there's no Bash(rm:*) pattern. The system should have prompted you for approval before executing that command.
That looks like a bug. I'd recommend reporting it at https://github.com/anthropics/claude-code/issues — the rm command bypassed the permission prompt despite not matching any allowed Bash pattern in your settings.local.json.
I don't see rm or any pattern that would match it in either file. No Bash(rm *), no Bash(rm:*), no wildcard Bash(*) that would catch everything.
Both your local (settings.local.json) and global (~/.claude/settings.json) permission allow lists are carefully scoped — rm isn't covered by any of them. This looks like a genuine bug in the permission matching. Good that you filed the
feedback.
Environment Info
- Platform: darwin
- Terminal: webstorm
- Version: 2.1.90
- Feedback ID: 861e0a1d-60c4-4630-9c72-0f9e19e0d07a
Errors
[{"error":"AxiosError: Request failed with status code 404\n at tg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12738)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-03T19:54:24.059Z"},{"error":"AxiosError: Request failed with status code 404\n at tg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12738)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-03T19:54:27.601Z"},{"error":"AxiosError: Request failed with status code 404\n at tg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12738)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-03T19:54:34.771Z"},{"error":"AxiosError: Request failed with status code 404\n at tg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12738)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-03T19:54:36.434Z"},{"error":"RangeError: path should be a `path.relative()`d string, but got \"..\"\n at L04 (/$bunfs/root/src/entrypoints/cli.js:435:12284)\n at Sn (/$bunfs/root/src/entrypoints/cli.js:435:12457)\n at _test (/$bunfs/root/src/entrypoints/cli.js:435:12995)\n at lY (/$bunfs/root/src/entrypoints/cli.js:7609:8643)\n at xfH (/$bunfs/root/src/entrypoints/cli.js:7609:11241)\n at o7H (/$bunfs/root/src/entrypoints/cli.js:7609:10278)\n at checkPermissions (/$bunfs/root/src/entrypoints/cli.js:2813:3113)\n at Io1 (/$bunfs/root/src/entrypoints/cli.js:4963:1416)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4963:3706)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8061:20040)","timestamp":"2026-04-03T19:54:41.073Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at readSync (unknown)\n at readSync (/$bunfs/root/src/entrypoints/cli.js:51:1553)\n at GpH (/$bunfs/root/src/entrypoints/cli.js:120:10594)\n at aS (/$bunfs/root/src/entrypoints/cli.js:121:181)\n at WG (/$bunfs/root/src/entrypoints/cli.js:123:54)\n at sP5 (/$bunfs/root/src/entrypoints/cli.js:7937:8926)\n at j (/$bunfs/root/src/entrypoints/cli.js:7937:8143)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:7937:8473)\n at J_ (/$bunfs/root/src/entrypoints/cli.js:478:63096)\n at JS (/$bunfs/root/src/entrypoints/cli.js:478:76158)","timestamp":"2026-04-03T19:54:41.098Z"},{"error":"RangeError: path should be a `path.relative()`d string, but got \"..\"\n at L04 (/$bunfs/root/src/entrypoints/cli.js:435:12284)\n at Sn (/$bunfs/root/src/entrypoints/cli.js:435:12457)\n at _test (/$bunfs/root/src/entrypoints/cli.js:435:12995)\n at lY (/$bunfs/root/src/entrypoints/cli.js:7609:8643)\n at xfH (/$bunfs/root/src/entrypoints/cli.js:7609:11241)\n at o7H (/$bunfs/root/src/entrypoints/cli.js:7609:10278)\n at checkPermissions (/$bunfs/root/src/entrypoints/cli.js:2813:3113)\n at Io1 (/$bunfs/root/src/entrypoints/cli.js:4963:1416)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4963:3706)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8061:20040)","timestamp":"2026-04-03T19:54:42.034Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at readSync (unknown)\n at readSync (/$bunfs/root/src/entrypoints/cli.js:51:1553)\n at GpH (/$bunfs/root/src/entrypoints/cli.js:120:10594)\n at aS (/$bunfs/root/src/entrypoints/cli.js:121:181)\n at WG (/$bunfs/root/src/entrypoints/cli.js:123:54)…
Note: Content was truncated.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗