anomalyco / anomalyco/opencode

Preview/beta channel builds still pin @opencode-ai/plugin to an unpublished synthetic version

Open
#42,002 1 comment 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Aug 12, 2026.

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

Description

Description

#40764 fixed the @opencode-ai/plugin@local install failure for production desktop builds by defining OPENCODE_VERSION in build-node.ts. But the pin condition in packages/opencode/src/config/config.ts:443 and packages/opencode/src/config/tui.ts:242 still gates on InstallationLocal (InstallationChannel === "local"), not on whether the channel is actually "latest".

For any channel that isn't "local" or "latest" — beta, or a CI/branch build with OPENCODE_CHANNEL set explicitly — packages/script/src/index.ts assigns VERSION a synthetic, never-published string:

IS_PREVIEW = CHANNEL !== "latest"   // line 32
VERSION = `0.0.0-${CHANNEL}-${timestamp}`  // line 36, when IS_PREVIEW

InstallationLocal is false for these builds (channel isn't "local"), so the plugin installer still tries to pin that exact synthetic version:

version: InstallationLocal ? undefined : InstallationVersion

npm install @opencode-ai/plugin@0.0.0-<channel>-<timestamp> 404s — same failure mode as #37806/#30197, just scoped to beta/preview channels instead of every build.

Plugins

n/a — reproduces for any plugin that imports @opencode-ai/plugin, same as the original bug.

OpenCode version

Traced against origin/dev as of 2026-08-12 (after #40764 and #41889 merged).

Steps to reproduce
  1. Build the node/desktop bundle with OPENCODE_CHANNEL=beta and no OPENCODE_VERSION set.
  2. Script.channel returns "beta", Script.version returns 0.0.0-beta-<timestamp>.
  3. Run opencode against any project directory with an SDK-importing plugin.
  4. Background dependency install fires npm install @opencode-ai/plugin@0.0.0-beta-<timestamp> and fails.
Screenshot and/or share link

n/a — build-time logic bug, traced directly in source.

Operating System

n/a (not OS-specific — reproduces on any platform building a non-latest, non-local channel)

Terminal

n/a

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.