Description
When a Gemini CLI extension is installed via git from a private repository, the CLI attempts to perform background git operations (like git fetch) to check for updates on startup. Because the repository is private and requires authentication, the hidden git process hangs waiting for a username/password or SSH passphrase.
This hidden git process hijacks the terminal's standard input (stdin).
Key Behavior with Flags:
If launching the CLI from the terminal with interactive or prompt flags (e.g., gemini -p "do something" or gemini -i), the CLI will successfully run until the end of its first turn (the AI will generate and display its response). However, once the AI finishes, control is never returned to the user; the terminal remains "frozen" to keyboard input.
UI Observations During Freeze:
- The terminal behaves as if it's in "Copy Mode".
- Search (
Ctrl + F), mouse highlighting/selection, and right-clicking all work normally.
- Standard typing is completely swallowed by the invisible git prompt. The user cannot type anything until the
.git folder is removed or the git process is manually killed.
Steps to Reproduce
- Install an extension via git from a private repository where git will prompt for credentials.
- Launch
gemini-cli (with or without flags) from the terminal.
- Observe that while the AI may complete its first turn, keyboard input is unresponsive for the user.
Expected Behavior
Background git operations should run non-interactively (e.g., using GIT_TERMINAL_PROMPT=0 git fetch) or have their stdin detached/piped to /dev/null so they fail gracefully on auth errors instead of stealing focus from the user.
Environment
Description
When a Gemini CLI extension is installed via git from a private repository, the CLI attempts to perform background
gitoperations (likegit fetch) to check for updates on startup. Because the repository is private and requires authentication, the hiddengitprocess hangs waiting for a username/password or SSH passphrase.This hidden
gitprocess hijacks the terminal's standard input (stdin).Key Behavior with Flags:
If launching the CLI from the terminal with interactive or prompt flags (e.g.,
gemini -p "do something"orgemini -i), the CLI will successfully run until the end of its first turn (the AI will generate and display its response). However, once the AI finishes, control is never returned to the user; the terminal remains "frozen" to keyboard input.UI Observations During Freeze:
Ctrl + F), mouse highlighting/selection, and right-clicking all work normally..gitfolder is removed or the git process is manually killed.Steps to Reproduce
gemini-cli(with or without flags) from the terminal.Expected Behavior
Background git operations should run non-interactively (e.g., using
GIT_TERMINAL_PROMPT=0 git fetch) or have theirstdindetached/piped to/dev/nullso they fail gracefully on auth errors instead of stealing focus from the user.Environment