Skip to content

Project-level local plugin causes OpenCode v1.16.0 startup to hang #30904

Description

@Tomorrowdawn

Description

Summary

OpenCode v1.16.0 appears to hang during startup when a project contains any local plugin under .opencode/plugins/.

This does not seem to be caused by the plugin implementation itself: even a minimal empty plugin reproduces the issue. Downgrading to v1.15.12 makes the same project start normally.

Environment

  • OpenCode: 1.16.0
  • OS: Ubuntu under WSL
  • Install path: ~/.opencode/bin/opencode
  • Bun: 1.3.14
  • Project uses project-level local plugin directory: .opencode/plugins/

Minimal Reproduction

Create a new project:

mkdir opencode-plugin-repro
cd opencode-plugin-repro
mkdir -p .opencode/plugins

Add a minimal local plugin:

cat > .opencode/plugins/minimal.js <<'EOF'
export const MinimalPlugin = async () => ({})
EOF

Run:

opencode debug config

Expected Behavior

OpenCode should start normally and load the local plugin quickly.

Actual Behavior on v1.16.0

opencode debug config hangs or exceeds 30s timeout.

In logs, startup reaches internal plugin loading and then stops before loading the project local plugin:

service=plugin ... loading internal plugin
service=plugin ... loading internal plugin
...

It does not proceed to:

service=plugin path=file://.../.opencode/plugins/minimal.js loading plugin

Control Test: Remove Local Plugin

If .opencode/plugins/minimal.js is removed, the same project starts quickly:

rm .opencode/plugins/minimal.js
timeout 30s opencode debug config

This completes in under 1s.

Control Test: Downgrade to v1.15.12

Downgrading OpenCode fixes the issue:

opencode upgrade 1.15.12 --method curl
opencode --version
# 1.15.12

With the same .opencode/plugins/minimal.js present:

timeout 30s opencode debug config

Result: succeeds. After first-run cache work, subsequent runs complete in around 1s.

Logs show the local plugin loads:

service=plugin path=file:///.../.opencode/plugins/minimal.js loading plugin

Additional Notes

This also reproduces with a real project plugin, but the minimal empty plugin above is sufficient. Clearing proxy-related environment variables did not change the behavior.

This looks like a regression in v1.16.0 around project-level local plugin discovery/loading, or the Bun/dependency handling path triggered by local plugins.

Plugins

described in the issue

OpenCode version

0.16.0

Steps to reproduce

See issue body

Screenshot and/or share link

No response

Operating System

Linux Ubuntu

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions