Gemini CLI stuck on Running or silent at startup?

The UI status alone cannot show whether a child command is active, waiting for input, or already finished. Capture the exact command and terminal result before retrying it.

Do this first: Force non-interactive shell execution, avoid commands that require prompts, and test with a small command. If the task must restart, inspect the diff and keep command output as a claim to verify.

What the failure looks like.

The CLI shows Running indefinitely even though the command appears complete. This is especially confusing on Windows or with interactive shell behavior.

Why it happens.

The agent and shell can disagree about command completion when an interactive process does not emit the boundary the CLI expects.

Fix it without losing the task.

Record the exact command, shell, working directory, and last output. Look for an actual exit code or process completion signal.
If the command is interactive, determine whether it is waiting for input or EOF before cancelling it. Do not launch a duplicate command while the first may still run.
For the next attempt, use a small, non-interactive command only when that matches the task. Preserve the original output and compare behavior.
Inspect the repository after the process is known to have ended; classify file changes and test results separately from the stuck UI indicator.

What the next AI should receive.

Exact command, terminal and shell mode, working directory, last output or exit code, child-process state, files changed, and whether the command was interactive.

Check before restarting

Check whether the child process is still running and capture its command, shell type, output, and exit status if available. Do not assume the visible terminal finished just because output stopped.

Boundary of the evidence

Issue #24707 is an open user report without a product version; its five-minute behavior and workarounds are not a universal Gemini CLI fix.

Diagnostic checkpoint

Do not replay an ambiguous command until its child process and completion result are known.

Source trail.

Specific report, checked September 24, 2026: Gemini CLI issue #24707 was opened April 5, 2026 and remains open with stale/possible-duplicate labels; no product version is listed. It reports run_shell_command opening a PTY for an interactive or slow command, leaving the agent blocked until its five-minute timeout. The reporter's workaround is to request non-interactive commands, use native search tools instead of shell searches where possible, or send < /dev/null for Unix commands. The proposed setting/shorter timeout is a request, not a shipped fix. Browse the project issue tracker.

FAQ.

Does the Running label prove the command is still executing?

No. Confirm the child process state or obtain an exit result. A UI label alone cannot distinguish a live command from a missed completion event.

Is the workaround in issue #24707 a Gemini CLI fix?

No. The linked issue records a reporter's suggestions and a specific environment, not a confirmed product fix. Test a matching non-interactive command in your own setup.

Scope note: Evidence boundary: the linked issue is one report about run_shell_command and a PTY timeout. The described workarounds are reporter suggestions, not a confirmed shipped fix.

Gemini CLI is silent before the startup prompt.

Gemini CLI launches, remains alive, and produces no usable prompt or error. The terminal looks frozen even though the process has not exited.

  1. Determine whether the process is alive, whether a prompt appeared, and whether any request was sent. Record the exact command and elapsed time.
  2. Check the active configuration path, shell startup output, authentication state, and network errors one at a time. Do not reset all settings before preserving the current configuration.
  3. Use the linked issue only as a comparison if the symptom and affected version match. A similar silent startup does not prove the same cause.
  4. After a controlled restart, confirm the CLI reaches an input prompt before resuming the coding task. Then inspect the project diff separately.

Repository state cannot identify a CLI startup root cause by itself. The issue cited here is an individual report, not proof that the behavior is widespread.

Additional symptom sources.

How ShardStitch helps.

ShardStitch can carry the current diff and the exact command state into a clean Gemini CLI session or another target. It cannot determine whether a blocked shell process exited; verify that in the terminal.