claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug] Anthropic API Error: Image Upload Size Blocking All Message Attempts

Open jenkinsm13 opened this issue 5 months ago • 3 comments

Bug Description I tried sending images and got an error that it was over 5MB, but now i can't send ANY new messages even without images because they all come back with the same error

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 1.0.120
  • Feedback ID: 4bb28b24-ef11-46e2-8d75-02185a399b77

Errors

[{"error":"Error: Could not load the \"sharp\" module using the darwin-arm64 runtime\nPossible solutions:\n- Ensure optional dependencies can be installed:\n    npm install --include=optional sharp\n- Ensure your package manager supports multi-platform installation:\n    See https://sharp.pixelplumbing.com/install#cross-platform\n- Add platform-specific dependencies:\n    npm install --os=darwin --cpu=arm64 sharp\n- Consult the installation documentation:\n    See https://sharp.pixelplumbing.com/install\n    at <anonymous> (/$bunfs/root/claude:122:38363)\n    at <anonymous> (/$bunfs/root/claude:12:838)\n    at <anonymous> (/$bunfs/root/claude:123:78)\n    at <anonymous> (/$bunfs/root/claude:12:838)\n    at <anonymous> (/$bunfs/root/claude:123:79845)\n    at <anonymous> (/$bunfs/root/claude:12:838)\n    at <anonymous> (/$bunfs/root/claude:708:1842)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T01:35:27.306Z"},{"error":"TypeError: (Y.default||Y) is not a function. (In '(Y.default||Y)(Z)', '(Y.default||Y)' is an instance of Object)\n    at Gp (/$bunfs/root/claude:708:1865)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T01:36:08.163Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.106.content.2.image.source.base64: image exceeds 5 MB maximum: 11420716 bytes > 5242880 bytes\"},\"request_id\":\"req_011CTQUZKc3GZsXKjX9UjLQu\"}\n    at new B5 (unknown:1:28)\n    at new OY (/$bunfs/root/claude:842:1962)\n    at new RG0 (unknown:1:28)\n    at generate (/$bunfs/root/claude:842:2419)\n    at makeRequest (/$bunfs/root/claude:859:5359)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T01:36:56.682Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.106.content.1.image.source.base64: image exceeds 5 MB maximum: 11420716 bytes > 5242880 bytes\"},\"request_id\":\"req_011CTQUehz5iu1KVHHouxrqV\"}\n    at new B5 (unknown:1:28)\n    at new OY (/$bunfs/root/claude:842:1962)\n    at new RG0 (unknown:1:28)\n    at generate (/$bunfs/root/claude:842:2419)\n    at makeRequest (/$bunfs/root/claude:859:5359)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T01:38:09.618Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.106.content.1.image.source.base64: image exceeds 5 MB maximum: 11420716 bytes > 5242880 bytes\"},\"request_id\":\"req_011CTQUyuqFCskv2y3Mrp6F3\"}\n    at new B5 (unknown:1:28)\n    at new OY (/$bunfs/root/claude:842:1962)\n    at new RG0 (unknown:1:28)\n    at generate (/$bunfs/root/claude:842:2419)\n    at makeRequest (/$bunfs/root/claude:859:5359)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T01:42:30.300Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.106.content.1.image.source.base64: image exceeds 5 MB maximum: 11420716 bytes > 5242880 bytes\"},\"request_id\":\"req_011CTQVAPRxSsNDkT3gd66HC\"}\n    at new B5 (unknown:1:28)\n    at new OY (/$bunfs/root/claude:842:1962)\n    at new RG0 (unknown:1:28)\n    at generate (/$bunfs/root/claude:842:2419)\n    at makeRequest (/$bunfs/root/claude:859:5359)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T01:44:52.144Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.106.content.1.image.source.base64: image exceeds 5 MB maximum: 11420716 bytes > 5242880 bytes\"},\"request_id\":\"req_011CTQVFkQQkjJ5cfcBwjYur\"}\n    at new B5 (unknown:1:28)\n    at new OY (/$bunfs/root/claude:842:1962)\n    at new RG0 (unknown:1:28)\n    at generate (/$bunfs/root/claude:842:2419)\n    at makeRequest (/$bunfs/root/claude:859:5359)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T01:46:05.252Z"}]

jenkinsm13 avatar Sep 23 '25 01:09 jenkinsm13

Same issue with Claude Code 2.0.13 When uploading too many images or even a single image that exceeds size limits, Claude Code returns this error: API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}} After this error occurs, the chat session becomes completely unusable and there is no way to continue working in that session. Even restarting Claude Code and using the /resume command doesn't help - the chat remains permanently broken and unusable. This is a blocking and severe error that forces users to abandon their entire conversation history and context.

Maxymize avatar Oct 10 '25 08:10 Maxymize

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.

github-actions[bot] avatar Dec 07 '25 10:12 github-actions[bot]

Still happening!! Also /compact doenst work, why is still still not fixed?

aldaw avatar Jan 02 '26 20:01 aldaw

Same bug for me - all further messages then get blocked by the API Error and the session seems to be at a dead end with no ability to extract context for a new session.

ConstantinKloecker avatar Jan 24 '26 16:01 ConstantinKloecker

Same for me. The 5MB limit also seems awfully small for me—I'm often sending images to Claude and asking it to transcribe data from the image into a structured format. It's annoying to have to rescale and compress images first—and for them to still fail because for some reason the file size on my computer doesn't reflect the file size Claude sees.

harrislapiroff avatar Jan 27 '26 06:01 harrislapiroff

compact not working, any change to fix that ??

d4rkeen avatar Jan 31 '26 17:01 d4rkeen

compact not working, any change to fix that ??

See the workaround I am using until it’s fixed. On another note, this doesn’t happen to me when configured to use Bedrock.

Chris-Irving avatar Jan 31 '26 19:01 Chris-Irving