Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
cursor-agent reads an enterprise hooks.json and then never runs its beforeSubmitPrompt hook. No error, no warning, nothing in the output. The same config works in the IDE, so this is CLI only.
Steps to Reproduce
- Install an enterprise hooks.json at
/Library/Application Support/Cursor/hooks.jsonwith abeforeSubmitPromptcommand hook that writes a marker file. - Run
cursor-agentand send a prompt. - The marker file is never written. The hook does not run.
The config itself is fine. It loads and parses with no errors reported.
Expected Behavior
An enterprise hooks.json that defines beforeSubmitPrompt runs that hook on every prompt submission in cursor-agent, the same as it does in the IDE. The docs list Enterprise as the highest priority scope and state that all matching hooks from every source run.
Operating System
MacOS
Version Information
cursor-agent 2026.09.26-dd393fe, macOS arm64
Additional Information
Cause
The loading side is not the problem. I confirmed the enterprise config is read and parsed correctly, and that once the hook executor is reached it picks up enterprise hooks and runs them.
The problem is in between. In the shipped bundle (9352.index.js) the call to executeHookForStep for beforeSubmitPrompt sits behind a pre-check that does not consult every configured hook scope. For an enterprise or team config that pre-check fails, so the executor is never called and the event is skipped.
Also: --print mode
In cursor-agent -p, beforeSubmitPrompt does not fire at all. Anything scripted or running in CI gets no prompt hooks.
Does this stop you from using Cursor
No - Cursor works, but with this issue