Image Upload Exceeds Size Limit: Base64 Image Too Large (6.2 MB > 5 MB)

Resolved 💬 4 comments Opened Jun 16, 2025 by thewatchfulprotector Closed Jan 5, 2026

Bug Description
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error",
"message":"messages.38.content.0.image.source.base64: image exceeds 5
MB maximum: 6278112 bytes > 5242880 bytes"}}

I keep getting this error trying to upload images or even mention images now. It's soft locked my chat into a API Error: 400

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.24
  • Feedback ID: 1321d81f-ab76-48c3-afb7-e728d57dab83

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:892:11)\n    at execSync (node:child_process:964:15)\n    at HZ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:659:3921)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:8863\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n    at tJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:8009)\n    at HS (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:7090)\n    at T6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11202)","timestamp":"2025-06-16T11:49:03.729Z"},{"error":"Error: EPERM: operation not permitted, scandir '/var/folders/f0/cgq1zz8x33g5_6n_8ltyz41m0000gn/T/TemporaryItems/NSIRD_screencaptureui_DMHUaI'\n    at Module.readdirSync (node:fs:1562:26)\n    at Object.readdirSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:536:1562)\n    at Lv (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:556:797)\n    at Object.validateInput (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1430:3128)\n    at sY5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1914:20571)\n    at sY5.next (<anonymous>)\n    at QH1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1914:19689)\n    at QH1.next (<anonymous>)\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1908:558)\n    at rK1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1908:711)","timestamp":"2025-06-16T11:52:17.241Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.38.content.0.image.source.base64: image exceeds 5 MB maximum: 6278112 bytes > 5242880 bytes\"}}\n    at h6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1329:12578)\n    at Lw.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:2082)\n    at Lw.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:5257)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async ME2.K11.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:22008)\n    at async K11 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:12203)\n    at async ME2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:21854)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17103\n    at async yt1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:5151)\n    at async Fu (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17073)","timestamp":"2025-06-16T11:53:08.566Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.38.content.0.image.source.base64: image exceeds 5 MB maximum: 6278112 bytes > 5242880 bytes\"}}\n    at h6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1329:12578)\n    at Lw.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:2082)\n    at Lw.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:5257)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async ME2.K11.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:22008)\n    at async K11 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:12203)\n    at async ME2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:21854)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17103\n    at async yt1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:5151)\n    at async Fu (file:///opt/home

Note: Error logs were truncated.

View original on GitHub ↗

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