Add runtime keyboard shortcuts for permission mode toggling

Status Fixed / completed
Maintainer reply None cached
Activity 8 comments · opened Nov 18, 2025 · closed Aug 17, 2026

Feature Request: Runtime Keyboard Shortcuts & Permission Mode Toggle

Summary

Add support for customizable keyboard shortcuts in Claude Code interactive sessions, starting with the ability to toggle permission modes during runtime (similar to Gemini CLI).

Proposed Feature

Primary Request: Ctrl+Y keyboard shortcut to toggle between permission modes during an active session

Broader Request: General keyboard shortcut customization framework

Use Case

Currently, permission modes (--permission-mode) must be set at session launch and cannot be changed mid-session. A typical workflow would be:

  1. Start session in safe mode (default) for cautious exploration
  2. Press Ctrl+Y to enter YOLO mode (bypassPermissions) for trusted bulk operations
  3. Press Ctrl+Y again to return to safe mode
  4. Continue working without session restart

Proposed Implementation

1. Runtime Permission Mode Toggle
# During active session:
Ctrl+Y → Toggle between current mode and bypassPermissions

Visual feedback in status line:

  • [SAFE] - Default permission mode
  • [YOLO] - Bypass permissions mode
2. Keyboard Shortcut Configuration

Add to settings.json:

{
  "keyboardShortcuts": {
    "Ctrl+Y": {
      "action": "togglePermissionMode",
      "modes": ["default", "bypassPermissions"]
    },
    "Ctrl+P": {
      "action": "enterPlanMode"
    }
    // ... other customizable shortcuts
  }
}

Benefits

  • No session restarts - Seamless workflow transitions
  • Safety + Speed - Start cautious, switch to fast when appropriate
  • User control - Quick escape from YOLO mode if needed
  • Parity with competitors - Gemini CLI offers runtime mode switching
  • Extensibility - Framework enables future keyboard shortcuts

Alternative Approaches Considered

  1. Slash commands (e.g., /yolo) - Less ergonomic than hotkeys
  2. Shell aliases - Requires session restart
  3. Hooks - Cannot change runtime session state

Additional Context

  • User migrating from Gemini CLI expects this functionality
  • Permission modes: default, acceptEdits, dontAsk, bypassPermissions, plan
  • Status line already exists for visual feedback integration

Priority

High - Quality-of-life improvement for power users with clear competitor precedent

---

Submitted on behalf of user via Claude Code automation

View original on GitHub ↗

7 Comments

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

roccolangeweg · 7 months ago

Adding another use case for this feature request:

Workflow: Plan Mode -> dontAsk Mode

Currently, Shift+Tab cycles through Normal, Auto-Accept, and Plan modes, but dontAsk mode is excluded from this cycle.

A common workflow would be:

  1. Start session in Plan Mode to safely explore and understand the codebase
  2. Toggle to dontAsk Mode once ready to execute with pre-approved tools only
  3. Return to Plan Mode if needed for further exploration

This provides a balanced approach between full bypass permissions and manual approval for each tool - letting users work efficiently with only their explicitly allowlisted tools while maintaining control.

Would love to see dontAsk added to the Shift+Tab cycle or configurable via a dedicated hotkey.

NerdyMihir · 7 months ago

would love a direct keybind to jump to dontAsk mode — cycling through modes to get back is annoying when it's my default

nepfaff · 6 months ago

this would be great

hikidd · 6 months ago

I want it, and I like it...

B-A-M-N · 4 months ago

Use case: Need to toggle permission modes (especially YOLO/bypass) via keybinding without losing session state. Currently no runtime API for this.

I built a plugin attempting to solve this, but realized mid-session permission changes require core support. This is a missing primitive compared to other AI coding tools.

If Anthropic is open to community contributions on core features like this, I'd be happy to help implement it (with guidance on architecture). Totally understand if not - just wanted to offer.

scottdaniel · 1 month ago

yes yes yes, it would save a lot of clicking

Showing cached comments. Read the full discussion on GitHub ↗