GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE(app)]: display image attachments from tool results in chat UI · Issue #21227 · anomalyco/opencode

[FEATURE(app)]: display image attachments from tool results in chat UI #21227

New issue
Copy link
New issue
Copy link
Done
#66430
Done
[FEATURE(app)]: display image attachments from tool results in chat UI#21227
#66430
Copy link
Assignees
jlongster

Description

@neilli418
neilli418
opened on Apr 6, 2026
Issue body actions

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

When a tool returns image data — via webfetch fetching an image URL, or an MCP server returning an ImageContent block — the image is stored in part.state.attachments and correctly forwarded to the model via the supportsMediaInToolResults pipeline in message-v2.ts. However, the image is never rendered in the chat UI. The user has no visual feedback that a tool produced image output.

Current behavior

Images in part.state.attachments are invisible in the UI. The only indication something happened is the tool call row (e.g. "Called webfetch") with no image shown.

Expected behavior

Images from tool result attachments render inline below the tool call row, with click-to-fullscreen preview — consistent with how user-uploaded image attachments are displayed in UserMessage.

Proposed fix

In ToolPartDisplay (message-part.tsx), after the tool component renders, check part.state.attachments for entries where mime.startsWith("image/") and render them using the existing dialog.show(() => <ImagePreview .../>) pattern. CSS scoped to [data-component="tool-part-wrapper"].

  • No new dependencies
  • No changes outside packages/ui
  • Applies to all tools that populate attachments — built-in (webfetch, read) and MCP alike

Related

  • fix(app): render MCP tool output in GenericTool #15865 — similar effort for MCP text output visibility
Reacted by bm, zhboner, Emmanuel Deloget, filatovzru, Pavel, Bernhard Berger, Andreas Hald, Ali MoezGholami, TheOriginal92, Mauricio Scheffer and 5 more
Reacted by Bernhard Berger and Alex Gvozden

Activity

  1. neilli418
    added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Apr 6, 2026
  2. github-actions
    assigned
    thdxr
    on Apr 6, 2026
  3. github-actions
    added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 6, 2026
  4. zhboner commented on Apr 8, 2026

    @zhboner
    zhboner
    on Apr 8, 2026
    More actions

    Besides gemini images, standard markdown image format, e.g., is not supported in UI either. :(

  5. thdxr
    assigned
    rekram1-node
    and unassigned
    thdxr
    on Apr 26, 2026
  6. thdxr
    removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  7. thdxr
    assigned
    jlongster
    and unassigned
    rekram1-node
    on May 3, 2026
  8. bernhardberger commented on May 29, 2026

    @bernhardberger
    bernhardberger
    on May 29, 2026
    More actions

    I’m also hitting this in OpenCode web: image attachments from tool results are not rendered in the chat UI, so I have to expose the image through a temporary URL and paste a link instead.

    #21352 appears to address this directly and still merges conflict-free against current dev.

  9. johnwmail
    marked [FEATURE]: able to show the image on WebUI. (and even on TUI) #31327 as a duplicate of this issue on Jun 8, 2026
  10. AndreasHald commented on Jul 15, 2026

    @AndreasHald
    AndreasHald
    on Jul 15, 2026
    More actions

    Would love this aswell, I can ask the ai to take screenshots from my phone via Opencode web, but it can't show me the screenshot

    Reacted by TheOriginal92
  11. TheOriginal92 commented on Aug 31, 2026

    @TheOriginal92
    TheOriginal92
    on Aug 31, 2026
    More actions

    Another concrete case for this: I drive a fairly large MCP stack from opencode web (1.18.5 in Docker), and several of those tools return screenshots.

    The pipeline works right up to the last step. session/tools.ts turns MCP image content into a data:<mime>;base64,… attachment, it lands in part.state.attachments, the SDK exposes it on SessionMessageToolStateCompleted, and the model receives it. Only the UI drops it, so the images are invisible to the person sitting in front of the session — which is exactly the case where you want to see them.

    Worth noting the same data path also covers the built-in read tool, which builds identical data URIs in tool/read.ts. A UI-side fix would therefore cover both without touching the server.

    There are now two closed PRs for this (#21352 and #38846), both closed by the automated cleanup without a review, plus one open draft (#39817). Since the contributing guidelines route UI features through a design review first: is there a preferred direction from the team? Happy to test whichever lands.

    Reacted by Yves Renier, Mauricio Scheffer and Alex Gvozden
  12. opencodejr commented on Oct 29, 2026

    @opencodejr
    opencodejrBot
    on Oct 29, 2026
    Contributor
    More actions

    Thanks for the detailed request, @neilli418!

    To restate it: when a tool returns an image (an MCP ImageContent block, or webfetch on an image URL), the image is sent to the model but never shown in the chat. You'd like it shown under the tool call, with click-to-preview like user-attached images.

    The current v2 app still works this way. The tool row shows only the text parts of a tool's result. The one exception is the read tool, which loads its image from disk. Image results from MCP tools and webfetch aren't displayed. Maintainers will consider this.

    Related:

    • feat(ui): display image attachments from tool results #21352 and feat(ui): display image attachments from tool results #38846: earlier PRs that added this to the v1 UI. Both were closed without being merged.
    • perf(app): open sessions without downloading read-tool images #58586: changes how the app loads read-tool images in the timeline.

    This can't be built as a GUI plugin yet, because the plugin API has no way to render tool results.

  13. opencodejr
    marked Desktop app drops MCP image content blocks (Android renders them) #64012 as a duplicate of this issue on Nov 15, 2026
  14. devicbest commented on Nov 15, 2026

    @devicbest
    devicbest
    on Nov 15, 2026
    More actions

    Same symptom here (from #64012): a local MCP tool returning [ImageContent(png), TextContent] renders the image inline on the Android app, but the Desktop app (2.3.0, Windows 11) shows only the text block \u2014 the image is silently dropped, same session on both clients. So the server/transport delivers it; only the desktop timeline row ignores non-text parts. Happy to provide logs or a minimal repro MCP server if it helps.

  15. VRMX6557 commented on Nov 19, 2026

    @VRMX6557
    VRMX6557
    on Nov 19, 2026
    More actions

    Reproduced on current Desktop 2.3.2 (Windows 11 Pro, release/latest). Updates to the existing report:

    • Not limited to MCP/webfetch — experimental_image_generate results are dropped too (configured with opencode/grok-imagine-image-2.0). Generation succeeds; only the Desktop timeline drops the media.
    • The read exception mentioned in the maintainer bot comment no longer holds on 2.3.x: reading a PNG via read also does not display the image in the Desktop timeline.
    • Same session renders images correctly on Android; Desktop shows text/path only (matches Desktop app drops MCP image content blocks (Android renders them) #64012, closed as duplicate on 2026-11-15).
    • No image-related errors in main.log / renderer.log — only [server-request-queue] server thrashing detected.
    • Plugins ruled out: ./plugins/tools-gate, @tarquinen/opencode-dcp, @joe-broadhead/opencode-mem.

    Workaround until fixed: tools.browser.preview({ path }) opens the saved image in the Desktop Review pane, which renders it correctly. Confirmed on 2.3.2.

    Reacted by Ernesto Martínez Gómez
  16. ulab commented on Nov 22, 2026

    @ulab
    ulab
    on Nov 22, 2026
    More actions

    Independent repro on opencode Desktop v2.3.2 (macOS) with a real MCP server — adds a control case and a second client

    Setup: prusa-mcp (Prusa Connect printer fleet). The camera_snapshot tool returns the latest camera JPEG as an image content block, plus a text metadata block.

    • The image reaches the model: the agent described the frame contents in detail (objects, text within the frame, positions) — server→model transport is intact.
    • Nothing shows in the chat UI: only the tool row with the text metadata — no thumbnail, no attachment indicator, no error.
    • Control case in the same conversation: images attached to regular agent replies (file paths) render fine — so the drop is specific to tool-result image attachments (state.attachments), not image rendering in general.
    • Second client: identical behavior on OpenChamber (a macOS client built on the opencode UI stack) — both front-ends share the timeline renderer, consistent with the Oct 29 confirmation and the Nov 15/19 Desktop reports in this thread.
    • Workaround that works on both clients: save the image to disk and attach the file in the reply (or open it in the Review pane, per @VRMX6557).
  17. opencodejr
    marked desktop: images from tool results never render in chat #66062 as a duplicate of this issue on Nov 24, 2026
  18. psourdea-lgtm commented on Nov 24, 2026

    @psourdea-lgtm
    psourdea-lgtm
    on Nov 24, 2026
    More actions

    +1 — same problem on OpenCode Desktop 2.x, Linux (Ubuntu 24.04, x86_64, .deb install).

    Use case: a remote MCP server (Cisco UC administration) exposes a phone_screenshot tool that captures the display of a Cisco IP phone. The tool result contains only an MCP image content block, no text:

    {
      "content": [
        { "type": "image", "data": "<base64 PNG>", "mimeType": "image/png" }
      ]
    }

    Observed:

    • The model receives the image correctly (it can describe the phone screen in detail), so the server and transport are fine.
    • In the Desktop timeline the tool call only shows Called <tool> host=... ip_phone=...; the image is never rendered, whatever the Timeline settings (detail level, "Other tools" Group on/off, etc.).
    • Same behaviour when the tool is called through Code Mode execute: the script returns null and the image is only forwarded to the model.

    Expected: MCP ImageContent blocks rendered inline (or expandable) in the tool row, as the Android client already does (#64012).

    For tools whose main output is an image (screenshots, charts, diagrams), the user currently has no way to see the result in the Desktop app.

  19. neriousy
    closed this as completedin #66430on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jlongster
    jlongster

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.