Auto-Approve Plan Mode Exit Hook
Automatically approves ExitPlanMode permission requests so Claude transitions from planning to execution without prompting you. Eliminates the repetitive confirmation dialog when using plan mode, letting you focus on reviewing the plan itself.
Hook Type
PermissionRequest with ExitPlanMode matcher -- Fires when Claude requests permission to exit plan mode.
Description
When Claude Code is in plan mode and finishes planning, it asks for permission to exit plan mode and start executing. This hook automatically approves that transition, removing one extra confirmation step. You still get to review the plan itself -- this just skips the "are you sure you want to proceed?" prompt.
Patterns/Rules
- Matches only
ExitPlanModepermission requests - Returns a JSON response with
behavior: "allow"to auto-approve - Does NOT auto-approve other permission types (file edits, bash commands, etc.)
- Safe because the plan has already been shown for review
Configuration
{ "hooks": { "PermissionRequest": [ { "matcher": "ExitPlanMode", "hooks": [ { "type": "command", "command": "echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PermissionRequest\", \"decision\": {\"behavior\": \"allow\"}}}'" } ] } ] } }
Variant: Auto-Approve Multiple Permission Types
If you want to also auto-approve other specific permissions:
{ "hooks": { "PermissionRequest": [ { "matcher": "ExitPlanMode", "hooks": [ { "type": "command", "command": "echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PermissionRequest\", \"decision\": {\"behavior\": \"allow\"}}}'" } ] }, { "matcher": "Read", "hooks": [ { "type": "command", "command": "echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PermissionRequest\", \"decision\": {\"behavior\": \"allow\"}}}'" } ] } ] } }
Action
When Claude requests the ExitPlanMode permission:
- The hook intercepts the permission request
- Returns a JSON object with
decision.behaviorset to"allow" - Claude immediately transitions from plan mode to execution
- No user interaction required for this specific transition
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Pre-Commit Security Scanner
Pre-commit hook that scans staged files for hardcoded secrets, API keys, passwords, and sensitive data patterns before allowing commits.
Agents Md Watcher
Streamline your workflow with this automatically, loads, agents, configuration. Includes structured workflows, validation checks, and reusable patterns for automation.
Automated Build Inspector
Boost productivity using this automatically, trigger, build, processes. Includes structured workflows, validation checks, and reusable patterns for automation.