anomalyco / anomalyco/opencode

[Desktop][Windows] Bash tool fails with Wsl/Service/CreateInstance/E_ACCESSDENIED while CLI works

Open
#43,349 4 comments 0 reactions 1 assignee View on GitHub

@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

  1. Open OpenCode Desktop on Windows.

  2. Start a session using MiniMax-M3.

  3. Ask the agent to execute:

    Get-Date

  4. 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
Image

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.