anomalyco / anomalyco/opencode

Desktop WSL probe hardcodes /bin/true and misreports NixOS as needing first-run setup

Open
#44,508 0 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 23, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

OpenCode Desktop detects an initialized NixOS WSL2 distro as unavailable and shows “Open nixos once to finish setup.” The distro has already completed setup and can execute commands normally.

probeWslDistro() currently runs an absolute /bin/true (packages/desktop/src/main/wsl/runtime.ts). NixOS does not provide /bin/true by default, although true is available through the system profile. The non-zero result is mapped to canExecute: false, which produces the misleading first-run message.

Using true through the distro PATH instead of /bin/true should allow the probe to work on non-FHS distributions.

Plugins

Not relevant

OpenCode version

OpenCode Desktop 1.18.21

Steps to reproduce
  1. Install and initialize NixOS under WSL2.
  2. Confirm the distro and required tools work:
    wsl.exe -d nixos -- bash -lc "command -v bash; command -v curl; id"
    
  3. Compare the probe commands:
    wsl.exe -d nixos -- /bin/true  # exits 127: No such file or directory
    wsl.exe -d nixos -- true       # exits 0
    
  4. In Desktop, open Settings → Servers → Add WSL server.
  5. Select nixos. Desktop shows “Open nixos once to finish setup” and disables the Add button.
Screenshot and/or share link

The WSL server dialog shows nixos with “Open nixos once to finish setup.”

Operating System

Windows 11 build 26200.8875, WSL 2.6.3.0, NixOS WSL2

Terminal

Windows PowerShell / NixOS bash

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.