anomalyco / anomalyco/opencode
Replacing a configured plugin dist directory disables hot reload
@rekram1-node is already working on this.
Since Aug 21, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
A configured local plugin such as /plugin/dist/index.js is watched at the entrypoint. Replacing dist/ during a build destroys that watch, and the transient missing entrypoint removes the working plugin generation. Recreating dist/index.js then does not restore it without restarting OpenCode.
This is narrower than #39987: normal edits reload, but generated-directory replacement loses both the watch and the last valid generation.
Plugins
Configured local plugin built to dist/index.js
OpenCode version
V2 at 2c8e2a2b2
Steps to reproduce
- Configure a local plugin at
/plugin/dist/index.js. - Start OpenCode and confirm the plugin is active.
- Replace
dist/as part of a build. - Observe the plugin disappears and the recreated entrypoint is not activated until restart.
Screenshot and/or share link
N/A
Operating System
macOS (also applies to directory-replacing builds elsewhere)
Terminal
Any
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.