anomalyco / anomalyco/opencode
Preview/beta channel builds still pin @opencode-ai/plugin to an unpublished synthetic version
@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
- Build the node/desktop bundle with
OPENCODE_CHANNEL=betaand noOPENCODE_VERSIONset. Script.channelreturns"beta",Script.versionreturns0.0.0-beta-<timestamp>.- Run opencode against any project directory with an SDK-importing plugin.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.