Skip to content

GitHub Copilot Agent cannot execute commands in WSL/bash terminals - only PowerShell supported #289657

@nerohmot

Description

@nerohmot

Copilot Chat Extension Version: 0.36.1
VS Code Version: 1.108.1
OS Version: Windows 11
Feature (e.g. agent/edit/ask mode): Agent
Selected model : Claude Sonnet 4.5
Logs: /
Steps to Reproduce:

  • Open a project that requires WSL/bash environment (e.g., C/C++ project with Makefile, CMake)
  • Ensure WSL terminal (e.g., "Ubuntu-24.04") is open in VS Code
  • Close all PowerShell terminals to isolate WSL terminal
  • Ask GitHub Copilot Agent to execute a build command (e.g., "build the project")
  • Observe that Agent spawns a NEW PowerShell terminal instead of using the WSL terminal
  • Agent attempts to run Unix commands (make, cmake) in PowerShell, which fail

Expected Behavior:
Agent should execute commands in the currently active terminal (WSL/bash) or provide a way to target specific terminal profiles.

Actual Behavior:
Agent's run_in_terminal tool is hardcoded to PowerShell. It spawns new PowerShell terminals even when only WSL terminals exist. No parameter exists to specify terminal type/profile.

Additional Context:

WSL is Microsoft's recommended solution for Linux development on Windows
Many projects require Unix toolchains (make, gcc, bash) unavailable in PowerShell
Network shares require Unix metadata support (mount -o metadata) only available in WSL
Agent can edit files but cannot automate builds, forcing manual command execution
This breaks workflow for embedded development, cross-compilation, and Linux-based tooling
Suggested Solution:
Add terminal profile targeting to run_in_terminal tool with parameter to specify terminal type, or auto-detect based on project context (presence of Makefile, .sh scripts, etc.).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions