anomalyco / anomalyco/opencode

Replacing a configured plugin dist directory disables hot reload

Open
#44,017 0 comments 0 reactions 1 assignee View on GitHub

@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
  1. Configure a local plugin at /plugin/dist/index.js.
  2. Start OpenCode and confirm the plugin is active.
  3. Replace dist/ as part of a build.
  4. 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

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.