Unknown hook type: sessionStart

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Configure “sessionStart” or ‘sessionEnd’ in .cursor/hook.json

Hooks tab in Cursor Settings can see errors:

ERROR: Invalid project config: Unknown hook type: sessionStart. Valid types are: beforeShellExecution, beforeMCPExecution, afterShellExecution, afterMCPExecution, beforeReadFile, afterFileEdit, beforeTabFileRead, afterTabFileEdit, stop, beforeSubmitPrompt, afterAgentResponse, afterAgentThought

Steps to Reproduce

.cursor/hook.json

{
  "version": 1,
  "hooks": {
    "sessionStart": [
      {
        "command": "./hooks/format.sh"
      }
    ]
    ]
  }
}

Expected Behavior

“sessionStart” or ‘sessionEnd’ could be recognized

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.41
VSCode Version: 1.105.1
Commit: 2ca326e0d1ce10956aea33d54c0e2d8c13c58a30
Date: 2026-01-16T19:14:00.150Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed investigation, it really helped.

You’re right, this is a bug. The docs do list sessionStart and sessionEnd as supported types, but the validation in Cursor Settings doesn’t recognize them.

I’ve passed this on to the team. I don’t have an exact ETA for a fix yet, but your report helps with prioritization.

Workaround: like you said, you can use beforeSubmitPrompt with an “already initialized?” check to emulate sessionStart.

I’ll post here if there’s any news on the fix.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.