[Bug] Permission evaluation order incorrect: allow takes precedence over ask instead of ask over allow

Resolved 💬 3 comments Opened Mar 5, 2026 by eolweus Closed Mar 9, 2026

Bug Description
the evaluation order of permissions is deny -> allow -> ask, not deny -> ask -> allow as stated in the docs. using "Bash" in allow will allow anything even if "Bash" is also in ask. only way to stop it is using it in deny as well. Very annoying

This denies Bash completely:

{
  "permissions": {
    "allow": [
      "Bash",
    ],
    "deny": [
      "Bash",
    ],
    "ask": [],
    "additionalDirectories": []
  },
}

This allows all Bash commands:

{
  "permissions": {
    "allow": [
      "Bash"
    ],
    "deny": [],
    "ask": [
      "Bash"
    ],
    "additionalDirectories": []
  },
}

This still allows python actually:

{
  "permissions": {
    "allow": [
      "Bash",
    ],
    "deny": [
      "Bash(python*)",
    ],
    "ask": [],
    "additionalDirectories": []
  },
}

Reordering the permission objects does nothing. Seems like a pretty critical bug?

This means we can't use a broad "allow all except" pattern unless we deny actions completely

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.69
  • Feedback ID: db27587b-a059-4195-ba2f-a93074e25db3

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/erlingolweus/.local/share/claude/versions/2.1.69 (expected in multi-process scenarios)\n    at NS_ (/$bunfs/root/src/entrypoints/cli.js:2397:2066)\n    at zpR (/$bunfs/root/src/entrypoints/cli.js:2397:1210)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-05T14:10:25.323Z"}]

View original on GitHub ↗

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