[BUG] Allowed write commands (e.g. mkdir) still prompt for permission
Status Open
Reported on v2.1.3
Maintainer reply None cached
Activity 7 comments · opened Jan 10, 2026
Summary
Bash commands in the allow list work for read-only and network commands, but still prompt for filesystem write commands. This creates an inconsistent and counterintuitive security model.
Minimal Reproduction
Repo with repro: https://github.com/jameshfisher/claude-code-permissions-bug
- Clone the repo
- Run
claudein the directory - Ask Claude to run
ls -la→ No prompt ✅ - Ask Claude to run
curl -s -I https://example.com→ No prompt ✅ - Ask Claude to run
mkdir -p /tmp/test→ Prompts for permission ❌
Settings
.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(mkdir:*)",
"Bash(ls:*)",
"Bash(curl:*)"
]
}
}
Actual Behavior
| Command | Type | Allow Rule | Result |
|---------|------|------------|--------|
| ls -la | Filesystem read | Bash(ls:*) | ✅ No prompt |
| curl -s -I https://example.com | Network | Bash(curl:*) | ✅ No prompt |
| mkdir -p /tmp/test | Filesystem write | Bash(mkdir:*) | ❌ Prompts |
Things That Don't Help
"sandbox": { "enabled": false }- still prompts- Restarting Claude Code after settings change - still prompts
- The pattern appears correctly in
/permissionsUI - still prompts
Security Model Inconsistency
This is counterintuitive:
curlcan exfiltrate data, download malware, make arbitrary HTTP requests → allowedmkdircreates an empty directory → blocked
Not a Settings Override Issue
Verified no settings are overriding:
~/.claude/settings.json → empty allow/deny lists
~/.claude/settings.local.json → doesn't exist
~/.claude/managed-settings.json → doesn't exist
.claude/settings.local.json → doesn't exist
Related Issues
These are similar but not the same bug:
- #13340 - piped commands, not single commands
- #5140 - user-level settings not applied (project-level works for them)
- #15421 - closed as dupe of #13340
Environment
- macOS (Darwin 24.6.0)
- Claude Code 2.1.3
- Node.js v22
7 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I also looked for source code to debug this, or unit tests to add, but could find neither.
Would love a fix for this :)
I'm also running into this. Claude asks to run mkdir every time even though I have:
I'm having the same issue, tried both of these
as well as my exact command
Bash(mkdir -p 2026-02-05-responses)None worked. My allowlist is configured in
~/.claude/settings.json, and inside CC the/permissionsscreen shows me the expected allow rule. I've included the full json below. I haven't tested every single command exhaustively, but CC seems to respect the allowlist for other write tools such asWriteand all my Linear MCP tools.I checked to make sure I wasn't being overridden by project-level settings, but deleting the project settings file didn't fix this.
I'm on Ubuntu 22.04, running CC v2.1.32 (native install) with Opus 4.6.
Happy to provide additional info as needed.
I bashed my head against this for over an hour. Wish I would have found this first. Very annoying.
A PreToolUse hook auto-approves
mkdirregardless of the permission system's behavior:mkdir,touch, andlnare auto-approved by the hook regardless of what the permission system does or doesn't match.