[BUG] Windows Alt+V image paste: first press always fails, second press succeeds (v2.1.141 partial fix of #56792)
@
Summary
This is a follow-up to #56792 (closed as completed in v2.1.141). The 2.1.141 changelog entry — "Fixed Windows Alt+V image paste reporting no image found when the clipboard contains a screenshot" — is a real improvement, but the bug is only partially fixed. Filing fresh because #56792 is closed and repo policy blocks the original author from reopening it.
Environment
- Claude Code v2.1.141
- Windows 11 Pro 10.0.26200
- Windows Terminal + PowerShell 7
Symptom
After an image lands on the clipboard, the first Alt+V press still reports clipboard is empty / no image found. A second Alt+V press immediately after attaches the image correctly as [Image #N]. 100% reproducible.
Repro
Win+Shift+S-> snip a region. Clipboard now contains a Bitmap — verified at the OS level:pwsh -STA -NoProfile -Command "Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Clipboard]::ContainsImage()" # Returns: True- In the Claude Code prompt, press Alt+V -> reports
clipboard is empty/no image found. - Press Alt+V again (clipboard unchanged) -> image attaches correctly as
[Image #N].
The clipboard contents do not change between the two presses — only the second read succeeds.
Analysis
The original decode bug from #56792 is fixed. What remains looks like a first-invocation initialization race in the clipboard reader: the first call returns "empty" before the reader is ready (cold helper process / native binding / STA thread spin-up), and the second call hits the now-warmed path. An await-on-ready, or a single retry on a cold first read, would likely close it.
Workaround
Press Alt+V twice. (Or the original #56792 workaround: save the image to disk and paste the file path.) @
+1 commenting for additional visibility
+1, observing the same first Alt+V failure / second Alt+V succeeds behavior. Context: Windows + WezTerm 20240203-110809-5046fc22 + pwsh 7.6.2 + Claude Code 2.1.150. Running Claude Code inside WezTerm, after putting an image on the clipboard the first Alt+V reports no image found on the clipboard, while pressing Alt+V again immediately succeeds without changing the clipboard.
Still reproducing on 2.1.153 (published 2026-05-27).
Environment:
- Claude Code 2.1.153
- Windows 11 Pro 10.0.26200
- Windows Terminal + Windows PowerShell 5.1
Symptom unchanged from the report: first Alt+V press after a fresh clipboard image (Win+Shift+S snip) shows a transient "no image available" toast in the lower-right; a second Alt+V immediately after attaches the image as [Image #N]. 100% reproducible. Clipboard verified non-empty between presses via [System.Windows.Forms.Clipboard]::ContainsImage() returning True.
Note: #62279 (filed 2026-05-25 on 2.1.150, same symptom via Ctrl+V) was closed as completed on 2026-05-27 and pointed here as the duplicate, but the underlying first-press race is still present in 2.1.153.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.