Skip to content

[BUG] Claude is ignoring allow permissions in global settings.json #18160

@mieubrisse

Description

@mieubrisse

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

  1. Add Bash(ls *) to the permissions.allow array in ~/.claude/settings.json:
    {
      "permissions": {
        "allow": [
          "Bash(ls *)"
        ]
      }
    }
  2. Start a Claude Code session
  3. Request Claude to execute ls -la ~/.claude/
  4. 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:

  1. Tilde expansion timing: The pattern may be evaluated before shell tilde (~) expansion occurs, causing the literal string ~/.claude/ not to match the expected pattern
  2. Wildcard matching edge case: The wildcard * in Bash(ls *) may not properly handle certain combinations of flags and path arguments
  3. Pattern precedence or parsing: There may be an issue with how the command string is parsed before pattern matching

Questions for clarification:

  1. Is Bash(ls *) expected to match ls -la ~/.claude/?
  2. What is the correct pattern syntax to allow all ls commands regardless of flags and paths?
  3. Should multiple patterns be required (e.g., both Bash(ls) and Bash(ls *), or Bash(ls:*))?
  4. 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 work
  • Bash(pwd *) - appears to work
  • Bash(git status *) - appears to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions