logoalt Hacker News

ramoztoday at 12:21 AM2 repliesview on HN

Well, your best bet is some type of hook that can just reject ExitPlanMode and remind Claude that he's to stay in plan.

You can use `PreToolUse` for ExitPlanMode or `PermissionRequest` for ExitPlanMode.

Just vibe code a little toggle that says "Stay in plan mode" for whatever desktop you're using. And the hook will always seek to understand if you're there or not.

  - You can even use additional hooks to continuously remind Claude that it's in long-term planning mode. 
*Shameless plug. This is actually a good idea, and I'm already fairly hooked into the planning life cycle. I think I'll enable this type of switch in my tool. https://github.com/backnotprop/plannotator

Replies

bmurphy1976today at 2:51 AM

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.