Skip to content

run_shell_command tool hangs when running pwsh.exe in WSL2 #15233

Description

@Loongphy

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

Metadata

Metadata

Assignees

Labels

Stalearea/coreIssues related to User Interface, OS Support, Core Functionalitypriority/p2Important but can be addressed in a future release.status/need-triageIssues that need to be triaged by the triage automation.

Type

Projects

Status
Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions