throwing errors in plugins doesnt work anymore #3436

Closed
opened 2026-02-16 17:40:04 -05:00 by yindo · 3 comments
Owner

Originally created by @ryanleecode on GitHub (Dec 9, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

https://github.com/sst/opencode/blame/3d95848607304daa3f51f975f94d7380f56a12c1/packages/opencode/src/plugin/index.ts#L70

The error that is thrown by hooks is now caught and supressed which is a regression

OpenCode version

1.0.141

Steps to reproduce

Try using the https://opencode.ai/docs/plugins/#env-protection plugin

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @ryanleecode on GitHub (Dec 9, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description https://github.com/sst/opencode/blame/3d95848607304daa3f51f975f94d7380f56a12c1/packages/opencode/src/plugin/index.ts#L70 The error that is thrown by hooks is now caught and supressed which is a regression ### OpenCode version 1.0.141 ### Steps to reproduce Try using the https://opencode.ai/docs/plugins/#env-protection plugin ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:40:04 -05:00
yindo closed this issue 2026-02-16 17:40:04 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 9, 2025):

This issue might be a duplicate of or related to:

  • #4850: Plugin syntax errors are handled poorly

While #4850 focuses on syntax errors in plugins, it's related to the broader issue of plugin error handling. You might want to check if there's overlap in how errors from plugins are handled in general. The issue links to code at the same location (plugin/index.ts) so they may share root cause.

@github-actions[bot] commented on GitHub (Dec 9, 2025): This issue might be a duplicate of or related to: - #4850: Plugin syntax errors are handled poorly While #4850 focuses on syntax errors in plugins, it's related to the broader issue of plugin error handling. You might want to check if there's overlap in how errors from plugins are handled in general. The issue links to code at the same location (plugin/index.ts) so they may share root cause.
Author
Owner

@rekram1-node commented on GitHub (Dec 10, 2025):

fix: https://github.com/sst/opencode/commit/070ced0b3fb0f69e9b385d22220d2be2e2d238b0

@rekram1-node commented on GitHub (Dec 10, 2025): fix: https://github.com/sst/opencode/commit/070ced0b3fb0f69e9b385d22220d2be2e2d238b0
Author
Owner

@rekram1-node commented on GitHub (Dec 10, 2025):

fixed in next release

@rekram1-node commented on GitHub (Dec 10, 2025): fixed in next release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3436