Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
When a custom tool plugin in ~/.config/opencode/tools/ fails to load (e.g. missing npm dependency, syntax error, or module resolution failure), opencode surfaces a generic "Unexpected server error. Check server logs for details." to the user with no indication of what went wrong.
The server log itself shows a raw ResolveMessage stack trace with no user-friendly explanation:
ResolveMessage: Cannot find module '@opencode-ai/plugin' from '/home/user/.config/opencode/tools/slack_lint.ts'
This requires the user to:
- Know that server logs exist at
~/.local/share/opencode/log/opencode.log
- Dig through thousands of log lines
- Parse a raw Bun module resolution error to understand the problem
Proposed solution
Surface tool-load failures as readable messages in the UI/CLI instead of the opaque "Unexpected server error". At minimum, log the error in a way that clearly states what failed and how to fix it — for example:
Failed to load tool slack_lint: missing dependency @opencode-ai/plugin. Run npm install in your config directory.
This would save users significant debugging time and make custom tool development much more approachable.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
When a custom tool plugin in
~/.config/opencode/tools/fails to load (e.g. missing npm dependency, syntax error, or module resolution failure), opencode surfaces a generic "Unexpected server error. Check server logs for details." to the user with no indication of what went wrong.The server log itself shows a raw
ResolveMessagestack trace with no user-friendly explanation:This requires the user to:
~/.local/share/opencode/log/opencode.logProposed solution
Surface tool-load failures as readable messages in the UI/CLI instead of the opaque "Unexpected server error". At minimum, log the error in a way that clearly states what failed and how to fix it — for example:
This would save users significant debugging time and make custom tool development much more approachable.