You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V2 external plugins silently fail to register agents/tools after startup #42280
External v2 plugins (configured via plugin in opencode.json, or scanned from config directories) are loaded by ConfigExternalPlugin in a forked fiber. That fiber inherits the ambient State batch from location startup, which runs inside State.batch(...) and drains its reload set as soon as the startup effect returns. By the time an async plugin load finishes (dynamic import, npm install), the batch has long committed, so the plugin's transform() calls enqueue their reload into a set nobody ever drains. The plugin appears to load without error, but the agents/tools/skills/commands it registers never materialize.
Plugins
Any v2 effect/promise plugin, e.g. a local file plugin that registers an agent via ctx.agent.transform
OpenCode version
dev branch (v1.18.18)
Steps to reproduce
Write a v2 effect plugin that registers an agent, e.g. export default define({ id: "demo", effect: (ctx) => ctx.agent.transform((agents) => { agents.update("demo", (a) => { a.mode = "subagent" }) }).pipe(Effect.asVoid) })
Reference it from the plugin array in opencode.json
Start opencode and list agents — demo never appears, and nothing is logged
Activity
docs: document OpenCode Desktop plugin init limitation (v0.38.5)
github-actions commentedon Oct 13, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.