Session becomes permanently unrecoverable when a single image exceeds 2000px — no graceful degradation

Resolved 💬 3 comments Opened Mar 13, 2026 by nathanjohnpayne Closed Mar 17, 2026

Summary

When a session accumulates images and one exceeds 2000px in any dimension, Claude Code raises invalid_request with the message \"An image in the conversation exceeds the dimension limit for many-image requests (2000px). Start a new session with fewer images.\" The session then becomes permanently broken — every subsequent request fails with the same error, and the only recovery is abandoning the session entirely.

Steps to Reproduce

  1. Start a long working session that involves screenshots or image annotations (e.g. UI development, design review)
  2. Over time, accumulate several images in the conversation context
  3. Paste or capture a screenshot where any dimension exceeds 2000px (e.g. a wide toolbar at 2162×322)
  4. Claude Code raises the error and every subsequent message in the session fails with the same error

Expected Behavior

Claude Code should handle this gracefully in one or more of these ways:

  • Auto-resize/downscale images client-side before sending to the API, to stay within the 2000px limit — this is a known API constraint and could be enforced transparently
  • Warn before sending if an image exceeds the limit, giving the user a chance to cancel or resize
  • Trim older images from context automatically when the many-image limit is hit, similar to how long text contexts are managed
  • Allow continuing the session after the error by dropping the offending image, rather than making the entire session permanently unrecoverable

Actual Behavior

  • The error fires when any image in the request set exceeds 2000px in any dimension
  • The error is sticky — once triggered, every new message in the same session also fails, because the offending image is still in the conversation history
  • The user is forced to abandon all work-in-progress context and start a new session
  • No UI affordance is provided to remove the offending image from history or otherwise recover

Real-World Impact

Encountered during a multi-hour development session building a theatre investment underwriting and recoupment simulator. Screenshots of the application UI were being reviewed iteratively. Several screenshots exceeded 2000px in width (2162×322, 2062×556, 2482×992). Once the limit was hit, the session errored 4 times in rapid succession within ~2 minutes and became unrecoverable, losing significant context.

Error Details

"An image in the conversation exceeds the dimension limit for many-image requests (2000px). 
Start a new session with fewer images."
  • Error type: invalid_request
  • isApiErrorMessage: true
  • Occurs on every subsequent API call once triggered
  • Session: bbef5623-2a33-44eb-a174-8f6164e37313
  • Project: overridebroadway
  • First occurrence: 2026-02-21T20:11:23Z

Suggested Fix (Priority Order)

  1. Client-side image resizing (best UX): Automatically downscale any image dimension >2000px before adding to context. Lossless for most UI screenshots.
  2. Pre-send validation: Detect oversized images before the API call and prompt the user.
  3. Session recovery: When the error is hit, offer to retry the last message with the offending image removed rather than requiring a new session.

Environment

  • Claude Code version: 1.1.6452
  • OS: macOS 15 (Darwin 25.3.0)
  • Images involved: Screenshots of a web application UI (widths 2062–2482px)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗