Remote control: image base64 data arrives empty, causing API 400 error

Resolved 💬 2 comments Opened Mar 14, 2026 by nagykatica Closed Apr 12, 2026

Bug Description

When using Claude Code via remote control (Claude app UI connecting to a CLI instance), images attached to messages arrive with empty base64 data. The image content block structure is preserved (type: "image", source.type: "base64", media_type: "image/png"), but source.base64 is an empty string.

This causes the Anthropic API to reject the request with:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.91.content.1.image.source.base64: image cannot be empty"}}

Steps to Reproduce

  1. Run Claude Code on a remote machine (e.g., VPS)
  2. Connect to it via the Claude app's remote control feature
  3. Send a message with an image attachment (paste or attach)
  4. The API call fails with the 400 error above

Evidence

Inspecting the session .jsonl file shows the image blocks arrive with zero-length base64:

Line 221, content[1]: source_type=base64, media_type=image/png, base64_len=0
Line 249, content[1]: source_type=base64, media_type=image/png, base64_len=0

The text content in the same message arrives fine — only the image binary data is dropped.

This happens even in fresh sessions (immediately after /clear), ruling out context compaction as the cause.

Environment

  • Claude Code version: 2.1.76
  • OS: Windows Server 2025 Datacenter 10.0.26100
  • Connection method: Remote control via Claude app UI
  • Image format: PNG (pasted from clipboard)

Expected Behavior

Image base64 data should be transmitted intact through the remote control protocol, just as text content is.

Workaround

Save images to a synced folder and use the Read tool to view them, or use a separate web UI that handles images via direct file upload.

View original on GitHub ↗

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