Skip to content

Server: background dependency install fails every session with @opencode-ai/plugin@local not found #30908

Closed as not planned

Description

@emaxlele

Description

Every time OpenCode Desktop starts, the server immediately begins an infinite retry loop trying to install @opencode-ai/plugin@local in the user's global config directory (~/.config/opencode/). The install always fails because local is not a valid npm version specifier for this package. The loop produces dozens of warnings per session and never recovers.

Environment

  • OpenCode Desktop: tested on 1.15.13 and 1.16.0
  • OS: Windows 11 x64
  • Config dir: C:\Users\<user>\.config\opencode

Log evidence

Every session log contains repeated bursts of this warning:

WARN  service=config dir=C:\Users\<user>\.config\opencode
      error=Cause([Fail(NpmInstallFailedError
        (cause: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local.))
      ])
      background dependency install failed

Observed retry cadence (from a single session):

  • +4 s, +2 s, +0.5 s, +0.8 s, +1.2 s, +2.5 s, +1.9 s … then every ~30–120 s indefinitely

The user's own ~/.config/opencode/package.json has the correct version pinned:

{
  "dependencies": {
    "@opencode-ai/plugin": "1.16.0"
  }
}

And node_modules/@opencode-ai/plugin is correctly installed at 1.16.0. The @local specifier is not coming from the user config — it is generated internally by the OpenCode server during the background install step.

Root cause hypothesis

The OpenCode server-side config service tries to install a locally-bundled copy of @opencode-ai/plugin (i.e. the version shipped inside the app binary) into the user's config node_modules. It does this by invoking npm with the version tag local, but:

  1. The npm registry has no dist-tag named local for @opencode-ai/plugin.
  2. There is no file: path resolution fallback.

The expected behaviour would be either:

  • Use "@opencode-ai/plugin": "file:<path-to-bundled-package>" to point npm at the copy bundled in the app, or
  • Use the semver version matching the running app (e.g. 1.16.0) and let npm fetch it from the registry.

Impact

  • Noisy log pollution in every session.
  • Continuous background npm-install retries waste CPU/IO.
  • Present since at least v1.15.13; still present in v1.16.0.

Steps to reproduce

  1. Install OpenCode Desktop (any recent version).
  2. Open the app and start any session.
  3. Inspect ~/.local/share/opencode/log (Linux) or %APPDATA%\ai.opencode.desktop\opencode\log (Windows).
  4. Observe repeated background dependency install failed warnings with @opencode-ai/plugin@local.

OpenCode version

1.15.13 / 1.16.0

Operating System

Windows 11 x64

Terminal

N/A (Desktop app)

Activity

  1. github-actions commented on Jun 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    These all describe the same root cause: the server generating an @opencode-ai/plugin@local specifier that npm cannot resolve. If your issue is distinct in some way, please clarify the difference.

  2. zh-impact commented on Jun 16, 2026

    @zh-impact

    Still issue on 1.17.7

  3. spam0115 commented on Jul 19, 2026

    @spam0115

    Still an issue
    timestamp=2026-07-19T01:21:34.527Z level=WARN run=cddf95d2 message="background dependency install failed" dir="C:\Users\...\.config\opencode" error="Cause([Fail(NpmInstallFailedError (cause: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local.))])"

  4. github-actions commented on Sep 19, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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