UserPromptSubmit hooks not working in VS Code/Cursor extensions

Resolved 💬 3 comments Opened Dec 22, 2025 by dbntfit Closed Feb 14, 2026

Environment

  • Claude Code version: 2.0.75
  • IDE: VS Code / Cursor
  • OS: macOS Darwin 24.6.0

Description

UserPromptSubmit hooks are not triggered when using Claude Code in VS Code or Cursor extensions. The same hooks work correctly in CLI.

Steps to Reproduce

  1. Configure a UserPromptSubmit hook in settings.local.json
  2. Add logging to verify hook execution
  3. Send a message in VS Code/Cursor extension
  4. Check logs - no hook execution recorded

Expected Behavior

UserPromptSubmit hooks should be triggered on every user message, as they are in CLI.

Actual Behavior

  • CLI: Hooks work correctly (logs show execution)
  • VS Code extension: Hooks never triggered
  • Cursor extension: Hooks never triggered

Evidence

CLI test at 09:44:55 shows hook execution:

[2025-12-22T09:44:55] UserPromptSubmit called: session=7c04aa02, prompt_len=1

No logs from VS Code/Cursor after multiple messages.

Additional Context

SessionStart hooks also have issues in IDE extensions - some fields (session_id, cwd, hook_event_name) are missing in compact/resume events, while they are present in CLI.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗