logoalt Hacker News

bmurphy1976yesterday at 2:51 AM1 replyview on HN

Good thinking. That seems to have worked. I'll have to use it in anger to see how well it holds up but so far it's working!

First Edit: it works for the CLI but may not be working for the VS Code plugin.

Second Edit: I asked Claude to look at the VS Code extension and this is what it thinks:

>Bottom line: This is a bug in the VS Code extension. The extension defines its own programmatic PreToolUse/PostToolUse hooks for diagnostics tracking and file autosaving, but these override (rather than merge with) user-defined hooks from ~/.claude/settings.json. Your ExitPlanMode hook works in the CLI because the CLI reads settings.json directly, but in VS Code the extension's hooks take precedence and yours never fire.


Replies

ramozyesterday at 4:16 PM

There's a known bug in the VS Code native extension - hooks dont work. Somewhere in their sea of issues on GitHub, it's in there.