[BUG] When Bash(mkdir:*) is listed in allowed-tools, Claude still prompts for permission

Resolved 💬 5 comments Opened Mar 14, 2026 by AlexKomanov Closed Apr 11, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When allowed-tools: Bash(mkdir:*) is specified in a custom slash command's .md file (e.g. .claude/commands/do-it.md), Claude still prompts for permission when executing mkdir via the Bash tool. The allowed-tools frontmatter in command files is not being respected.

What Should Happen?

When a custom slash command defines allowed-tools: Bash(mkdir:*) in its markdown file, any mkdir call made during that command's execution should be automatically approved without a permission prompt.

Error Messages/Logs

No error — Claude displays a permission prompt for Bash(mkdir:...) despite allowed-tools being set in the command file

Steps to Reproduce

  1. Create .claude/commands/do-it.md with the following content:

---
allowed-tools: Bash(mkdir:*)
---
Execute tasks: $ARGUMENTS

  1. Run the custom command: /do-it create a new folder with name test
  2. Claude attempts to run mkdir /path/to/test
  3. A permission prompt appears — despite Bash(mkdir:*) being listed in allowed-tools

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

The allowed-tools frontmatter field in custom slash command .md files does not appear to auto-approve the listed tools. This defeats the purpose of scoping permissions per command.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗