[BUG] Managed agents still terminate on 2000px many-image image error instead of recovering
Summary
The 2000px many-image dimension failure is still happening in managed agents as of 2026-07-16, and the failure mode is worse than a rejected image: the managed agent session terminates / becomes unrecoverable instead of replacing or dropping the offending image and continuing.
This looks related to the long-running image-in-context failure class, but I could not find an existing issue specifically covering the current managed-agent behavior where the session ends entirely.
What happened
A managed agent session encountered the image dimension error around the 2000px many-image limit. Instead of rejecting only the image or emitting a recoverable error, the session was terminated entirely.
User-visible effect:
- the active managed-agent session stops / dies
- the user cannot recover conversational state from inside the session
- this is still happening on a current managed-agent run on 2026-07-16
I do not have the exact managed-agent build/version exposed from the UI, which is part of the problem for reporting this surface precisely.
Expected behavior
For any image that violates the many-image request limit, Claude Code should do one of the following without killing the session:
- downscale the offending image before it enters conversation history,
- replace the unprocessable image with a text placeholder and retry,
- strip/drop the offending image and retry, or
- surface a machine-readable recoverable error to the parent / supervisor so the managed-agent run is not mistaken for normal termination.
The docs currently say that for Image was too large, Claude Code replaces the unprocessable image with a text placeholder and retries so subsequent messages succeed. They also document that the API accepts images up to 8000px on the longest edge for a single image, or 2000px when many images are in context:
https://code.claude.com/docs/en/errors#image-was-too-large
Managed agents appear to still have a path where that recovery behavior is not applied.
Actual behavior
The managed agent terminates / becomes unrecoverable after the 2000px many-image image error. The practical effect is session loss rather than an image-specific rejection.
Why this is likely a distinct current bug
There are many related issues for the generic image/context poisoning class, including:
- #34566 - open: image processing failure silently passes oversized images into context, bricking sessions
- #45543 - resumed sessions with many images fail with unrecoverable dimension error
- #55040 - oversized images in resumed conversations should auto-downscale instead of hard-blocking the turn
- #66141 - oversized image >2000px poisons all later image processing in a session
Several of these are closed as stale/duplicate, while #34566 remains open. However, the current docs imply newer Claude Code should recover by replacing the unprocessable image with a placeholder. This report is for a current managed-agent path where the error still terminates the whole session.
Suggested fix
At the managed-agent boundary, please make the image-dimension failure non-fatal:
- preflight all image blocks injected by agent tools / managed-agent surfaces before sending them to the API
- downscale, tile, or replace any image exceeding the effective many-image cap before it reaches context
- on API 400 for the 2000px many-image limit, identify the offending image(s), remove/downscale them in the in-memory transcript, retry, and persist the repaired transcript if applicable
- emit a structured fatal/recoverable event if a managed agent truly cannot continue, instead of making the session look like it simply terminated
Environment
- Surface: Claude Code managed agents / agent view
- Date reproduced: 2026-07-16
- Exact version/build: not visible from the managed-agent UI
- Error class: 2000px many-image image dimension limit
Happy to add exact text/logs if the managed-agent UI exposes a session id, debug log, or version for this run.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗