Repository navigation
Description
Summary
When a plugin fails to load (e.g. skill.transform schema failure), the failure state persists in the opencode serve --service process for its entire lifetime. Restarting the TUI does not retry the plugin, no API endpoint can trigger a reload, and the error message does not name the actual recovery step (restarting the background service). The plugin appears permanently broken even after the underlying cause is fixed.
Environment
- opencode version: v2.0.19
- OS: Linux 6.8.0-138-generic (Ubuntu 22.04, x86_64)
- Terminal: xterm-256color, COLORTERM=truecolor
- Shell: /bin/bash
- Install/channel: latest
- Active plugins: @mathew-cf/opencode-memory@2.1.0
Reproduction
- Configure a plugin whose state transform fails schema validation (ours produced
SchemaError: Missing key at ["path"]duringskill.transform). - Start opencode; the server logs
disabled plugin after transform failurewith aref. - Fix the plugin file on disk while
serveis still running. - Close the TUI window and open a new one — the new CLI connects to the same
serve --serviceprocess. GET /api/pluginstill returns{"status":"failed","error":"Plugin disabled after skill.transform failed. Check server logs for details.","ref":"err_f96a8637"}— same ref as before, no retry happened.- Attempt recovery via API:
POST /api/plugin/check→ returns the plugin list, state unchangedPOST /api/plugin/updatewith validtargets→ returns empty, state unchangedPOST /api/plugin/reload,/api/plugin/refresh,/api/plugin/enable→ 404
- Kill the
opencode serve --serviceprocess and reopen opencode → the plugin loads successfully.
Expected Behavior
One of:
- Failed plugins are retried when the plugin file changes (the file watcher already watches plugin directories), or on new client connection/restart; or
- A reload/retry entrypoint exists (
POST /api/plugin/reload, or a retry action in the/pluginsview); or - At minimum, the error message states the required recovery step (e.g. "restart the opencode background service") instead of only "Check server logs for details".
Actual Behavior
The failure state lives in serve-process memory until the process is killed. Closing and reopening the TUI has no effect, which presents as a permanently broken plugin. The visible error — Plugin disabled after skill.transform failed. Check server logs for details. — points to logs, but the logs don't name a recovery action either. Meanwhile GET /api/plugin reports status: failed with a stale ref from before the fix was applied.
Additional Context
-
Server log line:
2026-09-29T08:49:21.608Z level=WARN message="disabled plugin after transform failure" plugin.id=opencode-memory state=skill ref=err_f96a8637 cause="Cause([Die(SchemaError(Missing key at [\"path\"]))])" -
After the plugin source was corrected on disk, serve never re-attempted the load; only a full serve restart recovered it.
-
State persistence behavior is deterministic: any plugin that fails once stays failed until the serve process restarts.
-
Suggestion: surface failed plugins in the
/pluginsTUI view with a "retry" action, or add aPOST /api/plugin/:id/retryendpoint.
Activity
github-actions commentedon Sep 29, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.