chat:cycleMode (Shift+Tab) should include defaultMode value in the cycle
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 (acceptEdits → plan) and never returns to the configured defaultMode.
Reproduction:
- Set
"permissions": { "defaultMode": "dontAsk" }in~/.claude/settings.json - Start a new session — mode is correctly
dontAsk - Press
Shift+Tabonce → entersacceptEditsmode - Press
Shift+Tabagain → entersplanmode - Press
Shift+Tabagain → returns todefault/auto, notdontAsk
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} → acceptEdits → plan → {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-modeCLI flag already supports all mode values (acceptEdits,bypassPermissions,default,dontAsk,plan)- The keybinding action
chat:cycleModehas no configurable parameters - There is no
/modeslash command to change permission mode during a session
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗