chat:cycleMode (Shift+Tab) should include defaultMode value in the cycle

Resolved 💬 2 comments Opened Mar 6, 2026 by kakabanga Closed Apr 3, 2026

Problem

When permissions.defaultMode is set to a custom value (e.g. dontAsk) in ~/.claude/settings.json, the session starts in that mode correctly. However, Shift+Tab (chat:cycleMode) cycles through a hardcoded sequence of built-in modes (acceptEditsplan) and never returns to the configured defaultMode.

Reproduction:

  1. Set "permissions": { "defaultMode": "dontAsk" } in ~/.claude/settings.json
  2. Start a new session — mode is correctly dontAsk
  3. Press Shift+Tab once → enters acceptEdits mode
  4. Press Shift+Tab again → enters plan mode
  5. Press Shift+Tab again → returns to default/auto, not dontAsk

The user is now stuck and cannot return to dontAsk without starting a new session.

Expected Behaviour

The cycle should include the configured defaultMode as one of its slots, so the sequence becomes:

dontAsk → acceptEdits → plan → dontAsk → ...

Or more generally: {defaultMode}acceptEditsplan{defaultMode} → ...

Proposed Solutions

Option A (preferred): Make chat:cycleMode treat defaultMode as the "home" slot — the first and last position in the cycle. This is the most intuitive: Shift+Tab always returns you to your configured default after cycling through the other modes.

Option B: Expose a chat:setMode action in keybindings that accepts a mode name parameter, e.g.:

{
  "context": "Chat",
  "bindings": {
    "ctrl+shift+d": "chat:setMode:dontAsk"
  }
}

This gives users a dedicated hotkey to jump directly to any specific mode regardless of where they are in the cycle.

Impact

Users who configure a non-default defaultMode (especially dontAsk or bypassPermissions) have no way to return to their preferred mode mid-session without starting a new session. This makes the mode cycling feature largely unusable for these users — they learn not to press Shift+Tab at all.

Additional Context

  • --permission-mode CLI flag already supports all mode values (acceptEdits, bypassPermissions, default, dontAsk, plan)
  • The keybinding action chat:cycleMode has no configurable parameters
  • There is no /mode slash command to change permission mode during a session

View original on GitHub ↗

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