[BUG] Windows: Alt+V image paste takes ~2 s because it spawns Windows PowerShell 5.1 twice

Status Open
Reported on v2.1.296
Maintainer reply None cached
Activity 0 comments · opened Oct 12, 2026

What's Wrong?

On Windows, pasting an image with Alt+V takes about 2 seconds. Each paste starts powershell (Windows PowerShell 5.1) twice: once for Clipboard::ContainsImage(), then again for Clipboard::GetImage() and .Save(..., Png).

Almost all of that time is process startup and loading .NET Framework, not the image work. Timings on my machine, with a 544×680 image on the clipboard:

| Step | Time |
| --- | --- |
| powershell -NoProfile -Command "exit 0" | ~155 ms |
| checkImage command | ~210 ms |
| saveImage command | ~1,860 ms |
| The same Add-Type + GetImage + Save inside one running pwsh process | ~130 ms |

What Should Happen?

Image paste should feel instant, the way drag-and-drop does. Two ways to get there:

  1. Read the clipboard natively, with OpenClipboard and GetClipboardData on the registered PNG format, falling back to CF_DIBV5/CF_DIB. Browsers and Snipping Tool already put PNG bytes on the clipboard, so this needs no re-encoding.
  2. At least run one PowerShell process instead of two, because GetImage() returning $null already tells you there is no image.

Steps to Reproduce

  1. Copy an image in a browser or with Snipping Tool.
  2. Press Alt+V in Claude Code on Windows.
  3. Wait about 2 seconds for [Image #1] to show.

Is this a regression?

I don't know.

Claude Code Version

2.1.296

Platform

Anthropic API

Operating System

Windows 11

Terminal/Shell

Windows Terminal, PowerShell 7

Additional Information

#15625 reported the same delay and was closed as not planned. #78395 and #83350 also involve the PowerShell clipboard path.

View original on GitHub ↗