google-gemini/gemini-cli

[Windows/WezTerm] Shift+Tab and fallback F10 fail to cycle approval mode (Keystroke logs included)

Closed

#22,738 opened on Mar 16, 2026

 (3 comments) (0 reactions) (1 assignee)TypeScript (13,657 forks)batch import
area/platformeffort/smallhelp wantedkind/bugpriority/p3status/bot-triagedstatus/need-information

Repository metrics

Stars
 (103,992 stars)
PR merge metrics
 (Avg merge 4d 2h) (55 merged PRs in 30d)

Description

Describe the bug

On Windows 11 using WezTerm and PowerShell, pressing Shift+Tab fails to cycle the approval mode (e.g., to /plan). The fallback key F10 also does not work.

Other TUI tools (like Claude Code and Codex) handle Shift+Tab perfectly in the exact same WezTerm panes, indicating a specific sequence parsing issue in Gemini CLI for Windows ConPTY environments.

Environment

  • OS: Windows 11
  • Terminal: WezTerm (running PowerShell)
  • Node version: v22.12.0
  • Gemini CLI version: 33.1

Keystroke Logs (Pressing F12)

1. When pressing Shift+Tab: It seems ConPTY strips the escape sequence and passes it as a raw \t: ℹ [DEBUG] Raw StdIn: "\t" ℹ [DEBUG] Keystroke: {"name":"tab","shift":false,"alt":false,"ctrl":false,"cmd":false,"insertable":false,"sequence":"\t"}

2. When pressing F10 (Fallback key): The sequence \u001b[21~ sent by WezTerm does not trigger the CYCLE_APPROVAL_MODE action: ℹ [DEBUG] Raw StdIn: "\u001b[21~" ℹ [DEBUG] Keystroke: {"name":"f10","shift":false,"alt":false,"ctrl":false,"cmd":false,"insertable":false,"sequence":"\u001b[21~"}

Expected Behavior

Either Shift+Tab should correctly cycle the mode, or the F10 sequence \u001b[21~ should be mapped to the CYCLE_APPROVAL_MODE command for WezTerm users on Windows.

Contributor guide