anomalyco / anomalyco/opencode

Desktop: Open in PowerShell fails on Windows — 'open-path' passes project path as a command (CommandNotFoundException)

Open
#39,851 4 comments 0 reactions 1 assignee View on GitHub

@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
  1. Open a Windows project in OpenCode Desktop (e.g. \D:\Develop\Docker\cli-proxy-api).
  2. Right-click the project (right side panel) and choose to open it in PowerShell.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.