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
Inconsistency: Plugin tools cannot return image attachments despite the internal tool system fully supporting them. #21383
The fromPlugin wrapper in the registry discards any possibility of attachments because the ToolDefinition type constrains execute to Promise. Native tools and MCP tools both support attachments through the same downstream pipeline.
Why it matters: Without attachment support, custom tools are limited to text only output. Use cases like browser automation need to return screenshots for the model to reason about visually. The only current alternatives are MCP or forking, which are disproportionate to a small patch.
Plugins
No response
OpenCode version
v1.3.17
Steps to reproduce
Create .opencode/tool/screenshot-test.ts with an appropriate tool that returns a base64 image
Start bun dev server, create a session, send "Take a screenshot using the screenshot-test tool"
Inspect the message history: the tool part shows output: "data:image/png;base64,..." as plain text with attachments: NONE
Compare with the built-in read tool on any PNG: it returns output: "Image read successfully" with attachments: [{ type: "file", mime: "image/png", url: "data:..." }]
Activity
github-actions commentedon Apr 7, 2026
This issue might be a duplicate of (or closely related to) an existing issue. Please check:
ToolResultstructured responses for plugin tools and explicitly noted attachment propagation as future work — it covers the same gap you're describing.osovv commentedon Apr 19, 2026
Bump, this is required for several of my custom tools
ctrhub commentedon May 12, 2026
Bump