Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Since sometime between 2026-08-14T07:55Z and 2026-08-18T07:49Z, the subagentStart and subagentStop hooks stopped firing entirely — for both foreground and background Task-tool subagents — while beforeShellExecution hooks from the same .cursor/hooks.json continue to fire normally. Saving hooks.json (auto-reload) does not help.
Evidence from our instrumented hook script (it logs every invocation with timestamps):
- Last subagent-stop: 2026-08-14T07:55:39Z; subagent hooks fired repeatedly on 2026-08-13/14 with full payloads (subagent_id, subagent_type, transcript_path, parent_conversation_id).
- 2026-08-18: 76 beforeShellExecution invocations, but 0 subagentStart and 0 subagentStop across 4 independent Task launches (2 background, 2 foreground).
- .cursor/hooks.json unchanged since 2026-08-13 15:16 local; hook script unchanged since 2026-08-13 17:26 local; no hooks-related settings in settings.json.
This is worse than the already-confirmed background-only subagentStop bug (linked in Additional Information): even foreground subagentStart does not fire.
Steps to Reproduce
- Register
.cursor/hooks.jsonwith subagentStart, subagentStop, and beforeShellExecution hooks pointing at a script that appends every invocation to a log file:
{
"version": 1,
"hooks": {
"subagentStart": [{ "command": "node .cursor/hooks/log.mjs subagent-start", "timeout": 10, "failClosed": true }],
"subagentStop": [{ "command": "node .cursor/hooks/log.mjs subagent-stop", "timeout": 10, "failClosed": true }],
"beforeShellExecution": [{ "command": "node .cursor/hooks/log.mjs before-shell", "timeout": 10, "failClosed": true }]
}
}
- Launch any Task subagent (foreground or background) and let it complete.
- Run any shell command in the agent.
- Observe: only the beforeShellExecution invocation is logged. No subagentStart/subagentStop invocations occur.
Expected Behavior
subagentStart should fire when a Task subagent is spawned, and subagentStop should fire when it completes — at minimum for foreground subagents (the documented background-only subagentStop gap is tracked separately; see Additional Information). Any workflow that captures a subagent’s typed result at subagentStop is entirely broken, including the foreground path that should work.
Operating System
MacOS
Version Information
Cursor 3.11.19 (stable)
Commit: bf249e6efb5b097f23d7e21d7283429f0760b74a
VSCode: 1.125.0
For AI issues: which model did you use?
N/A — not an AI-model issue (IDE hooks platform)
Additional Information
Related confirmed issues in the same area:
- subagentStop never fires for background subagents: `subagentStop` never fires for background subagents; documented `summary` / `modified_files` / `agent_transcript_path` missing or null
- Hooks stop working per version: Unstable Cursor Hooks
- Subagent-internal hooks carry no parent/subagent identity fields and null transcript_path (see forum topic 163054)
Additional notes:
- The newest cursor.hooks.*.log under ~/Library/Application Support/Cursor/logs/ is from 2026-07-15 and contains only initialization lines; no hooks-service log exists for the currently affected window, which may itself be a symptom.
- I can attach full instrumented hook-event log excerpts on request.
Does this stop you from using Cursor
No - Cursor works, but with this issue