Hey @hanyu_masashi
This isn’t something you misconfigured, and it’s an issue we’re tracking.
The real trigger is the MSYSTEM env var that Git Bash sets (not SHELL - which is why unsetting it didn’t help, and MSYSTEM can’t be cleared from inside Git Bash). Workaround:
- Open PowerShell or cmd directly from the Start menu, not from Git Bash or anything it launched.
- Check it’s clean:
echo $env:MSYSTEMshould print nothing. If it printsMINGW64, remove it under System Properties → Environment Variables. cursor-agent aboutshould now show PowerShell/cmd. Re-run yourRead target.pytest - the hook should fire and your allow/deny logic should apply.
Once hooks run under PowerShell: strip a leading \uFEFF (BOM) before JSON.parse, and keep timeout generous (PowerShell adds a little startup time per call).
On Grep/Glob: permissions has no entries for those today, so preToolUse/beforeReadFile hooks are the supported way to fence them, which this gets you back to. Same root cause is tracked in this thread. No timeline yet, but I’ll post here when there’s an update. Does launching from a clean PowerShell window get your hook firing?