Skip to content

Gemini CLI Crashes on run_shell_command Confirmation Prompt #14561

Description

@radialmonster

Summary:
The Gemini CLI application unexpectedly quits/crashes back to the shell prompt whenever the AI attempts to execute a run_shell_command
tool call. This occurs specifically when the CLI tries to display the user confirmation menu for the shell command, before any user
input can be provided.

Environment:

  • Operating System: Linux
  • Connection Type: SSH
  • Gemini CLI Version: 0.19.1 git 6169ef0
  • Terminal: Standard SSH terminal client (e.g., xterm-256color or screen over SSH)
  • Working Directory: any

Steps to Reproduce:

  1. Start the Gemini CLI session while connected via SSH to a Linux server.
  2. Interact with the AI model and prompt it to perform any action that requires the run_shell_command tool. For example, ask: "What is
    the Python version?" (This will cause the AI to attempt python3 --version).
  3. Observe the Gemini CLI's behavior.

Observed Behavior:
Upon step 2, the Gemini CLI displays the confirmation prompt for the run_shell_command (e.g., "Allow execution of: 'python3'?").
Immediately after displaying this menu, the CLI process terminates and returns to the standard shell prompt (e.g., [blesta@blesta
blesta_qbo_sync]$). The user is not given any opportunity to select an option (1, 2, or 3) from the menu before the application quits.

Exact Console Output from Reproduction (User Provided):

1 > yes but if you run py i think it quits
2
3   Responding with gemini-3-pro-preview
4 ✦ I understand. You suspect that specifically triggering a shell command (like running Python) is what causes the crash/quit.
5
6   Let's test this safely with a very simple, instant command. I will attempt to check the Python version.
7
8   If this crashes/quits immediately without letting me approve it, then we know the issue is specifically with the run_shell_command
  tool
9   in your environment.

10 ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───╮
11 │ ? Shell python3 --version [current working directory /home/blesta/public_html/plugins/blesta_qbo_sync]
← │
12 │

13 │ python3 --version

14 │

15 │ Allow execution of: 'python3'?

16 │

17 │ ● 1. Yes, allow once

18 │ 2. Yes, allow always ...

19 │ 3. No, suggest changes (esc)

20 │

21 ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───╯
22 ⠏ Waiting for user confirmation...
23
24 Using: 1 GEMINI.md file
25 ~/.../plugins/blesta_qbo_sync (master*) no sandbox (see /docs) auto (99% context
left)
26 [blesta@blesta blesta_qbo_sync]$

Expected Behavior:
The Gemini CLI should display the confirmation prompt and then wait for the user to select an option (1, 2, or 3) before proceeding or
terminating.

Impact:
This bug severely limits the functionality of the Gemini CLI, as the AI cannot execute any shell commands, which are critical for many
development tasks (e.g., git, composer, testing, building, etc.).

Additional Information:

  • Other AI tool calls such as list_directory, read_file, write_file, and replace function correctly without causing the CLI to crash.
    The confirmation prompts for these tools (if they appear) are handled as expected.
  • The SSH connection itself remains stable and does not terminate; only the Gemini CLI process exits.
  • This suggests an issue specifically with the run_shell_command's interactive prompt handling within the Gemini CLI when operating
    over an SSH connection.

os details:
cat /etc/os-release
NAME="AlmaLinux"
VERSION="10.0 (Purple Lion)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="10.0"
PLATFORM_ID="platform:el10"
PRETTY_NAME="AlmaLinux 10.0 (Purple Lion)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:10::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
VENDOR_NAME="AlmaLinux"
VENDOR_URL="https://almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-10"
ALMALINUX_MANTISBT_PROJECT_VERSION="10.0"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="10.0"
SUPPORT_END=2035-06-01

I tried to use /bug in the gemini cli and it gave me this url to file a bug report but this url gives me http error 400.

https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.yml&title=&info=%0A*%20**CLI%20Version%3A**%200.19.1%0A*%20**Git%20Commit%3A**%206169ef04b%0A*%20**Session%20ID%3A**%20c40825ad-fa7d-4a69-a85d-577ffd748569%0*%20**Operating%20System%3A**%20linux%20v24.11.1%0A*%20**Sandbox%20Environment%3A**%20no%20sandbox%0A*%20**Model%20Version%3A**%20auto%0A*%20**Memory%20Usage%3A**%20330.1%20MB%0A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalestatus/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions