The bug (anthropics/claude-code#68021): you take a screenshot with Win+Shift+S, hit Ctrl+V in Claude Code inside Windows Terminal, and get "No image found in clipboard" — even though the image is right there.
The cause: Claude Code's clipboard reader can't consume raw bitmap data on Windows. But pasting a file reference (like copying a .png in Explorer and pasting it) works perfectly.
The fix: a 28-line AutoHotkey script that intercepts Ctrl+V — only inside Windows Terminal — and, if the clipboard holds a raw bitmap, silently converts it to a temp PNG file-reference first, then pastes. Your muscle memory doesn't change: snip, Ctrl+V, done.
- Install AutoHotkey v2 (the fix does not work with v1).
- Clone this repo (or just download the three files into one folder).
- Double-click
screenshot-paste.ahk. That's it. - (Optional) Auto-start on login: press
Win+R, typeshell:startup, drop a shortcut toscreenshot-paste.cmdthere.
| File | Role |
|---|---|
screenshot-paste.ahk |
Hooks Ctrl+V only when Windows Terminal is focused. Checks for CF_DIB on the clipboard; if present, calls the converter, then forwards the paste. |
clip-image-to-file.ps1 |
Saves the clipboard image to %TEMP%\claude-clip\shot_<ticks>.png and puts it back on the clipboard as a file-drop (CF_HDROP). Retries around the brief clipboard lock after a fresh snip. Keeps only the last 50 shots. |
screenshot-paste.cmd |
One-line launcher for shell:startup. |
Everything outside Windows Terminal is untouched — Ctrl+V in your browser, editor, etc. behaves exactly as before. Text and file-copy pastes inside the terminal also pass straight through.
- Targets
WindowsTerminal.exe. Using Claude Code in another terminal? Change theahk_exein the#HotIfline. - Temp PNGs live in
%TEMP%\claude-clip(auto-pruned to the newest 50). - When the upstream bug is fixed, just stop the script — nothing else to undo.
- claude-code-windows-hook — working Node.js hook template for Claude Code on Windows
- claude-code-session-sharing — share in-progress sessions across machines
- claude-code-safety-hooks — guardrail hooks: dangerous-command gate, secret guard, encoding gate
- caveman — cut ~65% of tokens by talking like caveman
MIT