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
ITerm2 terminal
Steps to Reproduce
- Take a screenshot on macOS (⌘⇧4 or ⌘⇧3)
- Open opencode TUI in Cursor's integrated terminal
- Drag and drop the screenshot PNG into the opencode input/context area
- Send a prompt asking the model to describe the image
- 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.
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
ITerm2 terminal
Steps to Reproduce
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
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.