A

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.

HookAnthropicautomationv1.0.0MIT
0 views0 copies

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 ExitPlanMode permission 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:

  1. The hook intercepts the permission request
  2. Returns a JSON object with decision.behavior set to "allow"
  3. Claude immediately transitions from plan mode to execution
  4. No user interaction required for this specific transition
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates