[FEATURE]

Resolved 💬 3 comments Opened Feb 7, 2026 by lxx6185-ui Closed Feb 10, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

GitHub Issue: UserPromptSubmit hooks not triggering in VSCode extension

提交地址: https://github.com/anthropics/claude-code/issues/new

---

Title

UserPromptSubmit hooks not triggering in VSCode extension

Body

Description

UserPromptSubmit hooks configured in ~/.claude/settings.json work correctly in the CLI but do not trigger when using Claude Code through the VSCode extension.

Environment

  • Claude Code Version: 2.1.34
  • Platform: macOS (Darwin 24.5.0)
  • VSCode Extension: Claude Code VSCode extension (cc_entrypoint=claude-vscode)

Configuration

My ~/.claude/settings.json contains:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "node ~/.claude/hooks/skill-assessment.js"
          }
        ]
      }
    ]
  }
}

Steps to Reproduce

  1. Create a hook script at ~/.claude/hooks/skill-assessment.js that logs to a file when executed
  2. Configure the hook in ~/.claude/settings.json as shown above
  3. Use Claude Code via CLI (claude command) - hook triggers and logs are written
  4. Use Claude Code via VSCode extension - hook does NOT trigger, no logs written

Expected Behavior

The UserPromptSubmit hook should trigger on every user prompt submission in both CLI and VSCode extension environments.

Actual Behavior

  • CLI: Hook triggers correctly, logs are written to ~/.claude/logs/skill-assessment.log
  • VSCode Extension: Hook does not trigger, no new log entries

Evidence

Log file shows hook was last triggered at 2026-02-07T05:03:56.775Z (via CLI), but subsequent prompts through VSCode extension did not create new log entries.

Use Case

I created this hook to enhance skill discovery by analyzing user prompts and suggesting relevant skills before manual implementation. This helps ensure consistent use of available skills across the team.

Additional Context

The built-in <system-reminder> for skills appears intermittently in VSCode extension, but custom UserPromptSubmit hooks are not being executed at all.

Proposed Solution

GitHub Issue: UserPromptSubmit hooks not triggering in VSCode extension

提交地址: https://github.com/anthropics/claude-code/issues/new

---

Title

UserPromptSubmit hooks not triggering in VSCode extension

Body

Description

UserPromptSubmit hooks configured in ~/.claude/settings.json work correctly in the CLI but do not trigger when using Claude Code through the VSCode extension.

Environment

  • Claude Code Version: 2.1.34
  • Platform: macOS (Darwin 24.5.0)
  • VSCode Extension: Claude Code VSCode extension (cc_entrypoint=claude-vscode)

Configuration

My ~/.claude/settings.json contains:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "node ~/.claude/hooks/skill-assessment.js"
          }
        ]
      }
    ]
  }
}

Steps to Reproduce

  1. Create a hook script at ~/.claude/hooks/skill-assessment.js that logs to a file when executed
  2. Configure the hook in ~/.claude/settings.json as shown above
  3. Use Claude Code via CLI (claude command) - hook triggers and logs are written
  4. Use Claude Code via VSCode extension - hook does NOT trigger, no logs written

Expected Behavior

The UserPromptSubmit hook should trigger on every user prompt submission in both CLI and VSCode extension environments.

Actual Behavior

  • CLI: Hook triggers correctly, logs are written to ~/.claude/logs/skill-assessment.log
  • VSCode Extension: Hook does not trigger, no new log entries

Evidence

Log file shows hook was last triggered at 2026-02-07T05:03:56.775Z (via CLI), but subsequent prompts through VSCode extension did not create new log entries.

Use Case

I created this hook to enhance skill discovery by analyzing user prompts and suggesting relevant skills before manual implementation. This helps ensure consistent use of available skills across the team.

Additional Context

The built-in <system-reminder> for skills appears intermittently in VSCode extension, but custom UserPromptSubmit hooks are not being executed at all.

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

现有 claude Code ,经常不触发 skills,采用 hook 方案,强制每次都触发 skills 评估,但在 claude Code内无法使用

View original on GitHub ↗

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