Feature request: Add hooks for plan mode transitions (EnterPlanMode/ExitPlanMode)
Resolved 💬 3 comments Opened Jan 27, 2026 by sgbett Closed Jan 27, 2026
Summary
Plan mode transitions (EnterPlanMode and ExitPlanMode tools) are completely invisible to the hooks system. There's no way to hook into plan mode entry or exit.
Current Behaviour
When investigating with --debug, we found:
- PreToolUse/PostToolUse hooks don't fire for
EnterPlanModeorExitPlanMode- only regular tools likeBash,Write,Readtrigger these hooks - Stop hook fires but with no context -
query: undefinedprovides no way to distinguish plan mode exit from other stop events - Debug log shows no plan mode events - the log jumps straight from
SessionStartto tool execution with no trace of plan mode
Evidence from debug log
17:25:24 [DEBUG] Getting matching hook commands for SessionStart with query: clear
17:25:28 [DEBUG] executePreToolHooks called for tool: Write
No plan mode events between session start and first tool use, despite plan mode being active.
Hook events that DO fire (for reference)
SessionStartPreToolUse(Bash, Write, Read, etc. - but NOT EnterPlanMode/ExitPlanMode)PostToolUse(same)PermissionRequestUserPromptSubmitStop(but withquery: undefined)SubagentStopNotification
Requested Behaviour
Either:
- Make plan mode tools fire standard hooks -
PreToolUse/PostToolUsewith queryEnterPlanModeorExitPlanMode - Add dedicated plan mode hook events -
PlanModeEnterandPlanModeExit - Add context to Stop hook - include
query: "plan_mode_exit"or similar when exiting plan mode
Use Case
Users want to run custom scripts when plan mode exits, for example:
- Automatically presenting the plan for review
- Triggering notifications
- Logging plan mode usage
- Integrating with external workflow tools
Environment
- Claude Code version: 2.1.20
- OS: macOS
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗