anthropics / anthropics/claude-code

[BUG] Small image (558x162px) incorrectly rejected with "exceeds max allowed size... 2000 pixels" error

Open
#95,503 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug platform:vscode platform:windows
Dominant language
TypeScript
Stars
146k
Forks
23.8k
PR merge metrics
PR metrics pending

Description

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?

Description

Pasting a small screenshot into a chat message triggers a rejection error claiming the image exceeds the 2000px dimension limit, even though the actual image is far smaller than that.

Steps to reproduce

  1. Paste a small screenshot into a Claude Code chat message (VS Code extension).
  2. Observe the error response.

Error message received

"At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels"

Actual verified image size

I checked the real pixel dimensions of the pasted file on disk using PowerShell (System.Drawing.Image). Result: 558 x 162 pixels. This is nowhere near the stated 2000px limit.

Additional context

In the same session, images with larger original dimensions (e.g. 1920x2728 and 786x3330) were processed successfully, while this much smaller 558x162 image was rejected. A very large image (1920x8002) was correctly rejected. This inconsistency suggests the size check may be comparing against a stale or cached dimension, or attributing the wrong image's dimensions in a multi-image request, rather than checking the actual file being sent.

Environment

  • Claude Code VS Code extension
  • Windows 11
What Should Happen?

A small image (558x162 pixels) should be accepted and processed normally. The 2000px dimension limit should only reject images that actually exceed it.

Error Messages/Logs
At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels
Steps to Reproduce
  1. Open Claude Code in the VS Code extension on Windows 11.
  2. Have a conversation in which several images were already attached earlier (some larger than 2000px tall were auto-downscaled and accepted, one at 1920x8002 was rejected).
  3. Take a small screenshot with the Windows screenshot tool (result: 558x162 px PNG).
  4. Paste the screenshot into the chat message and send.
  5. The request is rejected with the error above, even though the file is only 558x162 px. I confirmed the real size of the file on disk with PowerShell (System.Drawing.Image).

Note: I could not reproduce this in a fresh session. It seems to depend on earlier images in the same conversation.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.273 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is identified in the report. Start by reproducing the issue in the Claude Code VS Code extension on Windows with several earlier image attachments, then compare the rejected image's dimensions with the request's image list. Done means a verified 558x162 image is accepted while an image exceeding 2000 pixels is still rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.