Skip to content

Global permission rules not matching paths under ~/Code/ and Bash commands #15421

Description

@grazij
  **Description:**

  Global permission rules in `~/.claude/settings.json` are not being applied correctly. Commands that should be auto-approved based
  on configured rules are still prompting for confirmation.

  **Environment:**
  - OS: macOS (Darwin 25.2.0)
  - Claude Code version: 2.0.61

  **Steps to Reproduce:**

  1. Configure `~/.claude/settings.json` with these permissions:
  ```json
  {
    "permissions": {
      "allow": [
        "Write(~/Code/**)",
        "Write(.claude/**)",
        "Bash(mkdir:*)",
        "Bash(touch:*)"
      ]
    }
  }
  ```

  2. Navigate to a project under `~/Code/`, e.g., `~/Code/browsery/`

  3. Ask Claude Code to create a todo file at `.claude/todo.md`

  **Expected Behavior:**

  The following operations should proceed without prompting:
  - `Write(.claude/todo.md)` — matches `Write(.claude/**)`
  - `mkdir -p ~/Code/browsery/.claude` — matches `Bash(mkdir:*)`
  - `touch ~/Code/browsery/.claude/todo.md` — matches `Bash(touch:*)`

  Additionally, `~/Code/browsery/.claude/todo.md` should match `Write(~/Code/**)`.

  **Actual Behavior:**

  All three operations prompt for user confirmation:
  ```
  Bash command
     mkdir -p /Users/username/Code/browsery/.claude
   Do you want to proceed?
  ```

  ```
  Bash command
     touch /Users/username/Code/browsery/.claude/todo.md
   Do you want to proceed?
  ```

  **Additional Context:**

  - The `.claude/` directory already existed when `mkdir -p` was attempted
  - The full absolute path `/Users/username/Code/browsery/.claude/todo.md` should match the glob pattern `~/Code/**`
  - Unclear if this is a tilde expansion issue, glob matching issue, or both

Activity

  1. github-actions commented on Dec 26, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] global/local settings.json allow permissions are not respected by Claude Code #13340
    2. [BUG] permissions from user settings.json is NOT applied at project level #5140
    3. [Critical] Claude Code Glob patterns (/**) in settings.local.json don't work - breaks developer workflow #6881

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. added
    duplicateThis issue or pull request already exists
    and removed
    bugSomething isn't working
    has reproHas detailed reproduction steps
    platform:macosIssue specifically occurs on macOS
    on Dec 30, 2025
  3. github-actions commented on Dec 30, 2025

    @github-actions

    This issue has been automatically closed as a duplicate of #13340.

    If this is incorrect, please re-open this issue or create a new one.

    🤖 Generated with Claude Code

  4. github-actions commented on Jan 6, 2026

    @github-actions

    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.

  5. locked as resolved and limited conversation to collaborators on Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions