[BUG] Session breaks if image fails to load
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 I use ShareX to create a screenshot, I sometimes paste to fast before the image has saved to disk, this does display in Claude Code as a broken file, however if I hit enter, the chat from that point keeps receiving error 400 and is permanently broken
What Should Happen?
Shouldn't break the rest of the chat!
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.57.content.2.image.source.base64: image cannot be empty"},"request_id":"req_011CZEbiRQPdfpoW75LXvoLq"}
Steps to Reproduce
I guess this can work if you delete a file after the fact but
1) drag file into the desktop before its fully saved to disk, or remove it from storage after dragging it to claude
2) submit the message
3) receive error
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.69
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
<img width="989" height="642" alt="Image" src="https://github.com/user-attachments/assets/75ca9b0c-8e79-4c08-80e7-55a9bc2e7e9b" />
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗