Hooks no longer accept null and failed closed

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Starting from version 3.4.17, (or maybe even earlier) when hook response is null cursor mark it invalid and block the event.

Steps to Reproduce

Create a hook that return null to cursor and can potentially block (for instance beforeShellExecution).

Expected Behavior

Interpret as an allowed event as it was in previous versions

Operating System

MacOS

Version Information

Version: 3.4.17
VSCode Version: 1.105.1
Commit: 93e603f703cd553a6bb3644711a3379bbbb31180
Date: 2026-05-13T21:39:55.724Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

Does this stop you from using Cursor

Yes - Cursor is unusable

This is a confirmed bug.

Immediate workaround: Have your hook return an empty object {} instead of null. This passes validation and signals “allow” (no opinion):

echo '{}'

Or if you want to explicitly allow:

echo '{"permission": "allow"}'

I’ve filed a bug to get this fixed. The correct behavior should treat null the same as empty output.