[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

  1. .claude/settings.json:
{
  "hooks": {
    "PermissionRequest": [
      { "matcher": "ExitPlanMode",
        "hooks": [ { "type": "command", "command": "python hook.py" } ] }
    ]
  }
}
  1. hook.py prints to stdout (exit 0, stderr empty):
{"hookSpecificOutput": {"hookEventName": "PermissionRequest", "decision": {"behavior": "allow"}}}
  1. Enter plan mode, write a trivial plan, call ExitPlanMode.
  2. 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, ExitPlanMode was also matched under a PreToolUse hook returning allow. That setup kept PermissionRequest from firing, so it was removed. Only PermissionRequest is 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

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗