anomalyco / anomalyco/opencode
Plugins cause repeated dependency installation on startup when package-lock=false
@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
- Set
package-lock=falsein~/.npmrc, with no project-level override. - Enable a plugin in OpenCode.
- Ensure
~/.config/opencode/package-lock.jsondoes not exist. - 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
- OpenCode 1.18.30
- macOS ARM64
- npm registry: https://registry.npmjs.org
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
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.