Cursor CLI 2026.11.05 (macOS): user-level ~/.cursor/hooks.json is never loaded; project-level .cursor/hooks.json works

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Cursor CLI 2026.11.05-86047df, macOS, Cursor IDE 3.25.6 on the same machine.
Expected: hooks in ~/.cursor/hooks.json run in the CLI (docs and the January CLI notes say user and project hooks load the same way).
Actual: none of the hooks in ~/.cursor/hooks.json fire in the CLI, neither in an interactive session nor with agent -p, with or without --trust, in a git repo or a plain
folder. The same file fires in the IDE.
Repro

  1. ~/.cursor/hooks.json (valid, "version": 1):
    {"version":1,"hooks":{"sessionStart":[{"command":"bash /tmp/probe.sh sessionStart"}],"preToolUse":[{"command":"bash /tmp/probe.sh
    

preToolUse"}],“beforeShellExecution”:[{“command”:“bash /tmp/probe.sh beforeShell”}],“stop”:[{“command”:“bash /tmp/probe.sh stop”}]}}
```
where probe.sh appends "$1" and the stdin JSON keys to /tmp/probe.log and exits 0.
2. mkdir t && cd t && git init
3. agent -p --force "Run the shell command: echo canary. Then reply with the single word done."
4. /tmp/probe.log is never created.
Control (same machine, same version): the same hooks in ./.cursor/hooks.json in the workspace root. sessionStart, preToolUse and beforeShellExecution then fire (with
and without --trust). stop did not fire in -p mode.
Also checked

  • A hooks.json in a parent folder of the workspace is not picked up.
  • User-level hooks in ~/.claude/settings.json are not loaded either.
  • The IDE fires the full set for the same prompt: beforeSubmitPrompt, preToolUse/postToolUse, beforeReadFile, beforeShellExecution/afterShellExecution, afterFileEdit,
    afterAgentResponse, stop.
  • --debug lists hooks_config and “Team hooks config merged” but shows no user-hook execution, so there is no sign of a spawn failure.
    Related: Hooks not firing. Cannot have guardrails (Windows, user-level hooks not run) and Cursor-agent CLI never invokes hooks.json on Linux (2026.08.11) — same version works on macOS (Linux, no hook invoked). In both, the reply says hooks are spawned and then
    fail. Here a probe that writes a file on its first line never runs, while project-level hooks with the same command work.

Steps to Reproduce

  1. Create a probe script:
    cat > /tmp/probe.sh <<‘EOF’
    #!/usr/bin/env bash
    echo “$(date +%T) $1 $(cat | head -c 200)” >> /tmp/probe.log
    echo ‘{}’
    EOF
    chmod +x /tmp/probe.sh && rm -f /tmp/probe.log
  2. Put user-level hooks in ~/.cursor/hooks.json (back up any existing file):
    {“version”:1,“hooks”:{“sessionStart”:[{“command”:“bash /tmp/probe.sh sessionStart”}],“preToolUse”:[{“command”:“bash /tmp/probe.sh
    preToolUse”}],“beforeShellExecution”:[{“command”:“bash /tmp/probe.sh beforeShell”}],“stop”:[{“command”:“bash /tmp/probe.sh stop”}]}}
  3. mkdir /tmp/t && cd /tmp/t && git init -q
  4. agent -p --force “Run the shell command: echo canary. Then reply with the single word done.”
  5. cat /tmp/probe.log → the file does not exist (an interactive agent session gives the same result).
  6. Control: mkdir -p /tmp/t/.cursor && cp ~/.cursor/hooks.json /tmp/t/.cursor/hooks.json, delete /tmp/probe.log, repeat step 4. sessionStart, preToolUse and beforeShell now appear
    in /tmp/probe.log (stop does not appear in -p mode).

Expected Behavior

Hooks in ~/.cursor/hooks.json run in the CLI, as they do in the IDE. The docs and the January 2026 CLI notes say user and project hooks load the same way. In step 5, /tmp/probe.log
should contain sessionStart, preToolUse and beforeShell entries.

Operating System

MacOS

Version Information

Current Cursor Version: CLI 2026.11.05-86047df and IDE 3.25.6.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Maciej_Malysz,

On 2026.11.05 the CLI reads ~/.cursor/hooks.json the same way as the project file, with no setting or trust check in between, so your probe should have fired.

The CLI does skip that file without any message when it can’t read it at the path it resolves. Could you run echo "$HOME"; ls -la ~/.cursor/hooks.json in the same shell you start agent from (a regular terminal window, not one an agent is driving) and paste the output here?

stop not firing with -p is a known issue the team is aware of: headless mode doesn’t run stop, beforeSubmitPrompt or afterAgentResponse yet.

A hooks.json in a parent folder not being picked up is expected, project hooks are only read from the workspace root.