gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

run_shell_command tool hangs when running pwsh.exe in WSL2

Open Loongphy opened this issue 4 months ago • 0 comments

What happened?

When using the CLI's shell tool within a WSL2 environment to execute pwsh.exe --version, the process hangs indefinitely.

There is no output to stdout or stderr.

Image

What did you expect to happen?

The CLI should successfully execute the command and immediately stream the output to the terminal.

For example, running pwsh.exe --version should display the version string and return control to the user immediately.

Client information

Windows WSL2

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
│ CLI Version                                0.21.2                                                                           │
│ Git Commit                                 97eab144b                                                                        │
│ Model                                      gemini-3-pro-preview                                                             │
│ Sandbox                                    no sandbox                                                                       │
│ OS                                         linux                                                                            │
│ Auth Method                                OAuth                                                                            │

Login information

The --prompt (-p) flag has been deprecated and will be removed in a future version. Please use a positional argument for your prompt. See gemini --help for more information.
I will run the command `pwsh.exe --version` as requested.
[MESSAGE_BUS] publish: {"type":"tool-confirmation-request","toolCall":{"name":"run_shell_command","args":{"command":"pwsh.exe --version"}},"correlationId":"225c2324-ac3e-4103-b30b-49e513f4cbc8"}
[PolicyEngine.check] toolCall.name: run_shell_command, stringifiedArgs: undefined
[PolicyEngine.check] MATCHED rule: toolName=undefined, decision=allow, priority=1.999, argsPattern=none

Anything else we need to know?

No response

Loongphy avatar Dec 18 '25 01:12 Loongphy