Skip to content

[Bug] Image drag-and-drop not working in Cursor terminal — works in iTerm #18107

@georgewrmarshall

Description

@georgewrmarshall

Description

When running opencode (v1.2.27) inside Cursor's integrated terminal, dragging and dropping a screenshot/image into the input context window does not work. The image is either not recognized or the file path is passed as plain text instead of the actual image data.

The exact same workflow (drag-and-drop a macOS screenshot into the input) works correctly in iTerm2

Cursor terminal

Image

ITerm2 terminal

Image

Steps to Reproduce

  1. Take a screenshot on macOS (⌘⇧4 or ⌘⇧3)
  2. Open opencode TUI in Cursor's integrated terminal
  3. Drag and drop the screenshot PNG into the opencode input/context area
  4. Send a prompt asking the model to describe the image
  5. The model cannot read/see the image

Expected Behavior

The image should be passed to the model as multimodal input, just like it works in iTerm2. The model should be able to see and describe the image contents.

Actual Behavior

The image is not passed through. The model either receives nothing or receives a file path string instead of image data.

Working Example (iTerm2)

When the same image is dragged into opencode running in iTerm2, the model successfully receives and describes the image content — confirming the issue is specific to how opencode handles image input from Cursor's terminal emulator.

Environment

  • opencode version: 1.2.27
  • OS: macOS
  • Broken terminal: Cursor integrated terminal
  • Working terminals: iTerm2
  • Model: Claude Opus 4.6 (Anthropic)

Notes

This may be related to differences in how Cursor's terminal emulator handles the file drag-and-drop protocol vs iTerm2. iTerm2 supports inline image protocols (e.g., iTerm2 proprietary escape sequences, OSC 1337), while Cursor's terminal (Electron-based xterm.js) likely does not. Opencode may need to implement a fallback — for example, detecting a dropped file path and reading the image from disk — to support terminals that don't have native inline image passthrough.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions