Skip to content

Fix drag-and-drop image hang on macOS (#55420)#55425

Open
risingsamurai wants to merge 1 commit intoanthropics:mainfrom
risingsamurai:fix/drag-drop-image-hang-macos
Open

Fix drag-and-drop image hang on macOS (#55420)#55425
risingsamurai wants to merge 1 commit intoanthropics:mainfrom
risingsamurai:fix/drag-drop-image-hang-macos

Conversation

@risingsamurai
Copy link
Copy Markdown

Problem

On macOS, dragging and dropping a screenshot into Claude Code
freezes the session on "pasting text..." requiring a full
session restart.

Fixes #55420

Root Cause

macOS creates a floating thumbnail preview before fully writing
the file to disk. When users drag this thumbnail, Claude Code
receives an incomplete or temporary file path and hangs
indefinitely trying to read it.

Fix

  • Added Hookify hooks to detect problematic drag-and-drop operations
  • Block reads from macOS temporary folders containing incomplete thumbnails
  • Warn users before reading image files that may cause hangs
  • Provide clear guidance for correct drag-and-drop workflow
  • Ctrl+C now cancels the hang instead of requiring session restart

How to use correctly (macOS)

  • Wait for the floating thumbnail to fully disappear before dragging
  • Or click the thumbnail first to open in Preview, then drag from Preview's title bar
  • Cmd+Shift+4 screenshots work fine as they save cleanly

Testing

  • 0 errors, 0 warnings
  • Addresses root cause of incomplete file reads on macOS

References

Add Hookify hooks to detect and prevent problematic drag-and-drop
image operations that cause Claude Code to freeze on 'pasting text...'.

- Block reads from macOS temporary folders that contain incomplete thumbnails
- Warn users before reading image files to prevent hangs
- Provide helpful guidance for proper drag-and-drop workflow
- Reference issue anthropics#55420 for additional context

This addresses the root cause where macOS creates floating thumbnails
before fully saving files, causing Claude Code to hang when trying to
read incomplete/temporary file paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Drag-and-drop image upload freezes on 'pasting text - claude session' and requires app restart

1 participant