You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 15, 2026. It is now read-only.
[BUG] Context says powershell, but commands run using cmd.exe (when using inline terminal) #9933
When using the inline terminal mode (execa), Roo executes commands in cmd.exe instead of PowerShell, even though the system context reports PowerShell as the default shell and VS Code is configured to use PowerShell.
Context (who is affected and when)
Affects Windows users who have PowerShell set as their default terminal in VS Code or as their system default shell. The issue occurs when using Roo's inline terminal execution mode (not the VS Code integrated terminal mode). Users attempting to run PowerShell-specific commands directly will encounter errors.
Reproduction steps
Environment:
Windows 10/11
VS Code OSS with PowerShell configured as default terminal profile
Roo Code v3.36.2-universal
System default shell: PowerShell
Steps:
Start a Roo task in "code" mode
Request Roo to execute a PowerShell-specific command (e.g., Get-Location | Select-Object -ExpandProperty Path)
Observe the error: "'Get-Location' is not recognized as an internal or external command"
Verification:
Run echo %COMSPEC% through Roo → returns C:\WINDOWS\system32\cmd.exe
Contrast with reported context which states default shell is PowerShell
Expected result
PowerShell cmdlets should execute successfully. The command Get-Location should return the current directory path, respecting the user's configured default shell (PowerShell).
Actual result
Commands fail with "'Get-Location' is not recognized as an internal or external command, operable program or batch file." The terminal uses cmd.exe despite system/VS Code configuration specifying PowerShell.
Variations tried (optional)
Workaround: Wrapping PowerShell commands with powershell -Command "..." works but is not user-friendly
Temporary fix: Manually editing extension.js line 5488 to change shell:!0 to shell:"powershell.exe" resolves the issue
App Version
v3.36.2-universal
API Provider (optional)
None
Model Used (optional)
N/A (terminal execution issue, not model-specific)
Roo Code Task Links (optional)
No response
Relevant logs or errors (optional)
Example error when running PowerShell cmdlet:
'Get-Location' is not recognized as an internal or external command,
operable program or batch file.
Terminal shell verification:
echo %COMSPEC%
C:\WINDOWS\system32\cmd.exe
Context reports (misleading):
Their operating system is Windows_NT and their default shell is
C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
**Root cause location:**
File: `dist/extension.js`, Line 5488
Code: `this.subprocess=Dnt({shell:!0,cwd:...})`
The `shell:!0` (shell:true) causes execa library to default to cmd.exe on Windows,
ignoring user shell preferences.
**Suggested fix:**
Replace `shell:!0` with `shell:"powershell.exe"` or detect from VS Code settings.
Inline terminal mode does not use VS Code’s configured default terminal profile. It runs commands through the platform default shell selected by the underlying process launcher. On Windows that is cmd.exe, so PowerShell-only commands (cmdlets like Get-Location) will fail unless explicitly invoked via PowerShell.
If you want commands to respect your VS Code terminal profile (PowerShell/pwsh), run with the VS Code integrated terminal mode by enabling terminal shell integration in Roo settings (disable the “inline terminal” fallback).
If you want inline terminal mode to honor the VS Code default profile, that is a feature request rather than a bug.
Activity
hannesrudolph commentedon Jan 7, 2026
Very sorry for the late response!
Inline terminal mode does not use VS Code’s configured default terminal profile. It runs commands through the platform default shell selected by the underlying process launcher. On Windows that is
cmd.exe, so PowerShell-only commands (cmdlets likeGet-Location) will fail unless explicitly invoked via PowerShell.If you want commands to respect your VS Code terminal profile (PowerShell/pwsh), run with the VS Code integrated terminal mode by enabling terminal shell integration in Roo settings (disable the “inline terminal” fallback).
If you want inline terminal mode to honor the VS Code default profile, that is a feature request rather than a bug.