# Unknown hook type: sessionStart

**URL:** <https://forum.cursor.com/t/unknown-hook-type-sessionstart/149566>\
**Category:** Bug Reports\
**Tags:** hooks\
**Created:** [January 22, 2026, 10:46am UTC](https://forum.cursor.com/t/unknown-hook-type-sessionstart/149566 "2026-01-22T10:46:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CreateSun](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/createsun/32/65944_2.png) [@CreateSun](https://forum.cursor.com/u/CreateSun)\
**Post date:** [January 22, 2026, 10:46am UTC](https://forum.cursor.com/t/unknown-hook-type-sessionstart/149566/1 "2026-01-22T10:46:43Z")

</div>

### 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

```auto
{
  "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

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 22, 2026, 11:35am UTC](https://forum.cursor.com/t/unknown-hook-type-sessionstart/149566/3 "2026-01-22T11:35:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [February 13, 2026, 11:36am UTC](https://forum.cursor.com/t/unknown-hook-type-sessionstart/149566/5 "2026-02-13T11:36:09Z")

</div>

Closed on February 13, 2026, 11:36am UTC

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [March 30, 2026, 3:46pm UTC](https://forum.cursor.com/t/unknown-hook-type-sessionstart/149566/7 "2026-03-30T15:46:45Z")

</div>

Sorry for the late reply here! This was fixed in _v2.4_.

If you’re still facing an issue with `sessionStart` or `sessionEnd` hooks, please raise a new thread!
