Hey! I wonder if anyone else is building automations based on the Cursor hooks and finding that from version to version some of them just stop working. In the latest version it’s the subagentStart hook. For some time, it was the preToolUse hook.
Anyone else finding this? It makes it super complicated to trust Cursor for sensitive automations
Hey, thanks for the report. To figure out if this is a bug or expected behavior, I’ll need a bit more detail.
Important note about subagentStart: this hook only fires when the agent actually spawns a subagent via the Task tool. Whether a subagent gets spawned at all depends on the model and the session. Built-in auto-subagents decide on their own if they want to delegate. So if “subagentStart didn’t fire”, it can simply mean no subagent was spawned in that session. That’s expected, not a broken hook.
To dig in, could you share:
Your .cursor/hooks.json (or global ~/.cursor/hooks.json)
The ~/.cursor/logs/.../cursor.hooks.log from a session where the hook didn’t run
What exactly you’re seeing: is the hook not called at all, or is it called with an empty or wrong payload? Also, was a subagent spawned in that session, did you see the Task tool in action?
I’ve been testing directly with Claude Opus now, and the model has constantly told me that the hooks are not firing after doing rounds of tests. It starts sub-agents and does small tool calls to test the hooks
Here’s a list of what hooks Opus has reported as dead in version 3.7.19:
Here’s the key point: the model itself (Opus, Composer, or any other one) can’t reliably tell whether a hook fired or not. Hooks run on the client side in Cursor, and the model has zero visibility into that, it can’t “see” a hook run. So when Opus says in chat “the hook didn’t fire”, that’s a guess, not a fact. Running lots of test rounds and collecting the model’s verdicts won’t give you a reliable picture.
The only authoritative source is the hooks execution log. The easiest ways to check it:
View > Output, then in the dropdown at the top right pick Hooks. This shows the full log of all hook executions for that window.
Or in-app: Cursor Settings > Hooks > Execution Logs. This only keeps the last 100 entries, so check it right after you reproduce the issue.
Full log file on disk: ~/Library/Application Support/Cursor/logs/<session>/window<N>/output_<timestamp>/cursor.hooks.log. You can open the folder via Command Palette > Developer: Open Logs Folder, then find output_*/cursor.hooks.log.
What to send:
~/.cursor/hooks.json (or the project .cursor/hooks.json)
The relevant lines from cursor.hooks.log from the session where you think the hook didn’t run
For subagentStart and subagentStop, confirmation that a subagent actually spawned in that session (you could see the Task tool). If no subagent ran, those hooks won’t fire and that’s expected.
For beforeShellExecution and beforeSubmitPrompt: if the log shows that the event isn’t recorded at all when a shell command really ran or a prompt was really submitted, that’s a concrete signal we can work with. Share the matching log lines and I’ll try to reproduce it and file a report.