anomalyco / anomalyco/opencode

[Desktop][Windows] v1.18.13 still repeatedly tries to install non-existent @opencode-ai/plugin@local on every startup

Open
#40,591 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 5, 2026.

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

Description

[Desktop][Windows] v1.18.13 still repeatedly tries to install non-existent @opencode-ai/plugin@local on every startup

Summary

OpenCode Desktop (Windows, v1.18.13, latest as of 2026-08-05) still attempts to install @opencode-ai/plugin@local on every startup / agent open. local is not a published version or dist-tag on npm, so every attempt fails with NpmInstallFailedError. On my machine this happens ~10 times per launch (bursts of 7-9 failures within 1-2 seconds), each attempt triggering the desktop "error" alert sound and adding seconds of startup latency.

This was previously reported in #26003 (closed automatically after 60 days of inactivity, not fixed), #27676, #30197. It is still reproducible on v1.18.13.

Environment

Field Value
OS Windows 11
Client OpenCode Desktop (Electron)
Desktop version 1.18.13 (also reproduced on 1.18.11)
Bundled Node v24.16.0

Steps to reproduce

  1. Install OpenCode Desktop 1.18.13 on Windows.
  2. Open the app (or switch to an agent). Watch the UI / listen for the error alert sound.
  3. Check %USERPROFILE%\.local\share\opencode\log\opencode.log.

Observed log (2026-08-05, ~10 failures on this launch)

timestamp=2026-08-05T02:10:26.771Z level=WARN run=fd26596d message="background dependency install failed" dir="C:\\Users\\RALF\\.opencode" error="Cause([Fail(NpmInstallFailedError (cause: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local.))])"
timestamp=2026-08-05T02:10:27.182Z level=WARN run=fd26596d message="background dependency install failed" dir="C:\\Users\\RALF\\.opencode" error="Cause([Fail(NpmInstallFailedError (cause: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local.))])"
timestamp=2026-08-05T02:10:27.261Z level=WARN run=fd26596d message="background dependency install failed" dir="C:\\Users\\RALF\\Documents\\OPENCODE\\临时\\.opencode" error="Cause([Fail(NpmInstallFailedError (cause: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local.))])"
... (7 more within the same second)

Affected directories on this machine: C:\Users\RALF\.opencode (425+ historical failures), C:\Users\RALF\Documents\OPENCODE\临时\.opencode (45+). The directories contain only .gitignore, skills/, commands/no package.json at all, yet the dependency installer still runs npm install @opencode-ai/plugin@local.

Root cause (from #26003 analysis, still unfixed)

  • packages/core/src/installation/version.ts:
    export const InstallationVersion = typeof OPENCODE_VERSION === "string" ? OPENCODE_VERSION : "local"
    
  • The Desktop release is built without injecting OPENCODE_VERSION, so InstallationVersion falls back to "local".
  • packages/opencode/src/config/config.ts then pins @opencode-ai/plugin to InstallationVersion@opencode-ai/plugin@local, which does not exist on the npm registry.
  • A local package.json with a valid version (e.g. "@opencode-ai/plugin": "1.18.11") does not help — the installer passes @local explicitly and ignores the manifest.

Impact

  • Audible: every failed install triggers the desktop "Play sound when an error occurs" alert → the well-known burst of 7-9 beeps on startup (related: #32389).
  • Performance: each failed npm install takes several seconds; multiple projects × repeated retries add ~20-40s of startup latency (related: #27676 measured ~30s).
  • Log noise: dozens of WARN lines per day.

Expected behavior

The Desktop build should be produced with OPENCODE_VERSION (and OPENCODE_CHANNEL) defined, so dependency installs use a real published version like @opencode-ai/plugin@1.18.13. Alternatively, skip the dependency-install step entirely when no package.json/plugin files exist in the .opencode directory.

Suggested tags

desktop, windows, performance, bug

Related issues

#26003, #27676, #30197, #32389

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.