-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report
- I am using the latest version of Claude Code
What's Wrong?
The Bash permission pattern Bash(ls *) in settings.json is not matching the command ls -la ~/.claude/, requiring user approval despite the pattern being in the allow list.
When Claude attempts to execute ls -la ~/.claude/, the user is prompted for permission even though Bash(ls *) is explicitly configured in the permissions.allow array.
What Should Happen?
The command ls -la ~/.claude/ should be automatically allowed without requiring user approval, as it should match the pattern Bash(ls *) which is intended to allow any ls command with any arguments.
Error Messages/Logs
No error messages - the command simply requires manual approval instead of being auto-approved by the permission pattern.
Steps to Reproduce
- Add
Bash(ls *)to the permissions.allow array in~/.claude/settings.json:{ "permissions": { "allow": [ "Bash(ls *)" ] } } - Start a Claude Code session
- Request Claude to execute
ls -la ~/.claude/ - Observe that Claude prompts for permission approval
Expected: Command executes without permission prompt
Actual: User is prompted to approve the command
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Claude Code Version
Latest (as of 2026-01-14)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
Current settings.json configuration:
{
"permissions": {
"allow": [
"Bash(grep *)",
"Bash(ls *)",
"Bash(pwd *)",
"Bash(mkdir *)",
...
]
}
}Settings file location: ~/.claude/settings.json (symlinked to ~/app/dotfiles/claude/settings.json)
System info:
- OS Version: Darwin 24.4.0
- Platform: darwin
Hypotheses about the issue:
- Tilde expansion timing: The pattern may be evaluated before shell tilde (
~) expansion occurs, causing the literal string~/.claude/not to match the expected pattern - Wildcard matching edge case: The wildcard
*inBash(ls *)may not properly handle certain combinations of flags and path arguments - Pattern precedence or parsing: There may be an issue with how the command string is parsed before pattern matching
Questions for clarification:
- Is
Bash(ls *)expected to matchls -la ~/.claude/? - What is the correct pattern syntax to allow all ls commands regardless of flags and paths?
- Should multiple patterns be required (e.g., both
Bash(ls)andBash(ls *), orBash(ls:*))? - Is there a known limitation with special characters (tilde, dots) in path arguments affecting pattern matching?
Related patterns that also exist in the allow list and work correctly:
Bash(grep *)- appears to workBash(pwd *)- appears to workBash(git status *)- appears to work