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
[Windows/2.1.1] Local plugin stuck failing with ENOENT for existing file until service restart #57658
On Windows + OpenCode 2.1.1 (serve --service), a local plugin directory
kept failing to load with ENOENT for a file that exists and is readable,
across every reload trigger (config edit, file touch, dir replacement). opencode service restart fixed it immediately; zero failures since.
Environment
Windows 11, OpenCode 2.1.1 (scoop install), background service
Local plugin at ~/.config/opencode/plugins/ponytail/ with package.json (type: module, main: index.js) + index.js +
nested node_modules/@dietrichgebert/ponytail
failed to load plugin target="C:\Users\anint\.config\opencode\plugins\ponytail"
cause="Cause([Die(Error: ENOENT: no such file or directory,
open 'C:\Users\anint\.config\opencode\plugins\ponytail\node_modules\@dietrichgebert\ponytail\hooks\ponytail-instructions.js')])"
The sibling local plugin (caveman, flat files, no nested node_modules)
loaded fine the whole time.
Verified facts (not guesses)
The file exists and is readable: direct node readFileSync, and reads of
the same path from inside a throwaway probe plugin loaded by the same
server, all succeed.
node -e import(...) of the plugin entrypoint succeeds outside the server.
The installed index.js is byte-identical to the known-good source.
Failed under: config remove/re-add, file touch, full directory
delete-and-atomic-replace, and a byte-identical copy under a fresh
directory name (fresh path loaded ~3x, then started failing too after
the watcher subscribed to its files).
After opencode service restart: both plugins load cleanly, no failures.
Suspected area (unconfirmed)
Looks like in-process loader state poisoned by an early sighting of the
plugin directory (it was created ~1min before node_modules finished
installing), never cleared by any reload trigger — or a watcher/hot-reload
interaction on Windows. Timelines correlate failures with watcher
subscribe events, but that correlation may be incidental.
Happy to provide the full server log excerpt or test a diagnostic build.
Thanks for the detailed report. I think this is a duplicate of #46095. There, on the Windows background service, a plugin that was loaded before its files had finished writing stays failed for the rest of the process. Touching the file, editing config and reloading all fail the same way, and only opencode service restart clears it. Your timeline matches that: the plugin directory existed about a minute before its nested node_modules finished installing, and only the restart fixed it.
Possible duplicates and related issues, ordered by likelihood:
We haven't heard back in the last day, so I'm closing this as a duplicate of #46095. That issue covers the same problem on the Windows background service: a plugin loaded before its files finish writing stays failed until opencode service restart. Please follow #46095 for updates. Your detail that a copy under a fresh directory name also started failing would be a useful comment there. If your problem turns out to be different, reply here and we can reopen this.
Activity
opencode-agent commentedon Oct 21, 2026
Thanks for the detailed report. I think this is a duplicate of #46095. There, on the Windows background service, a plugin that was loaded before its files had finished writing stays failed for the rest of the process. Touching the file, editing config and reloading all fail the same way, and only
opencode service restartclears it. Your timeline matches that: the plugin directory existed about a minute before its nestednode_modulesfinished installing, and only the restart fixed it.Possible duplicates and related issues, ordered by likelihood:
watcher.ignoreis not applied to plugin entrypoints or the config-directory watcher.Your finding that a copy under a fresh directory name also started failing would be useful to add on #46095.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 22, 2026
We haven't heard back in the last day, so I'm closing this as a duplicate of #46095. That issue covers the same problem on the Windows background service: a plugin loaded before its files finish writing stays failed until
opencode service restart. Please follow #46095 for updates. Your detail that a copy under a fresh directory name also started failing would be a useful comment there. If your problem turns out to be different, reply here and we can reopen this.