Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor’s hook system fails on Windows when using Git Bash as the default terminal. The hook event decoder uses PowerShell syntax which is incompatible with Bash environments.
Environment
OS: Windows 10/11
Terminal: Git Bash (configured as default terminal in Cursor)
Steps to Reproduce
- Configure Git Bash as the default terminal in Cursor settings
- Trigger any action that invokes a Cursor hook (e.g., MCP tool execution, agent action)
- Observe the hook failure in STDERR
Expected Behavior
Hooks should execute successfully regardless of the configured terminal shell.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.1.x
Version: 2.2.x
Additional Information
Error Output
STDERR:
- eval: line 1: syntax error near unexpected token ‘[Convert]::FromBase64String’
- eval: line 1: “$b64=‘’; [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($b64)) | & { $input | }”
Root Cause Analysis
The hook processing mechanism hardcodes PowerShell syntax for decoding base64-encoded event payloads:
powershell[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($b64))
This .NET/PowerShell syntax is passed to the eval command, which fails in Bash environments.
Does this stop you from using Cursor
No - Cursor works, but with this issue