Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
The beforeShellExecution hook’s permission response (allow/ask/deny) is not respected by Cursor. The allow-list takes full precedence:
- Hook
allowignored: If command is NOT in allow-list, hook’s “allow” doesn’t auto-run - Cursor still prompts - Hook
askignored: If command IS in allow-list, hook’s “ask” doesn’t prompt - Cursor auto-runs
Only “deny” works correctly in all cases.
Steps to Reproduce
-
Create a beforeShellExecution hook that returns “allow” for read commands (e.g., gh pr list) and “ask” for write commands (e.g., gh issue create)
-
Test WITHOUT
ghin Cursor’s allow-list:- Run
gh pr list(hook returns “allow”) - Expected: auto-runs
- Actual: prompts user
- Run
-
Test WITH
ghin Cursor’s allow-list:- Run
gh issue create(hook returns “ask”) - Expected: prompts user
- Actual: auto-runs without prompting
- Run
-
Test “deny” (works correctly in both cases):
- Hook returns “deny” → command is blocked ✓
Expected Behavior
Hook permissions should be respected regardless of the allow-list:
- “deny” → always block (works ✓)
- “ask” → always prompt (broken when command in allow-list)
- “allow” → always auto-run (broken when command not in allow-list)
The allow-list should only be a fallback when hook returns “allow” or no hook is configured.
Operating System
Linux
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.1.36
VSCode Version: 1.105.1
Commit: 9cd7c8b6cebcbccc1242df211dee45a4b6fe15e0
Date: 2025-11-26T03:43:48.079Z
Electron: 37.5.1
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.12.59-1-lts
Does this stop you from using Cursor
No - Cursor works, but with this issue