[BUG]

Resolved 💬 2 comments Opened Jun 5, 2026 by egamberdi0726 Closed Jun 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Describe the bug / feature request:
Hooks configured in ~/.claude/settings.json do not work in the VSCode extension.
The same hooks work correctly in the CLI (claude command in terminal).

Tested hooks:

  • Notification with permission_prompt matcher
  • PreToolUse (no matcher)
  • PostToolUse (no matcher)

None of them fired — confirmed by writing to a test file (/tmp/claude_hook_test.txt)
which was never created.

Expected behavior:
Hooks should fire in VSCode extension the same way they do in CLI.

Environment:

  • OS: macOS
  • Claude Code: VSCode Extension
  • Shell: zsh

What Should Happen?

Hooks configured in ~/.claude/settings.json should fire in the VSCode extension,
just like they do in the CLI. For example, when a permission prompt appears,
the Notification hook with matcher "permission_prompt" should execute the specified command.

Error Messages/Logs

Steps to Reproduce

  1. Add a hook to ~/.claude/settings.json:

{
"hooks": {
"Notification": [
{
"matcher": "permission_prompt",
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Ping.aiff"
}
]
}
]
}
}

  1. Open Claude Code in VSCode extension
  2. Ask Claude to run a Bash command that requires permission (e.g. ls ~/Documents)
  3. Observe that the permission prompt appears but the hook command does not execute

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.165

Platform

Other

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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