[BUG] Claude Code VS Code extension throws an error when re-reading an image that was previously read successfully, and the chat cannot continue afterward
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?
I have been getting this error in the Claude Code extension in VS Code for two months now. It is very annoying. It happens when requesting to read images, and it is not related to the error message stating that the image dimensions exceed the maximum allowed size.
The same images that were successfully read earlier sometimes give an error when requesting to read them again. Sometimes it happens after two prompts, and sometimes after 80 prompts. What is more annoying is that the chat cannot continue after that. It is also not some type of usage limit, as I have a Claude Max subscription and had not been using it for two weeks. On my second prompt, I got the error.
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.16.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels"}
What Should Happen?
Pictures should be read correctly
Error Messages/Logs
Steps to Reproduce
Read these pictures: “img1.jpeg, img2.jpeg”
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.16.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels"},"request_id":"req_xxxxxxxxxxxxxxxxxxx"}
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
Claude Code for VS Code (2.0.62)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗