claude-code - 💡(How to fix) Fix [Bug] Image attachment causes unrecoverable "Could not process image" API 400 loop — context becomes unusable [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47804Fetched 2026-04-15 06:41:51
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1cross-referenced ×1

Error Message

When a PNG image is shared in the Claude Code session, the API returns a 400 error with "Could not process image". The image remains in the conversation context and every subsequent message, including slash commands like /resume, /compact, and /simplify also fails with the same error. The session becomes completely unusable without clearing context. error output API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"},"request_id":"req_011Ca3JUpFsdmzTFbJsAZnQG"} [{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/lchihana/.local/share/claude/versions/2.1.104 (expected in multi-process scenarios)\n at Tc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n at Se6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:18:44.991Z"},{"error":"Error: 403 {"type":"error","error":{"type":"permission_error","message":"OAuth authentication is currently not allowed for this organization."},"request_id":"req_011Ca1XCoEfjUFZxKZPCArm7"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:53504)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:19:11.594Z"},{"error":"SyntaxError: JSON Parse error: Unexpected identifier "Your"\n at <parse> (:0)\n at parse (unknown)\n at pb8 (/$bunfs/root/src/entrypoints/cli.js:164:10030)\n at O (/$bunfs/root/src/entrypoints/cli.js:128:19312)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:166:1186)\n at j5H (/$bunfs/root/src/entrypoints/cli.js:6107:466)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:19:11.594Z"},{"error":"Error: 403 {"type":"error","error":{"type":"permission_error","message":"OAuth authentication is currently not allowed for this organization."},"request_id":"req_011Ca1XCoNcC7VzydcqrnV3P"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:53504)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:19:11.685Z"},{"error":"AxiosError: Request failed with status code 429\n at eg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12750)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at async yCH (/$bunfs/root/src/entrypoints/cli.js:2909:15497)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5338:16727)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:24:03.103Z"},{"error":"AxiosError: Request failed with status code 429\n at eg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12750)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at async yCH (/$bunfs/root/src/entrypoints/cli.js:2909:15497)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5338:16727)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:24:11.614Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:43:34.859Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at async KE6 (/$bunfs/root/src/entrypoints/cli.js:435:3803)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T10:24:08.034Z"},{"error":"Error: Stream idle timeout - partial response received\n at _p7 (/$bunfs/root/src/entrypoints/cli.js:7923:10845)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T11:02:40.714Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T11:02:45.701Z"},{"error":…

Code Example

**Environment Info**
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.104
- Feedback ID: 21006f47-3f30-4eb7-9dca-6091d8a46958

**Errors**
RAW_BUFFERClick to expand / collapse

Bug Description When a PNG image is shared in the Claude Code session, the API returns a 400 error with "Could not process image". The image remains in the conversation context and every subsequent message, including slash commands like /resume, /compact, and /simplify also fails with the same error. The session becomes completely unusable without clearing context.

error output API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"},"request_id":"req_011Ca3JUpFsdmzTFbJsAZnQG"}

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.104
  • Feedback ID: 21006f47-3f30-4eb7-9dca-6091d8a46958

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/lchihana/.local/share/claude/versions/2.1.104 (expected in multi-process scenarios)\n    at Tc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n    at Se6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:18:44.991Z"},{"error":"Error: 403 {\"type\":\"error\",\"error\":{\"type\":\"permission_error\",\"message\":\"OAuth authentication is currently not allowed for this organization.\"},\"request_id\":\"req_011Ca1XCoEfjUFZxKZPCArm7\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:53504)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:19:11.594Z"},{"error":"SyntaxError: JSON Parse error: Unexpected identifier \"Your\"\n    at <parse> (:0)\n    at parse (unknown)\n    at pb8 (/$bunfs/root/src/entrypoints/cli.js:164:10030)\n    at O (/$bunfs/root/src/entrypoints/cli.js:128:19312)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:166:1186)\n    at j5H (/$bunfs/root/src/entrypoints/cli.js:6107:466)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:19:11.594Z"},{"error":"Error: 403 {\"type\":\"error\",\"error\":{\"type\":\"permission_error\",\"message\":\"OAuth authentication is currently not allowed for this organization.\"},\"request_id\":\"req_011Ca1XCoNcC7VzydcqrnV3P\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:53504)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:19:11.685Z"},{"error":"AxiosError: Request failed with status code 429\n    at eg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12750)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at async yCH (/$bunfs/root/src/entrypoints/cli.js:2909:15497)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5338:16727)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:24:03.103Z"},{"error":"AxiosError: Request failed with status code 429\n    at eg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12750)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at async yCH (/$bunfs/root/src/entrypoints/cli.js:2909:15497)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:5338:16727)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:24:11.614Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T09:43:34.859Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at async KE6 (/$bunfs/root/src/entrypoints/cli.js:435:3803)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T10:24:08.034Z"},{"error":"Error: Stream idle timeout - partial response received\n    at _p7 (/$bunfs/root/src/entrypoints/cli.js:7923:10845)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T11:02:40.714Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T11:02:45.701Z"},{"error":

Note: Content was truncated.

extent analysis

TL;DR

Clearing the conversation context may resolve the issue with the API returning a 400 error when a PNG image is shared in the Claude Code session.

Guidance

  • The error message "Could not process image" suggests an issue with handling the image file, potentially due to its format or size.
  • The fact that subsequent messages, including slash commands, fail with the same error indicates a persistent problem that might be related to the session state.
  • Checking the image file for any corruption or compatibility issues with the Claude Code session might provide insight.
  • Attempting to share a different image file or clearing the conversation context and then sharing the original image again could help isolate the problem.

Example

No specific code snippet can be provided without more context on the API or the image processing code.

Notes

The provided error output and environment information suggest a complex issue that might involve multiple factors, including potential network errors (e.g., timeouts), permission issues, or problems with the image file itself. The truncated content limits the ability to provide a comprehensive solution.

Recommendation

Apply a workaround by clearing the conversation context before attempting to share the image again, as this might reset the session state and allow the image to be processed correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Image attachment causes unrecoverable "Could not process image" API 400 loop — context becomes unusable [1 comments, 2 participants]