[BUG] PermissionRequest hook allow for ExitPlanMode no longer skips the plan approval dialog (regression of #15755)
Status Open
Reported on v2.1.7
Maintainer reply None cached
Activity 1 comment · opened Sep 27, 2026
What's Wrong?
A PermissionRequest hook matched on ExitPlanMode returns allow, but the plan-approval dialog is still shown to the user. The hook runs and its output is well-formed; Claude Code seems to ignore the decision for this tool.
This looks like a regression of #15755 (fixed in 2.1.7, now locked). The user reports the same setup, using updatedPermissions with setMode, skipped the dialog about a month ago.
What Should Happen?
When the hook returns allow, ExitPlanMode should be approved without showing the dialog, as it was after the #15755 fix.
Steps to Reproduce
.claude/settings.json:
{
"hooks": {
"PermissionRequest": [
{ "matcher": "ExitPlanMode",
"hooks": [ { "type": "command", "command": "python hook.py" } ] }
]
}
}
hook.pyprints to stdout (exit 0, stderr empty):
{"hookSpecificOutput": {"hookEventName": "PermissionRequest", "decision": {"behavior": "allow"}}}
- Enter plan mode, write a trivial plan, call
ExitPlanMode. - The hook runs (it logs a line on each invocation), but the approval dialog still appears.
Measurements:
- Variant with
"updatedPermissions": [{"type": "setMode", "mode": "auto", "destination": "session"}]: dialog shown 3/3. - Bare
{"behavior": "allow"}as above: dialog shown 2/2, including the first exit of a fresh session. - Before these runs,
ExitPlanModewas also matched under aPreToolUsehook returning allow. That setup keptPermissionRequestfrom firing, so it was removed. OnlyPermissionRequestis wired now.
Environment
- Claude Code 2.1.283 (installed 2026-09-26)
- Windows 11 Pro, Git Bash
- Hook output checked cold: stdout begins with
{, valid JSON, exit 0
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗