[BUG] CC "Image cannot be empty" when pasting a copied selection of a CSV

Status Closed — not planned
Maintainer reply None cached
Activity 13 comments · opened Aug 20, 2025 · closed Jan 30, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude Code
  • Claude CLI version: 1.0.85 (Claude Code)
  • Operating System: MacOS 15.6
  • Terminal: vscode terminal

Bug Description

When pasting a selection copied from a csv into CC, the pasted text appears briefly, and then gets truncated to "[Image #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.

Steps to Reproduce

  1. Paste a copied selection from a csv opened in numbers on a mac into the CC terminal in VSCode
  2. Submit, or remove the pasted text and submit
  3. Submit additional queries without the pasted test

Expected Behavior

A normal response, i.e. not an error that falsely suggests an image was included in the prompt

Actual Behavior

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"}

Additional Context

<img width="858" height="335" alt="Image" src="https://github.com/user-attachments/assets/8ffdb5a9-e53c-49eb-bae7-fe9a9c9334f4" />

View original on GitHub ↗

13 Comments

github-actions[bot] · 1 year ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5496
  2. https://github.com/anthropics/claude-code/issues/2102

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

GeorgeKouk · 9 months ago

Having the same issue.

albanafmeti · 9 months ago

Same issue here.
After the issue happens, you need to start a new conversation since resuming that one keeps showing the same issue.

afandiyusuf · 9 months ago

Having the same issue.

persson · 9 months ago

Just encountered same issue. As a side comment, in addition it would be nice to have a more clear way to 'skip/reset last command' when a fatal recurring issue like this happen so you don't have to start a new conversation.

mrcodechef · 9 months ago

Similar issue. Error dealing with a playright screenshot. Once it gets 400 error, can't resume conversation

timothy-web3-dev · 9 months ago

same, it's really messed up, unable to recover at all

mrcodechef · 9 months ago
same, it's really messed up, unable to recover at all

I was able to workaround somewhat by using /export conv.txt ; /clear; and then telling it to continue from conv.txt

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

aemotyka · 8 months ago
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

This issue is still occurring for me

github-actions[bot] · 7 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

marcindulak · 7 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

github-actions[bot] · 6 months ago

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.