Environment
- OS: Windows 11
- Terminal: Git Bash (MINGW64), PowerShell, Windows Terminal
- Gemini CLI Version: Latest (tested on multiple versions)
- Node.js Version: v20.x
Problem Summary
The Gemini CLI is currently unusable on Windows for real-world workflows due to three critical performance and compatibility issues:
1. UI Freeze on Large Paste Operations
Severity: Critical - Makes the application unusable for pasting code, logs, or documentation
Description:
When pasting text larger than ~500 characters, the entire UI freezes for several seconds (or minutes for very large pastes). The terminal becomes completely unresponsive during this time.
Root Cause:
The current implementation processes pasted text character-by-character through the text buffer, causing O(n²) complexity for large inputs.
Reproduction Steps:
- Copy a large file (e.g., 50KB log file or code file)
- Paste into Gemini CLI input prompt using Ctrl+V or terminal paste
- Observe UI freeze - terminal becomes unresponsive
- Wait several seconds/minutes for paste to complete
Expected Behavior:
Paste should be instant regardless of size, similar to Claude Code CLI or standard terminal behavior.
2. Terminal Freeze When Displaying Large Messages in Chat History
Severity: High - Prevents reviewing conversation history with large content
Description:
After sending a large message (>10,000 characters), the terminal freezes when trying to render the message in the chat history. Scrolling becomes impossible and the UI hangs.
Root Cause:
The UserMessage component attempts to render the entire message content without any truncation or virtualization, causing terminal rendering performance issues.
Reproduction Steps:
- Paste and send a very large text (e.g., 50,000+ character file)
- Message is sent successfully to the API
- Try to scroll up in chat history
- Terminal freezes when attempting to render the large message
Expected Behavior:
Large messages should be truncated in the display (e.g., show preview with character count) while still being sent fully to the model API.
3. PowerShell Command Execution Failures with AI-Generated Commands
Severity: High - Makes AI-generated commands unusable on Windows
Description:
The AI frequently generates Unix-style commands using &&, ||, pipes, and other bash operators. These fail when executed in PowerShell (the default Windows shell) with cryptic syntax errors.
Examples of Failing Commands:
# AI generates:
npm install && npm run build
# PowerShell error:
The token '&&' is not a valid statement separator in this version.
# AI generates:
cat file.txt | grep "pattern"
# PowerShell error:
cat : The term 'cat' is not recognized...
Root Cause:
The shell-utils.ts module defaults to PowerShell on Windows, which has incompatible syntax with bash commands that the AI is trained to generate.
Reproduction Steps:
- Ask Gemini to run a command like "install dependencies and build the project"
- AI generates:
npm install && npm run build
- Command fails with PowerShell syntax error
- User must manually rewrite to PowerShell syntax:
npm install; if ($?) { npm run build }
Expected Behavior:
Since Git Bash is commonly installed on Windows developer machines, the CLI should detect and prefer Git Bash for command execution, ensuring compatibility with AI-generated Unix-style commands.
Impact
These issues collectively make Gemini CLI nearly unusable on Windows for:
- Pasting code snippets, logs, or documentation
- Reviewing chat history with large messages
- Executing AI-generated commands without manual syntax conversion
Windows is a primary development platform, and these issues significantly impact the Windows user experience compared to macOS/Linux.
Proposed Solution
I have implemented fixes for all three issues in PR #18314, which:
- Implements fast paste optimization with placeholder-based handling
- Adds message display truncation for large content
- Configures shell to prefer Git Bash on Windows with PowerShell fallback
All changes maintain backward compatibility and have been tested extensively on Windows 11.
Environment
Problem Summary
The Gemini CLI is currently unusable on Windows for real-world workflows due to three critical performance and compatibility issues:
1. UI Freeze on Large Paste Operations
Severity: Critical - Makes the application unusable for pasting code, logs, or documentation
Description:
When pasting text larger than ~500 characters, the entire UI freezes for several seconds (or minutes for very large pastes). The terminal becomes completely unresponsive during this time.
Root Cause:
The current implementation processes pasted text character-by-character through the text buffer, causing O(n²) complexity for large inputs.
Reproduction Steps:
Expected Behavior:
Paste should be instant regardless of size, similar to Claude Code CLI or standard terminal behavior.
2. Terminal Freeze When Displaying Large Messages in Chat History
Severity: High - Prevents reviewing conversation history with large content
Description:
After sending a large message (>10,000 characters), the terminal freezes when trying to render the message in the chat history. Scrolling becomes impossible and the UI hangs.
Root Cause:
The
UserMessagecomponent attempts to render the entire message content without any truncation or virtualization, causing terminal rendering performance issues.Reproduction Steps:
Expected Behavior:
Large messages should be truncated in the display (e.g., show preview with character count) while still being sent fully to the model API.
3. PowerShell Command Execution Failures with AI-Generated Commands
Severity: High - Makes AI-generated commands unusable on Windows
Description:
The AI frequently generates Unix-style commands using
&&,||, pipes, and other bash operators. These fail when executed in PowerShell (the default Windows shell) with cryptic syntax errors.Examples of Failing Commands:
Root Cause:
The
shell-utils.tsmodule defaults to PowerShell on Windows, which has incompatible syntax with bash commands that the AI is trained to generate.Reproduction Steps:
npm install && npm run buildnpm install; if ($?) { npm run build }Expected Behavior:
Since Git Bash is commonly installed on Windows developer machines, the CLI should detect and prefer Git Bash for command execution, ensuring compatibility with AI-generated Unix-style commands.
Impact
These issues collectively make Gemini CLI nearly unusable on Windows for:
Windows is a primary development platform, and these issues significantly impact the Windows user experience compared to macOS/Linux.
Proposed Solution
I have implemented fixes for all three issues in PR #18314, which:
All changes maintain backward compatibility and have been tested extensively on Windows 11.