[BUG] Alt+V image paste fails when CLAUDE_CODE_USE_POWERSHELL_TOOL=1

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Aug 2, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Setting the environment variable CLAUDE_CODE_USE_POWERSHELL_TOOL=1 breaks Alt+V
clipboard image paste. Alt+V reports "no image found" even though a valid image is
present on the Windows clipboard. Unsetting the variable restores image paste
immediately.

Text paste is unaffected in both cases.

What Should Happen?

Expected: the image is attached to the prompt.
Actual: "no image found"

Error Messages/Logs

Steps to Reproduce

  1. Set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 (User scope)
  2. Copy any image to the clipboard (screenshot tool, Snipping Tool, browser image copy)
  3. Press Alt+V in Claude Code

Expected: the image is attached to the prompt.
Actual: "no image found"

  1. Unset the variable (set CLAUDE_CODE_USE_POWERSHELL_TOOL=) and restart Claude Code
  2. Repeat steps 2–3 — image paste works

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.220 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Cmd.exe

Related issues

Possibly the same subsystem, but none of these mention
CLAUDE_CODE_USE_POWERSHELL_TOOL as the trigger:

  • #77470 — Alt+V image paste fails on Windows where PowerShell 5.1 is blocked by

policy. Distinct from this report: here PowerShell 5.1 is fully functional and
reads the clipboard image successfully (Get-Clipboard -Format Image returns a
1492x1156 image), yet Alt+V still fails while the variable is set.

  • #82909 — Clipboard paste on WSL only tries powershell.exe. Distinct: this is a

native Windows install, not WSL.

  • #78395 — Windows Alt+V image paste fails once after idle, second press succeeds.

Distinct: this failure is persistent, not transient.

Additional Information

Evidence the clipboard is valid

With the failure occurring, the clipboard was inspected from a child PowerShell process
in the same session:

Formats present:  System.Drawing.Bitmap, Bitmap, PNG
GetDataPresent(Bitmap):  True
GetDataPresent(DIB):     True
GetDataPresent(PNG):     True

Both standard read paths succeed while Alt+V fails:

  • Get-Clipboard -Format Image in powershell.exe 5.1 (apartment state STA) returns a

1492x1156 image

  • [System.Windows.Forms.Clipboard]::GetImage() returns a valid bitmap, saved to a

46,013-byte PNG

So the image is on the clipboard in every common format, and is readable by other
processes in the same session, while Claude Code reports it absent.

View original on GitHub ↗