Image Processing Failure: API Rejects Unrelated Context Image
Bug Description The context is returning on all type of prompts the error ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"}} because has a image in the context, even when the image isn't related to the prompt task, it returns this error in a loop, making the thread stuck.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 1.0.56
- Feedback ID: b67410b3-abad-48bf-9621-6df3c289bca8
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:882:11)\n at execSync (node:child_process:954:15)\n at A7 (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:797:5848)\n at file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:48013\n at Q (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n at fY (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:45724)\n at QK (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:44590)\n at SB (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:50639)","timestamp":"2025-07-21T14:19:27.942Z"},{"error":"Error: ENOENT: no such file or directory, open '/proc/version'\n at Module.readFileSync (node:fs:441:20)\n at Object.readFileSync (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:615:7077)\n at file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:615:8638\n at Q (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n at kT4 (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:62815)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-21T14:19:28.459Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"Could not process image\"}}\n at V4.generate (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1249:6428)\n at dM.makeStatusError (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1266:2101)\n at dM.makeRequest (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1266:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async w81.showErrors (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:14158)\n at async w81 (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2210:1704)\n at async mqB (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:14009)\n at async file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:9066\n at async JKA (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:1626)\n at async ra (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:9036)","timestamp":"2025-07-21T14:19:33.032Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"Could not process image\"}}\n at V4.generate (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1249:6428)\n at dM.makeStatusError (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1266:2101)\n at dM.makeRequest (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1266:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async w81.showErrors (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:14158)\n at async w81 (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2210:1704)\n at async mqB (file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:14009)\n at async file:///Users/sephrot/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2670:
Note: Error logs were truncated.
same issue here, my specific case #6175 attempted to read a .jpg that actually contained html data causing this exact same loop
I was getting this repeatedly even after restarting Claude Code. Switching projects fixed it.
I just ran into something related to this with a 179KB png that I wanted Claude Code to analyze. I started a new session and it proceeded with analyzing the image.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I am still seing this issue
still facing this issue:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"},"request_id":"req_011CWDq6UFkcTA3XCKdbLND9"}