Gaps in claude-code SessionStart support

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I found two notable differences here:

  1. claude-code supports non-JSON stdout for its SessionStart hooks. Output is added directly to context. Cursor rejects non-JSON stdout with JSON Parse Error: SyntaxError: ...
  2. claude-code supports SessionStart adding to context using JSON stdout with field additionalContext. Cursor ignores a field of that name, but honors one named additional_context

Steps to Reproduce

.

Expected Behavior

Overall I was able to work-around this by (1) converting output to JSON and (2) double-outputting the context in both additionalContext and additional_context.

Operating System

Windows 10/11

Version Information

Version: 2.6.11 (user setup)
VSCode Version: 1.105.1
Commit: 8c95649f251a168cc4bb34c89531fae7db4bd990
Date: 2026-03-03T18:57:48.001Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey James,

Thanks for the detailed write-up. Both observations are accurate.

Non-JSON stdout: Cursor requires hook output to be valid JSON. Plain text stdout from a sessionStart hook will be rejected with a parse error. Your workaround of wrapping the output in JSON is the right approach.

additionalContext vs additional_context: Cursor uses the additional_context (snake_case) field name for SessionStart hook responses. The camelCase additionalContext that claude-code uses isn’t currently recognized. Your double-output workaround is a nice way to support both tools.

Both of these are compatibility gaps between Cursor’s hook implementation and claude-code’s. I’ve flagged them for the team.

Appreciate the report — it really helps us prioritize closing these gaps.

Best,
Mohit