"@opencode-ai/plugin" error when creating custom tools, #1979

Closed
opened 2026-02-16 17:33:33 -05:00 by yindo · 1 comment
Owner

Originally created by @moda20 on GitHub (Oct 6, 2025).

I create a custom tool based on the docs here : https://opencode.ai/docs/custom-tools/#structure
and when mentioning this tool in the chat i get this error

Cannot find module "@opencode-ai/plugin" from /username/.config/opencode/tool/tool.ts

should i place the tool in a typescript project and have node module installed ? or is everything just injected by opencode ?

Originally created by @moda20 on GitHub (Oct 6, 2025). I create a custom tool based on the docs here : https://opencode.ai/docs/custom-tools/#structure and when mentioning this tool in the chat i get this error ``` Cannot find module "@opencode-ai/plugin" from /username/.config/opencode/tool/tool.ts ``` should i place the tool in a typescript project and have node module installed ? or is everything just injected by opencode ?
yindo closed this issue 2026-02-16 17:33:33 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 6, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2802: Reports the same "Cannot find module @opencode-ai/plugin" error when trying to run custom tools without external dependencies installed in the .opencode directory

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 6, 2025): This issue might be a duplicate of existing issues. Please check: - #2802: Reports the same "Cannot find module @opencode-ai/plugin" error when trying to run custom tools without external dependencies installed in the .opencode directory Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1979