API Error 400 'Could not process image' kills entire session with no recovery

Resolved 💬 9 comments Opened Apr 13, 2026 by nodramallamaa Closed Jun 11, 2026

Description

When Claude Code attempts to read files that contain or are detected as images, and the API returns a 400 error ("Could not process image"), the entire session becomes unresponsive. No further interactions are possible and the user must start a new conversation.

Steps to Reproduce

  1. Have Claude Code read multiple files (e.g. scraped website content that includes image files)
  2. One of the files triggers the API error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"}}
  3. After this error, Claude Code stops responding entirely

Expected Behavior

  • Claude Code should gracefully handle the error, skip the problematic file, and continue working
  • The session should not become permanently broken from a single file read failure

Actual Behavior

  • The 400 error poisons the conversation context
  • Claude Code becomes completely unresponsive after the error
  • The only workaround is to start a new session

Screenshot

The error appears inline after a "Read 5 files" operation:

Read 5 files (ctrl+o to expand)
└  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Could not process image"},"request_id":"req_011Ca1rBxMnHTSLC7yCvHWk3"}

9 tasks (0 done, 1 in progress, 8 open)

Environment

  • macOS (Darwin 25.2.0)
  • Claude Code CLI
  • Model: claude-opus-4-6

Impact

This is particularly disruptive when working with scraped website content or any directory that mixes text and binary/image files. A single unprocessable image file kills an entire work session, potentially losing significant context and progress.

View original on GitHub ↗

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