opencode icon indicating copy to clipboard operation
opencode copied to clipboard

On macOS, copying an image file from Finder results in pasting a generic image icon, instead of the image data

Open jdanbrown opened this issue 2 months ago • 3 comments

Description

On macOS:

  1. Good: When I copy (cmd+c) raw image data (like taking a screenshot to the clipboard, or open an image file in Preview and cmd+a, cmd+c to copy the image content), then pasting it into opencode using ctrl+v/cmd+v works correctly
  2. Bug: When I copy (cmd+c) an image file from Finder (i.e. select a file in Finder, press cmd+c), then pasting it into opencode using ctrl+v doesn't work correctly — the llm says it sees a generic image icon instead of the image data
    • Another bug: cmd+v does nothing when an image file is on the clipboard, whereas cmd+v works when image data is on the clipboard
  3. Good: When I drag-drop an image file from Finder into opencode (cli in VS Code terminal), then the llm (Haiku 4.5) decides to read the path, and opencode read's the path, and then the llm gets the image data

Tested using this image of a big inflatable duck:

  • https://github.com/user-attachments/assets/20cb66c6-e7e3-448c-8c9f-2a4dc13f6089

Chat session:

  • https://opencode.ai/s/gO6L5byt
  ┃
  ┃  what's in this image? [Image 1]
  ┃
  ┃   img  clipboard
  ┃
  ┃  danb (2:47:21 PM)
  ┃

     This image shows a massive inflatable rubber duck in a parking lot. The giant yellow duck has a bright orange bill and a dark eye, and it dwarfs
     the surrounding area—you can see cars, buildings, and trees in the background that are tiny in comparison. There are people standing near it for
     scale, and the parking lot has blue and yellow barrier markers around it. The sky is partly cloudy and blue, making for a striking backdrop. This
     appears to be some kind of public art installation or promotional event.

     Build anthropic/claude-haiku-4.5

  ┃
  ┃  what's in this image? [Image 1]
  ┃
  ┃   img  clipboard
  ┃
  ┃  danb (2:48:01 PM)
  ┃

     This is a file icon representing a JPG image file. The icon shows a white document with a folded corner, and features a magnifying glass over a
     preview of a coastal landscape photo (showing ocean, rocks, and sky). Below the icon is the text "JPG" indicating the file format. This is a
     typical macOS or generic desktop icon used to represent JPEG image files.

     Build anthropic/claude-haiku-4.5

  ┃
  ┃  what's in this image? '/Users/danb/Desktop/image.jpg'
  ┃  danb (2:49:47 PM)
  ┃

     I'll read that image file for you.

     → Read ../Desktop/image.jpg

     This is the same giant inflatable rubber duck image from earlier. It shows a massive yellow duck with an orange bill and dark eye in a parking lot.
      The duck is surrounded by blue and yellow parking barriers, with small groups of people standing nearby for scale. In the background, you can see
     parked cars, buildings, and trees under a partly cloudy blue sky. It's clearly a large public art installation or promotional event.

     Build anthropic/claude-haiku-4.5

OpenCode version

1.0.36

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 15.5

Terminal

VS Code terminal

jdanbrown avatar Nov 06 '25 21:11 jdanbrown