anomalyco / anomalyco/opencode
Desktop: Open in PowerShell fails on Windows — 'open-path' passes project path as a command (CommandNotFoundException)
@Hona is already working on this.
Since Jul 31, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
On Windows, right-clicking a project and choosing to open it in PowerShell fails. The desktop app invokes the \open-path\ IPC method, which runs:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe D:\Develop\Docker\cli-proxy-api D:\Develop\Docker\cli-proxy-api
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
- D:\Develop\Docker\cli-proxy-api
-
+ CategoryInfo : ObjectNotFound: (D:\Develop\Docker\cli-proxy-api:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
``
Full error dialog: \Error invoking remote method 'open-path': Error: Command failed: ...\
Root cause
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.
Environment
- OpenCode Desktop: 1.18.10
- OS: Windows
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.