Preflight Checklist
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
Preflight Checklist
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
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