Skip to content

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

Closed as not planned

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.

Activity

  1. changed the title [-][Bug] Image drag-and-drop not working in Cursor terminal — works in iTerm and Claude Code[/-] [+][Bug] Image drag-and-drop not working in Cursor terminal — works in iTerm[/+] on Mar 18, 2026
  2. github-actions commented on Mar 18, 2026

    @github-actions
    Contributor

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

    If your issue is specific to Cursor's terminal and differs from the above, please clarify the distinction so maintainers can track it separately.

  3. sgriff96 commented on Mar 31, 2026

    @sgriff96

    Same deal in VSCode, with opencode opened in the terminal or using the opencode extension. Seems to be a problem/restriction with how vscode handles drag and drop files I would guess?

  4. github-actions commented on May 30, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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