You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] Claude Code API Error After Screenshot of Large Page #817
After taking a screenshot with full page for a long page, claude code is unable to handle the large image due to exceeding the max image dimensions (8000 pixels).
⏺ playwright - Take a screenshot (MCP)(filename: "homepage.png", fullPage: true)
⎿ ### Result
Took the full page screenshot and saved it as /tmp/playwright-mcp-output/2025-08-01T00-37-01.779Z/homepage.png
### Ran Playwright code
```js
// Screenshot full page and save it as /tmp/playwright-mcp-output/2025-08-02T00-37-01.779Z/homepage.png
await page.screenshot({
fullPage: true,
path: '/tmp/playwright-mcp-output/2025-08-01T00-37-01.779Z/homepage.png',
quality: 50,
scale: 'css',
type: 'jpeg'
});
```
⎿ [Image]
17:41
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1.content.5.image.source.base64.data: At least one of the image dimensions exceed
max allowed size: 8000 pixels"}}
I also have the same problem. Claude Code decides on its own to take a fullPage screenshot and then breaks down with a imagem too large to fit in the context.
✻ Thinking…
Agora vou tirar um screenshot para ver como ficou com os espaçamentos reduzidos.
⏺ playwright - Take a screenshot (MCP)(filename: "[redacted].png", fullPage: true)
⎿ ### Result
Took the full page screenshot and saved it as /var/folders/63/h9mgyy0n6rldc0kdv_7v_s6w0000gn/T/playwright-mcp-
output/2025-08-05T10-19-36.716Z/[redacted].png
… +14 lines (ctrl+r to expand)
⎿ [Image]
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.15.content.23.image
.source.base64.data: At least one of the image dimensions exceed max allowed size: 8000 pixels"}}
They currently have a bug (anthropics/claude-code#2752) where this causes the session to be unrecoverable. The only way is to start a new session (/clear) or backtrack to a previous message (esc esc).
Anyway, I believe Playwright MCP should impose some maximum size on the image output, maybe as a configurable CLI flag or environment variable. Or maybe even disabling full page screenshots as an option.
Activity
pavelfeldman commentedon Aug 2, 2025
Did you ask it to take a full page screenshot or did it do it on its own?
ColeMurray commentedon Aug 3, 2025
on its own
pavelfeldman commentedon Aug 4, 2025
Could you share more on the context / prompt? Feedback is split over this so we need more information to tune it right.
lbguilherme commentedon Aug 5, 2025
I also have the same problem. Claude Code decides on its own to take a
fullPagescreenshot and then breaks down with a imagem too large to fit in the context.They currently have a bug (anthropics/claude-code#2752) where this causes the session to be unrecoverable. The only way is to start a new session (
/clear) or backtrack to a previous message (esc esc).Anyway, I believe Playwright MCP should impose some maximum size on the image output, maybe as a configurable CLI flag or environment variable. Or maybe even disabling full page screenshots as an option.
ItisDL commentedon Aug 21, 2025
i think need a param to deal that,this fix influence me,i need fullpage and base64
TKS