anomalyco / anomalyco/opencode
[Desktop][Windows] Bash tool fails with Wsl/Service/CreateInstance/E_ACCESSDENIED while CLI works
@Hona is already working on this.
Since Aug 19, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
OpenCode Desktop on Windows cannot execute commands through its built-in
bash tool. OpenCode CLI works correctly on the same machine.
The failure occurs when Desktop tries to start:
C:\Windows\System32\bash.exe
This executable returns:
Wsl/Service/CreateInstance/E_ACCESSDENIED
OpenCode Desktop then displays:
"Shell Failed"
and reports that the bash tool returned an internal argument error.
Environment
- OS: Windows 11
- OpenCode Desktop version: [add version]
- OpenCode CLI version: [add version]
- Provider/model: MiniMax-M3
- OpenCode Desktop backend: local Windows backend
- OpenCode CLI: works correctly on the same machine
- WSL: installed, but unavailable to the Desktop bash tool
Steps to reproduce
-
Open OpenCode Desktop on Windows.
-
Start a session using MiniMax-M3.
-
Ask the agent to execute:
Get-Date
-
Ask it to execute:
echo HOLA-DESDE-OPENCODE
Actual behavior
The Desktop bash tool fails repeatedly and displays:
Shell Failed
The assistant reports:
"The bash tool is returning an internal argument error."
Running bash or wsl directly from PowerShell produces:
Wsl/Service/CreateInstance/E_ACCESSDENIED
Expected behavior
The built-in bash tool should execute commands successfully on Windows,
or OpenCode Desktop should provide a way to select PowerShell as the
Windows shell.
Additional observations
-
PowerShell itself works correctly:
powershell.exe -NoProfile -Command "Get-Date"
-
OpenCode CLI works correctly on the same machine.
-
Serena works, but it runs inside a Docker/Linux container and is not
equivalent to executing commands on the Windows host. -
Serena returns Linux/UTC output because it runs inside Docker.
-
The session does not become corrupted and no orphaned tool_use is
observed. Therefore this is different from issue #21489. -
This is not a WSL-hosted OpenCode server and no UNC project path such as
\wsl.localhost\Debian is involved. Therefore this is different from
issue #19473.
Related issues
- #19473 - Desktop app sends UNC paths to a WSL-hosted server
- #21489 - Aborted bash calls can corrupt the session
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.