[BUG] Paste/drag-and-drop of images into chat input fails silently (VS Code extension)
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?
Environment
- Claude Code for VS Code extension: v2.1.226 (latest on marketplace)
- VS Code: 1.111.0
- macOS, Apple Silicon (arm64)
Bug
Pasting a screenshot (copied via Cmd+Ctrl+Shift+4) into the Claude Code
chat input panel fails: the input shows a placeholder like "[Image #1]"
but no actual image is attached/sent. Drag-and-drop of a saved image file
into the same input also fails with the same symptom.
What I ruled out while investigating
- Not a clipboard problem: the same clipboard content pastes correctly
into Pages, Mail, and Claude Desktop immediately after the failed
paste attempt in Claude Code's panel.
- Not related to GitHub Copilot Chat: uninstalling and reinstalling
it made no difference; pasting into Copilot Chat's own panel works
fine throughout.
- Not a stale extension/cache issue: reproduced after a full VS Code
window reload, a full quit/reopen, and after resetting the workspace's
state.vscdb.
- Not an outdated extension: already on the latest marketplace version.
- Confirmed a saved file under
.../Code/User/workspaceStorage/<hash>/vscode-chat-images/ from a
paste attempt fails to open in VS Code's own image viewer
("An error occurred while loading the image"), suggesting the panel
may be writing a malformed file from the pasted clipboard data.
Steps to reproduce
- Copy a screenshot to clipboard (Cmd+Ctrl+Shift+4)
- Open the Claude Code chat panel in VS Code
- Paste (Cmd+V) into the input box
- Observe: "[Image #N]" placeholder text appears, but no image renders
and it isn't actually sent/attached when the message is submitted
What Should Happen?
Pasting a screenshot (Cmd+Ctrl+Shift+4, copied to clipboard) into the
Claude Code chat input should attach the actual image and display a
thumbnail/preview in the input box, then send it as a real image
attachment when the message is submitted — the same way it works when
pasting into Claude Desktop, Mail, or GitHub Copilot Chat's own panel.
Drag-and-dropping a saved image file into the input box should behave
the same way: the image should attach and render correctly, not just
insert a "[Image #N]" text placeholder with no actual image data behind it.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce
- Copy a screenshot to clipboard (Cmd+Ctrl+Shift+4)
- Open the Claude Code chat panel in VS Code
- Paste (Cmd+V) into the input box
- Observe: "[Image #N]" placeholder text appears, but no image renders
and it isn't actually sent/attached when the message is submitted
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.226
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_