iTerm2: image drag-and-drop pastes file path instead of attaching after clearing buffer (Cmd+R)
Summary
Dragging an image file into the terminal attaches it correctly as an image. After clearing the iTerm2 buffer with Cmd+R (iTerm2's "Clear Buffer"), drag-and-drop stops being intercepted by Claude Code — instead of attaching the image, it inserts the file's local path as plain text (iTerm2's native drop behavior).
Steps to reproduce
- Start
claudein iTerm2. - Drag an image file from Finder into the prompt → ✅ it is attached as an image (
[Image #N]chip). - Press Cmd+R (iTerm2 → Clear Buffer).
- Drag the same image file into the prompt again.
Expected behavior
The dropped image is attached as an image, the same as before clearing the buffer.
Actual behavior
The local file path of the image is pasted as plain text instead of the image being attached. This persists until Claude Code is restarted.
Workaround
- Copy the image to the clipboard and paste with
Cmd+Vinstead of dragging. - Restart Claude Code to restore drag-and-drop attachment.
- Use
Ctrl+L(redraw) instead of Cmd+R to clear the view without triggering the regression.
Environment
- Claude Code: 2.1.150
- Terminal: iTerm2 3.6.10
- macOS: 26.5 (build 25F71)
Notes
Cmd+R is iTerm2's "Clear Buffer" command, not a Claude Code keybinding — so the buffer clear is happening at the terminal-emulator level, after which Claude Code's image-drop interception appears to be lost and iTerm2's default file-path drop behavior takes over.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗