[BUG] CC "Image cannot be empty" when pasting a copied selection of a CSV
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?
When pasting a selection copied from a csv into CC, the pasted text appears briefly, and then gets truncated to "[Image https://github.com/https://github.com/anthropics/claude-code/pull/1]". Upon submitting the prompt, I receive "API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.150.co
ntent.0.image.source.base64: image cannot be empty"},"request_id":"req_011CSKg7yABsUTCZR9sW4QmP"}"
The issue persists in subsequent queries that do not include the selection, and it becomes impossible to continue the conversation, because every subsequent prompt receives that error. The error also occurs if the pasted text is removed from the prompt before sending.
No images were included anywhere in the conversation.
<img width="1716" height="670" alt="Image" src="https://github.com/user-attachments/assets/70879608-35c6-4105-8b21-1d3302c3408b" />
What Should Happen?
A normal response, i.e. not an error that falsely suggests an image was included in the prompt
Error Messages/Logs
I received the following error in this and all subsequent queries: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.150.co
ntent.0.image.source.base64: image cannot be empty"},"request_id":"req_011CSKg7yABsUTCZR9sW4QmP"}
Steps to Reproduce
- Paste a copied selection from a csv opened in numbers on a mac into the CC terminal in VSCode
- Submit, or remove the pasted text and submit
- Submit additional queries without the pasted test
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
All of them
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
This is my third time reopening an issue for this bug (#6213, #23169), which has received no attention since i first reported it in August 2025, despite ample activity and other users reporting the issue. https://github.com/anthropics/claude-code/issues/6213 was incorrectly closed despite recent human comments.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗