[Bug] Anthropic API Error: Image Size Exceeds 5MB Limit

Resolved 💬 3 comments Opened Sep 26, 2025 by kmcd Closed Sep 30, 2025

Bug Description
⏺ safari - take_screenshot (MCP)(filename: "current_contract_page.png")
⎿  Screenshot saved to: current_contract_page.png (fullscreen capture)

⏺ Read(current_contract_page.png)
⎿  Read image (12.7MB)
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.8.content.0.tool_result.content.0.image.source.base64: image exceeds 5
MB maximum: 17699328 bytes > 5242880 bytes"},"request_id":"req_011CTWsZurXH3iVpWXwcgouG"}

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.124
  • Feedback ID:

Errors

[{"error":"Error\n    at YC (/$bunfs/root/claude:537:1083)\n    at Q1 (/$bunfs/root/claude:538:9957)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:862:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:540:2105)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T09:31:17.749Z"},{"error":"SyntaxError: JSON Parse error: Unable to parse JSON string\n    at <parse> (:0)\n    at parse (unknown)\n    at <anonymous> (/$bunfs/root/claude:568:9937)\n    at W (/$bunfs/root/claude:535:13292)\n    at kHG (/$bunfs/root/claude:1580:1717)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T09:48:32.839Z"},{"error":"Error: Request was aborted.\n    at new K5 (unknown:1:28)\n    at new kY (/$bunfs/root/claude:863:1962)\n    at new F2 (/$bunfs/root/claude:863:2748)\n    at makeRequest (/$bunfs/root/claude:880:3864)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T09:50:32.264Z"},{"error":"Error: Could not load the \"sharp\" module using the darwin-arm64 runtime\nPossible solutions:\n- Ensure optional dependencies can be installed:\n    npm install --include=optional sharp\n- Ensure your package manager supports multi-platform installation:\n    See https://sharp.pixelplumbing.com/install#cross-platform\n- Add platform-specific dependencies:\n    npm install --os=darwin --cpu=arm64 sharp\n- Consult the installation documentation:\n    See https://sharp.pixelplumbing.com/install\n    at <anonymous> (/$bunfs/root/claude:111:38363)\n    at <anonymous> (/$bunfs/root/claude:12:839)\n    at <anonymous> (/$bunfs/root/claude:112:78)\n    at <anonymous> (/$bunfs/root/claude:12:839)\n    at <anonymous> (/$bunfs/root/claude:112:79845)\n    at <anonymous> (/$bunfs/root/claude:12:839)\n    at <anonymous> (/$bunfs/root/claude:663:1842)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T10:31:12.795Z"},{"error":"Cannot find module './image-processor.node' from '/$bunfs/root/claude'","timestamp":"2025-09-26T10:31:12.807Z"},{"error":"TypeError: (W.default||W) is not a function. (In '(W.default||W)(G)', '(W.default||W)' is an instance of Object)\n    at FjY (/$bunfs/root/claude:1599:2319)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T10:31:12.812Z"},{"error":"TypeError: (Y.default||Y) is not a function. (In '(Y.default||Y)(Z)', '(Y.default||Y)' is an instance of Object)\n    at ul (/$bunfs/root/claude:663:1865)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T10:31:15.332Z"},{"error":"Cannot find module './image-processor.node' from '/$bunfs/root/claude'","timestamp":"2025-09-26T10:31:15.336Z"},{"error":"TypeError: (W.default||W) is not a function. (In '(W.default||W)(G)', '(W.default||W)' is an instance of Object)\n    at FjY (/$bunfs/root/claude:1599:2319)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T10:31:15.338Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.18.content.0.tool_result.content.0.image.source.base64: image exceeds 5 MB maximum: 17712156 bytes > 5242880 bytes\"},\"request_id\":\"req_011CTWrjrPa4hTm97dKwbGrT\"}\n    at new K5 (unknown:1:28)\n    at new kY (/$bunfs/root/claude:863:1962)\n    at new ZG0 (unknown:1:28)\n    at generate (/$bunfs/root/claude:863:2419)\n    at makeRequest (/$bunfs/root/claude:880:5359)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-26T10:31:25.922Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.18.content.0.tool_result.content.0.image.source.base64: image exceeds 5 MB maximum: 17712156 bytes > 5242880 bytes\"},\"request_id\":\"req_011CTWsTsyzKWyBwr4WmPbCk\"}\n    at new K5 (unknown:1:28)\n    at new kY (/$bunfs/root/claude:863:1962)\n    at new ZG0 (unknown:1:

Note: Error logs were truncated.

View original on GitHub ↗

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