Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
Hooks that are installed and run through the standard file ~/.cursor/hooks.json double fire in the Windows CLI
Steps to Reproduce
Install a hook in ~/.cursor/hooks.json
Perform the action
Expected Behavior
Hooks should single fire
Operating System
Windows 10/11
Version Information
About Cursor CLI
CLI Version 2026.04.08-a41fba1
Model Auto
OS win32 (x64)
Terminal windows-terminal
Shell cmd
Additional Information
Hook file example:
{
“version”: 1,
“hooks”: {
“subagentStop”: [
{
“command”: “C:\Users\tyler\AppData\Local\Python\pythoncore-3.14-64\python.exe C:\tmp\prompt_submit_logger.py cursor”,
“timeout”: 5
}
],
“preToolUse”: [
{
“command”: “C:\Users\tyler\AppData\Local\Python\pythoncore-3.14-64\python.exe C:\tmp\prompt_submit_logger.py cursor”,
“timeout”: 5
}
],
“afterTabFileEdit”: [
{
“command”: “C:\Users\tyler\AppData\Local\Python\pythoncore-3.14-64\python.exe C:\tmp\prompt_submit_logger.py cursor”,
“timeout”: 5
}
],
}
}
Hook log:
{“conversation_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“generation_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“model”:“default”,“is_background_agent”:false,“session_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“hook_event_name”:“sessionStart”,“cursor_version”:“2026.04.08-a41fba1”,“workspace_roots”:[“C:\Users\tyler”],“transcript_path”:null,“_agent_type”:“cursor”,“_pid”:8304,“_ppid”:11832,“_logged_at”:“2026-04-09T14:08:25.993941+00:00”}
{“conversation_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“generation_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“model”:“default”,“is_background_agent”:false,“session_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“hook_event_name”:“sessionStart”,“cursor_version”:“2026.04.08-a41fba1”,“workspace_roots”:[“C:\Users\tyler”],“transcript_path”:null,“_agent_type”:“cursor”,“_pid”:2460,“_ppid”:8104,“_logged_at”:“2026-04-09T14:08:25.995880+00:00”}
{“conversation_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“generation_id”:“8e2b18ab-16e4-4abe-9bc7-6c2370dce25b”,“model”:“default”,“prompt”:“test123”,“attachments”:,“session_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“hook_event_name”:“beforeSubmitPrompt”,“cursor_version”:“2026.04.08-a41fba1”,“workspace_roots”:[“C:\Users\tyler”],“transcript_path”:null,“_agent_type”:“cursor”,“_pid”:5224,“_ppid”:12156,“_logged_at”:“2026-04-09T14:08:28.943456+00:00”}
{“conversation_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“generation_id”:“8e2b18ab-16e4-4abe-9bc7-6c2370dce25b”,“model”:“default”,“prompt”:“test123”,“attachments”:,“session_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“hook_event_name”:“beforeSubmitPrompt”,“cursor_version”:“2026.04.08-a41fba1”,“workspace_roots”:[“C:\Users\tyler”],“transcript_path”:null,“_agent_type”:“cursor”,“_pid”:5108,“_ppid”:3024,“_logged_at”:“2026-04-09T14:08:28.946193+00:00”}
{“conversation_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“generation_id”:“8e2b18ab-16e4-4abe-9bc7-6c2370dce25b”,“model”:“default”,“status”:“completed”,“loop_count”:0,“input_tokens”:10129,“output_tokens”:34,“cache_read_tokens”:4608,“cache_write_tokens”:0,“session_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“hook_event_name”:“stop”,“cursor_version”:“2026.04.08-a41fba1”,“workspace_roots”:[“C:\Users\tyler”],“transcript_path”:“C:\Users\tyler\.cursor\projects\C-Users-tyler\agent-transcripts\b1fb9e60-929d-4eb5-8d00-379cecd1f5db\b1fb9e60-929d-4eb5-8d00-379cecd1f5db.jsonl”,“_agent_type”:“cursor”,“_pid”:4688,“_ppid”:9916,“_logged_at”:“2026-04-09T14:08:37.166252+00:00”}
{“conversation_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“generation_id”:“8e2b18ab-16e4-4abe-9bc7-6c2370dce25b”,“model”:“default”,“status”:“completed”,“loop_count”:0,“input_tokens”:10129,“output_tokens”:34,“cache_read_tokens”:4608,“cache_write_tokens”:0,“session_id”:“b1fb9e60-929d-4eb5-8d00-379cecd1f5db”,“hook_event_name”:“stop”,“cursor_version”:“2026.04.08-a41fba1”,“workspace_roots”:[“C:\Users\tyler”],“transcript_path”:“C:\Users\tyler\.cursor\projects\C-Users-tyler\agent-transcripts\b1fb9e60-929d-4eb5-8d00-379cecd1f5db\b1fb9e60-929d-4eb5-8d00-379cecd1f5db.jsonl”,“_agent_type”:“cursor”,“_pid”:1728,“_ppid”:12164,“_logged_at”:“2026-04-09T14:08:37.217218+00:00”}
Does this stop you from using Cursor
No - Cursor works, but with this issue