Skip to content

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

Closed as not planned

Description

@zjm54321

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

Activity

  1. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions