Feature Request: Hooks support in VS Code extension
Summary
Hooks configured in settings.json (both project-level and user-level) do not fire when running Claude Code inside the VS Code extension. The same hooks work correctly when using the CLI directly.
Environment
- Claude Code Version: VS Code extension (latest)
- OS: Windows 11
- Extension Environment: VS Code native extension
Steps to Reproduce
- Configure a hook in user-level settings (
~/.claude/settings.json):
``json``
{
"hooks": {
"PostToolUse": [
{
"matcher": "Task|Skill",
"hooks": [
{
"type": "command",
"command": "powershell -ExecutionPolicy Bypass -File path/to/hook.ps1"
}
]
}
]
}
}
- Alternatively, configure in project-level settings (
.claude/settings.json)
- Use the VS Code extension to invoke a Task or Skill tool
- Check if the hook script was executed (e.g., by having the script write to a log file)
Expected Behavior
The hook should fire after the matched tool completes, just as it does in the CLI.
Actual Behavior
The hook never fires. The script is never executed, and no log entries are created.
Investigation Performed
- Verified the hook script works when executed manually
- Added debug logging at the very start of the hook script to verify if it's even called - it is not
- Tested with both simple test hooks (just writing to a file) and more complex hooks
- Tested in both project-level and user-level settings.json
- Confirmed the hooks work correctly when using Claude Code CLI directly (not through VS Code)
Use Case
We use hooks for usage telemetry tracking - recording when skills, commands, and agents are invoked to build analytics dashboards and improve our capability catalog. Without hooks support in the VS Code extension, we lose visibility into usage patterns for VS Code users.
Workaround
Currently, there is no workaround other than using the CLI instead of the VS Code extension. We've documented manual usage tracking in our skill definitions as a fallback, but this is error-prone and adds cognitive overhead.
Request
Please add hooks support to the VS Code extension to achieve feature parity with the CLI.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗