anomalyco / anomalyco/opencode

Plugins cause repeated dependency installation on startup when package-lock=false

Open
#48,147 0 comments 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Sep 9, 2026.

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

Description

Description

When ~/.npmrc contains package-lock=false, enabling any external plugin causes OpenCode to repeatedly install dependencies on startup. This can noticeably delay startup on slow npm registry connections.

OpenCode installs @opencode-ai/plugin in its config directory and checks package-lock.json to decide whether installation is needed. If no lockfile exists, the check fails on every startup and triggers arborist.reify() again, even when dependencies are already installed.

Plugins

No response

OpenCode version

No response

Steps to reproduce
  1. Set package-lock=false in ~/.npmrc, with no project-level override.
  2. Enable a plugin in OpenCode.
  3. Ensure ~/.config/opencode/package-lock.json does not exist.
  4. Start OpenCode multiple times.
Expected behavior

Unchanged, already-installed dependencies should not trigger installation on every startup.

Actual behavior

arborist.reify() runs on every startup, and plugin loading waits for it to finish.

Environment
Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

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.