Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On Windows, any hook command defined in ~/.cursor/hooks.json fails before it runs.
Even the minimal command echo ‘{“continue”:true,“permission”:“allow”}’ exits with --: line 1: 3: Bad file descriptor (stderr) and produces no stdout.
Hooks work when executed manually in a terminal, so the failure happens inside Cursor’s launcher.
Steps to Reproduce
- Save the following minimal config to C:\Users<user>.cursor\hooks.json:
 
 {
     "version": 1,
     "hooks": {
       "beforeSubmitPrompt": [
         { "command": "echo '{\"continue\":true,\"permission\":\"allow\"}'" }
       ]
     }
   }
- Restart Cursor (or reload the window) so the new config is loaded.
 - Open any non-empty workspace and submit a simple prompt (e.g., “test”).
 - Open Output → Hooks and check the 
beforeSubmitPromptentry. 
Observed
The command never runs; the Hooks panel shows:
Command: echo '{"continue":true,"permission":"allow"}'
Output: (no output)
Error Output:
--: line 1: 3: Bad file descriptor
--: line 1: 4: Bad file descriptor
exit code: 1
Expected Behavior
Cursor should execute the hook command exactly as defined (in this case, emitting the JSON string so the hook can allow the action). Instead, the Windows launcher fails first, so no hook logic runs.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.0.38
VSCode Version: 1.93.1
Commit: 24f65d77200b32ab2c45d21b582a4589051f443c
Additional Information
- Running the same command manually in PowerShell or CMD succeeds; only Cursor’s launcher fails.
 - The same failure occurs for 
beforeShellExecution. 
Does this stop you from using Cursor
No - Cursor works, but with this issue

