Skip to content

[BUG] Oversized image breaks conversation permanently - no way to recover without starting new chat #13480

Closed

Description

@precisionpete

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When a user pastes an image that exceeds the dimension limits (>2000px for many-image requests), the API returns a 400 error. However, the oversized image remains in the conversation history, causing all subsequent requests to fail with the same error - even plain text messages with no images attached.

What Should Happen?

One or more of the following should happen:

  • Option A: Validate image dimensions at paste/upload time and reject before adding to conversation
  • Option B: Provide UI to remove the offending image from conversation history
  • Option C: Exclude failed images from being resubmitted in subsequent requests
  • Option D: Display clear error with actionable recovery steps

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.100.content.2.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels"},"request_id":"req_011CVwMREcResPJWSbJmcuri"}

Steps to Reproduce

  1. Paste a large image (e.g., >2000px on any dimension) into Claude Code
  2. Send the message - receive error: messages.X.content.0.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels
  3. Try to send a plain text message (no image)
  4. Same error occurs on every subsequent request

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.28 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Suggested Fixes

  1. Immediate: Validate image dimensions before adding to conversation
  2. Short-term: Add UI control to remove messages/images from conversation history
  3. Long-term: Implement automatic retry without failed images, or client-side image resizing

Workaround

Currently, users must start a new conversation and manually reconstruct any important context.

Activity

  1. added
    bug
    on Dec 9, 2025
  2. added
    has repro
    platform:linux
    on Dec 9, 2025
  3. github-actions commented on Dec 9, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. [Bug] Anthropic API Error: Image dimensions exceed max allowed size (8000 pixels) #12351
    2. [Bug] Anthropic API Error: Image dimensions exceed max allowed size in multi-image requests #12867
    3. [BUG] Stuck in failure loop due to invalid image file #13341

    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

  4. peterHoburg commented on Dec 10, 2025

    @peterHoburg

    I am having the same issue.

  5. DawidBester commented on Dec 11, 2025

    @DawidBester

    Also experiencing the same issue, after error chat cannot be continued: ⎿ API Error: 400
    {"type":"error","error":{"type":"invalid_request_error","message":"messages.0.content.3.image.source.base64.data:
    At least one of the image dimensions exceed max allowed size: 8000
    pixels"

  6. Saturate commented on Jan 7, 2026

    @Saturate

    Yeah... very annoying, also happens for me:

    API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.23.content.20.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 2000
         pixels"},"request_id":""}
    

    Then it's just dead, you can't recover.

  7. paocg01-ops commented on Jan 11, 2026

    @paocg01-ops

    having the same issue

  8. stevenirby commented on Jan 15, 2026

    @stevenirby

    I would expect /compact to at least recover from this state, but even that doesn't work. It just shows you the same error, and I'm forced to start a new conversation.

  9. ekokodan commented on Jan 15, 2026

    @ekokodan

    /compact seems to work now

  10. 116 remaining items

  11. locked as resolved and limited conversation to collaborators on Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:corebughas reproplatform:linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions