Feature request: Allow Stop hooks to switch permission mode (auto-exit auto-accept)

Resolved 💬 4 comments Opened Mar 1, 2026 by chrisbeardy Closed Apr 30, 2026

Summary

Allow Stop hooks to programmatically switch the permission mode when Claude finishes a task.

Previously filed as #19514, which was closed as stale — the feature is still needed.

Use Case

When using auto-accept edits mode (Shift+Tab) for a specific task:

  1. User enables auto-accept mode
  2. Claude completes the task (Stop event fires)
  3. Desired: Hook switches back to normal mode automatically
  4. User is protected from unintended auto-accepts on subsequent prompts

Current Behaviour

  • Stop hooks receive permission_mode as read-only input
  • No way to output a mode change command
  • Users must manually press Shift+Tab twice to return to normal mode

Proposed Solution

Add a switchToMode field to Stop hook responses:

{
  "hookSpecificOutput": {
    "hookEventName": "Stop",
    "switchToMode": "default"
  }
}

Related

  • #14044 — Similar request for PermissionRequest hooks (still open)
  • Shift+Tab keyboard shortcut cycles modes interactively, but no programmatic equivalent exists

Environment

  • Windows 11 / PowerShell 7
  • Affects all platforms

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗