iTerm2: image drag-and-drop pastes file path instead of attaching after clearing buffer (Cmd+R)

Resolved 💬 1 comment Opened May 25, 2026 by aviramst Closed Jun 26, 2026

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

  1. Start claude in iTerm2.
  2. Drag an image file from Finder into the prompt → ✅ it is attached as an image ([Image #N] chip).
  3. Press Cmd+R (iTerm2 → Clear Buffer).
  4. 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+V instead 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗