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 }}
Repository navigation
Desktop: Open in PowerShell fails on Windows — 'open-path' passes project path as a command (CommandNotFoundException) #39851
PowerShell then treats the project path as a command to execute, producing:
``
The term 'D:\Develop\Docker\cli-proxy-api' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
The project directory is passed to \powershell.exe\ as a positional argument (twice), instead of using -Command "Set-Location ''", -WorkingDirectory, or spawning with a \cwd\ option. PowerShell interprets the first positional argument as a script/command to run, hence \CommandNotFoundException.
Steps to reproduce
Open a Windows project in OpenCode Desktop (e.g. \D:\Develop\Docker\cli-proxy-api).
Right-click the project (right side panel) and choose to open it in PowerShell.
Observe the failure dialog above.
Expected behavior
A PowerShell window opens with the working directory set to the project folder.
These issues appear to describe the same root cause and symptoms. If the bug is still present in your version despite those being closed, please note that in a comment so maintainers can reopen or track accordingly.
Reproduction on v1.18.10 (Windows): right-click project -> open in PowerShell -> failure dialog with Error invoking remote method 'open-path' and the project path passed as a positional argument to powershell.exe (twice).
Suggested fix for maintainers: build the command as powershell.exe -NoExit -Command "Set-Location -LiteralPath '<project path>'", or spawn with a cwd option instead of passing the path as an argument.
Opened a PR for this: #46712 — it uses cmd.exe /c start with a Base64 -EncodedCommand instead of spawn + detached (which doesn't surface a console window on Windows), verified on Windows 11 with project paths containing spaces, single quotes, % chars, and non-ASCII characters.
Still reproducible in OpenCode Desktop v1.18.31 (latest release, published Sep 14) on Windows 11 — "Open in → PowerShell" fails with the same CommandNotFoundException.
Activity
github-actions commentedon Jul 31, 2026
This issue might be a duplicate of existing issues. Please check:
CommandNotFoundExceptionwith project path passed as positional argument)open-pathIPC handler issue)These issues appear to describe the same root cause and symptoms. If the bug is still present in your version despite those being closed, please note that in a comment so maintainers can reopen or track accordingly.
lu4er commentedon Jul 31, 2026
The bug is still present in the latest version (v1.18.10, released 2026-07-30). I checked all three referenced issues:
CommandNotFoundException). It was closed by the issue author themselves with no fix PR linked (the only cross-reference is this new issue Desktop: Open in PowerShell fails on Windows — 'open-path' passes project path as a command (CommandNotFoundException) #39851). Closing was likely accidental or premature.spawn [object Promise] ENOENT(resolved separately); it is NOT this bug.Reproduction on v1.18.10 (Windows): right-click project -> open in PowerShell -> failure dialog with
Error invoking remote method 'open-path'and the project path passed as a positional argument topowershell.exe(twice).Suggested fix for maintainers: build the command as
powershell.exe -NoExit -Command "Set-Location -LiteralPath '<project path>'", or spawn with acwdoption instead of passing the path as an argument.Please keep this issue open / reopen #27636.
hokonoko commentedon Sep 2, 2026
Opened a PR for this: #46712 — it uses
cmd.exe /c startwith a Base64-EncodedCommandinstead ofspawn+detached(which doesn't surface a console window on Windows), verified on Windows 11 with project paths containing spaces, single quotes,%chars, and non-ASCII characters.hokonoko commentedon Sep 15, 2026
Still reproducible in OpenCode Desktop v1.18.31 (latest release, published Sep 14) on Windows 11 — "Open in → PowerShell" fails with the same CommandNotFoundException.
#46712 fixes this.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊