Skip to content

dotnet.exe hangs indefinitely when invoked via WSL2 interop with captured output #24410

Description

@sergeytiron

What happened?

When executing Windows binaries like dotnet.exe (specifically dotnet.exe --info) from within a WSL2 environment, Gemini CLI hangs indefinitely if it attempts to capture the command's output directly. This prevents the agent from receiving any data or proceeding with the task.

Reproduction Steps

  1. In a WSL2 environment with .NET installed on the Windows host, initiate a Gemini CLI session.
  2. Issue a directive to run dotnet.exe --info.
  3. Observe that the command initiates but never returns output or completes, causing the CLI to hang until manually cancelled.

Observed Behavior

  • Direct Execution: dotnet.exe --info hangs the tool call.
  • Redirection Workaround: dotnet.exe --info > output.txt followed by cat output.txt works correctly.
  • Timeout Workaround: timeout 10s dotnet.exe --info successfully returns output before the timeout.

What did you expect to happen?

The command should return its output to the CLI, allowing the agent to parse the .NET configuration and continue with its operations without any hanging.

Client information

  • CLI Version: 0.35.3
  • Git Commit: 52d1034
  • Session ID: 42336f74-aa54-4598-a0f8-46c7f9bc9d46
  • Operating System: linux v25.8.1
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3-flash-preview
  • Auth Type: oauth-personal
  • Memory Usage: 441.2 MB
  • Terminal Name: Unknown
  • Terminal Background: #000000
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitystatus/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