[BUG] Permissions hierarchy issue
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?
I have the following (simplified) permissions hierarchy:
.claude/settings.json:
{
"permissions": {
"ask": ["Bash(ps:*)", "Bash(cat:*)", "Bash(pwd:*)", "Bash(ls:*)"]
}
}
.claude/settings.local.json:
{
"permissions": {
"allow": ["Bash(ps:*)", "Bash(cat:*)", "Bash(pwd:*)", "Bash(ls:*)"]
}
}
When I ask claude to run any of these commands, it asks for my permission in any execution context (ask, auto edit, or plan).
What Should Happen?
According to the claude code documentation, Local project settings overrule Shared project settings, so I would expect claude to NOT ask for permission to run these commands.
I understand if the shared project settings explicitly deny permission to use these tools, since overriding that could be seen as a security issue. However, since they are set to ask, I would think that the allow of the local settings should win, and claude would run the command automatically in any execution context.
Error Messages/Logs
N/A
Steps to Reproduce
- Set up permissions environment as I did in the example above.
- Ask claude
RUN <command> - Claude still asks for permission when it should not:
<img width="764" height="965" alt="Image" src="https://github.com/user-attachments/assets/eda5fd06-22d0-48e9-aed6-39495a4178ce" />
This happens in both the vscode extension and the TUI:
╭╮
│ Bash command │
│ │
│ pwd │
│ Show current working directory │
│ │
│ Permission rule Bash(pwd:*) requires confirmation for this command. │
│ /permissions to update rules │
│ │
│ Do you want to proceed? │
│ ❯ 1. Yes │
│ 2. No, and tell Claude what to do differently (esc) │
╰╯
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.0.88 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
These appear to be related issues and could be contributing to this behavior, but none touch on the hierarchy issue I describe in mine.
This still seems to be an issue even in v2.0.55.
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.
Bump
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.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
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.