[BUG] PermissionRequest: Allow does not exit plan mode for `ExitPlanMode` tool.

Status Fixed / completed
Reported on v2.0.76
Maintainer reply None cached
Activity 7 comments · opened Dec 30, 2025 · closed Jan 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The hook's lifecycle around PermissionRequest/ExitPlanMode works fully other than when you respond with an "Allow" payload - I'd expect for Exit Plan Mode to occur. However, the agent stays in planning mode, sometimes confusing it when building an automated capability around this hook.

Use case is my own app here.
https://github.com/backnotprop/plannotator

What Should Happen?

A hook payload response with allow should automatically exit plan mode.

Error Messages/Logs

Steps to Reproduce

{
  "hooks": {
    "PermissionRequest": [
      {
        "matcher": "ExitPlanMode",
        "hooks": [
          {
            "type": "command",
            "command": "{proper payload with allow}", // im lazy
            "timeout": 1800
          }
        ]
      }
    ]
  }
}

Not full repro, but if you imagine in the video i hit "approve" the agent would actually stay in plan mode vs exiting: https://www.youtube.com/watch?v=a_AT7cEN_9I

My app's decision control logic is based off of the docs: https://github.com/backnotprop/plannotator/blob/main/apps/hook/server/index.ts#L94

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.76 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

7 Comments

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/12176
  2. https://github.com/anthropics/claude-code/issues/9468
  3. https://github.com/anthropics/claude-code/issues/15660

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

vikvorona · 7 months ago

I have the same issue - and have a related issue for that Allow Permission Mode Switching in PermissionRequest Hooks

backnotprop · 7 months ago

Commenting to keep this alive

backnotprop · 7 months ago

Wow, this is now working. Thank you guys

fixed in 2.1.7

backnotprop · 7 months ago

🙏

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.