Multi-file drag & drop / paste only delivers the last file

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Apr 19, 2026 · closed Apr 19, 2026

Description

When dragging multiple files into the Claude Code prompt, only the last file is attached. Copy-pasting multiple files from Finder (macOS) also only delivers one file. The user expects all selected files to be attached.

Repro

  1. In Finder (macOS), select 2+ image files
  2. Drag them together onto the Claude Code terminal window
  3. Submit the prompt

Expected: All dragged files are attached and visible to Claude.
Actual: Only the last file in the selection is attached. The prompt shows e.g. [Image #2] with no corresponding [Image #1].

Same behavior with ⌘C / ⌘V from Finder.

Workaround

Drop files one at a time, or place them in a folder and give Claude the folder path so it can read them via the Read tool.

Environment

  • Claude Code CLI
  • macOS (Darwin 25.4.0)
  • Terminal: zsh

Impact

Common workflow (attaching a handful of screenshots or photos at once) is broken and non-obvious — users assume the first file came through and are confused when Claude only sees one.

View original on GitHub ↗

3 Comments

github-actions[bot] · 5 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/49854
  2. https://github.com/anthropics/claude-code/issues/39416

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

0xbrainkid · 5 months ago

Multi-file drag/drop and paste collapsing to only the last file strongly suggests the attachment ingestion path is overwriting prior entries instead of appending them when the source event contains multiple file payloads.

The symptom is very consistent with a classic "last item wins" bug:

  • Finder drag with N files => only final file survives
  • Finder copy/paste with N files => same result

That means the issue is likely not specific to drag vs paste UI, but to the shared attachment collector behind both input methods.

The expected model for file attachment is an ordered list. The current behavior looks like one of these implementation mistakes:

  1. loop assigns currentAttachment = file instead of appending to an array
  2. the event payload contains multiple files, but only files[-1] is consumed
  3. the UI renders only one attachment slot and later files overwrite earlier preview state

The prompt showing [Image #2] without [Image #1] is a particularly helpful clue because it suggests the UI knows there was a sequence, but the earlier element was dropped before final render or submission.

This matters more than it seems because multi-file screenshot review is a very common workflow. If only the last file arrives, users make decisions assuming Claude saw the whole set when it actually saw one item.

Minimum fix: preserve all files from the OS drop/paste payload and render them as an explicit attachment list before submit so the user can verify the full set arrived.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.