Permission 'ask' list not triggering prompt for git push despite correct configuration

Resolved 💬 2 comments Opened Jan 21, 2026 by skoonin Closed Jan 21, 2026

Bug Description

Commands in the ask permission list are not triggering confirmation prompts when they should, specifically git push. The permission evaluation order should be deny → ask → allow → sandbox, meaning ask should take priority over allow.

Expected Behavior

When Bash(git push:*) is in the ask list, running git push should prompt the user for confirmation before executing, even if Bash(git:*) is in the allow list.

Actual Behavior

git push executes without prompting for confirmation.

Configuration

Relevant sections from ~/.claude/settings.json:

{
  "permissions": {
    "allow": [
      "Bash(git:*)",
      // ... other entries
    ],
    "ask": [
      "Bash(git push:*)",
      "Bash(git push --force:*)",
      // ... other entries
    ]
  },
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": true,
    "allowUnsandboxedCommands": true,
    "excludedCommands": [
      "git",
      // ... other entries
    ]
  }
}

Analysis

Possible contributing factors:

  1. git being in excludedCommands (runs outside sandbox) may be bypassing permission checks
  2. allowUnsandboxedCommands: true may be auto-allowing excluded commands without checking the ask list
  3. The broad Bash(git:*) in allow may be incorrectly taking precedence over the specific Bash(git push:*) in ask

Environment

  • OS: macOS (Darwin 25.2.0)
  • Claude Code: Latest version

Steps to Reproduce

  1. Configure settings.json with Bash(git:*) in allow and Bash(git push:*) in ask
  2. Enable sandbox with git in excludedCommands
  3. Have Claude execute a git push command
  4. Observe that no confirmation prompt appears

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗