GeezerVison is showing github.com — Nix desktop ships an app version that does not match its bundled CLI · Issue #52121 · anomalyco/opencode
Nix desktop ships an app version that does not match its bundled CLI #52121DescriptionDescription
A Nix-built desktop reports one version and bundles a CLI that reports another:
- app:
2.0.19, from packages/desktop/package.json, untouched by the build
- bundled CLI:
2.0.19+<git rev>
The desktop hands the CLI version to the background service, and that gate compares strings exactly (packages/client/src/service-version.ts), so a Nix install and a released install stop each other's background service on every launch. Released builds do not hit this: publish.yml runs packages/desktop/scripts/prepare.ts, which keeps the two in sync. The Nix path cannot use it as-is: @opencode/script is not installed there, because nix/node_modules.nix excludes the root workspace from bun install.
Plugins
None
OpenCode version
Affected source: 2.0.19+c977050030
Steps to reproduce
nix build .#packages.x86_64-linux.opencode-desktop (needs the nix/hashes.json override from node_modules FOD hash is calibrated against one bun version — breaks with any other #49063).
- Read
package.json inside resources/app.asar → "version": "2.0.19".
cat resources/opencode-cli.version → 2.0.19+<rev>.
Screenshot and/or share link
Not applicable; excerpts included above.
Operating System
Linux x86_64, nixpkgs 26.11, nix 2.34.8
Terminal
Not applicable, the reproduction is command line only. Activitygithub-actions commented on Sep 29, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
- This is a bug report, but it does not use the Bug Report template's required Description field. Please use the Bug Report template and include a non-empty Description field; the existing reproduction details can be retained.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
- #35122: also reports desktop/CLI version mismatch, though it concerns Desktop updates leaving a separately installed CLI outdated.
If you believe this was flagged incorrectly, please let a maintainer know. changed the title [-]nix: the Nix desktop reports a different app version than the CLI it bundles[/-] [+]Nix desktop ships an app version that does not match its bundled CLI[/+] on Sep 29, 2026github-actions commented on Sep 29, 2026 Thanks for updating the report. It still needs to use the Bug Report template and include its required Description field with the issue description. The reproduction steps and system information already provided can stay as they are. github-actions commented on Sep 29, 2026 Thanks for updating the issue with the description, reproduction steps, and system details! opencodejr commented on Oct 28, 2026 Thanks for the detailed report. I couldn't confirm this in this run: I started the Nix desktop build both on current dev (86ce19d) and on a commit from around your report (c079050, #51891), but neither finished in the time I had, so a maintainer will need to check the build output.
From reading the code only (not verified): on current dev, nix/desktop.nix inherits OPENCODE_VERSION from the CLI derivation, and packages/desktop/electron-builder.config.ts now uses OPENCODE_VERSION as the app version when it is set (added in #59046, which also replaced prepare.ts). If so, a Nix build from dev should report the same <version>+<rev> for both the app and the bundled CLI. Separately, the background service check still compares the bundled CLI's version string exactly, so a Nix build (2.2.0+<rev>) and a released install (2.2.0) could still stop each other's service even with matching app and CLI versions.
If you can, it would help to know whether a current dev build still shows the mismatch, and whether the clash with a released install still happens.
Related: #52122 (Nix desktop arms the production auto-updater), #49063 (node_modules hash override), #52863 (Nix derivation not built in CI), #59601 (desktop 2.2.0 Nix build).
neriousy commented on Nov 19, 2026 This should be resolved by #59046: the desktop build now takes the app version from OPENCODE_VERSION, and the Nix desktop derivation inherits that from the CLI derivation and writes the same value into opencode-cli.version, so the app and the bundled CLI report the same version. If a current Nix build still shows two different versions, comment here and we'll reopen.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|