claude-code - 💡(How to fix) Fix [Bug] Permission allow rules not applied for Bash(mkdir) in skill contexts and default mode [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45089Fetched 2026-04-09 08:13:33
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×6commented ×2

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description Bug: Bash(mkdir *) allow rule in settings.json not applied in certain contexts

Environment: Claude Code v2.1.80+ on Windows 11, permissionMode: default

Settings: Global ~/.claude/settings.json has "Bash(mkdir *)" in permissions.allow.

Issue 1 — Skill execution ignores global allow list: When a custom skill (e.g., /init-guidelines) invokes Bash(mkdir -p guidelines docs/handover), a permission prompt is shown despite the allow rule. Session logs show permissionMode: undefined for skill-initiated tool calls, suggesting the permission mode is not propagated into the skill execution context, causing the allow list to be bypassed.

Issue 2 — Regression in v2.1.80+ default mode: In default permissionMode, Bash(mkdir *) was auto-allowed in v2.1.39–2.1.49 but prompts for every mkdir call since v2.1.80. The same commands auto-allow in acceptEdits and bypassPermissions modes. This suggests the mode-specific check (mkdir only auto-allowed in acceptEdits) now takes precedence over user-defined allow rules.

Evidence: 99 mkdir calls analyzed across 814 sessions. All 16 skill-invoked cases and all default-mode cases on v2.1.80+ triggered prompts. Pattern matching logic itself is correct (/^mkdir( .*)?$/s).

Expected: User-defined allow rules in settings.json should take precedence regardless of permissionMode or skill context.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.96
  • Feedback ID: beaa5c53-01ad-4e48-8c27-bf4d3bc62442

Errors

[]

extent analysis

TL;DR

Review and adjust the permission mode configuration to ensure user-defined allow rules take precedence over default mode settings.

Guidance

  • Verify that the permissions.allow setting in the global ~/.claude/settings.json file is correctly formatted and includes the "Bash(mkdir *)" rule.
  • Check the permissionMode setting in the skill execution context to ensure it is not overriding the global settings.
  • Investigate the difference in behavior between acceptEdits and bypassPermissions modes to understand why the allow rule is being bypassed in the default mode.
  • Test the allow rule with a simple Bash command outside of a skill execution context to confirm it is working as expected.

Example

No specific code example is provided as the issue is related to configuration and permission settings.

Notes

The issue seems to be related to a regression in version 2.1.80+ and the interaction between permission modes and user-defined allow rules. Further investigation is needed to determine the root cause and develop a comprehensive solution.

Recommendation

Apply a workaround by adjusting the permissionMode setting to acceptEdits or bypassPermissions mode, which seem to prioritize user-defined allow rules, until a permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING