[BUG] > test ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.22.content.0. image.source.base64: image cannot be empty"},"request_id":"req_011CV9HYD3EFnFwt3v3ck3RG"}
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
API Error 400 - Empty base64 image error in Android Studio Terminal
Description:
I'm using Claude Code (v2.0.42) in the Android Studio terminal on macOS, and I'm experiencing a consistent API error regardless of what command I input.
Steps to Reproduce:
Open Terminal in Android Studio (or external terminal)
Navigate to Android project directory: cd /Users/danielepauli/AndroidStudioProjects/Prometheus/Prometheus_V1
Start Claude Code: claude
Login successful, Claude Code interface loads
Type any command (e.g., "test", "show project structure", "list files", etc.)
Press Enter
Expected Behavior:
Claude should process the command and provide a response based on the input.
Actual Behavior:
Every command results in the following API error:
test
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.22.content.0.image.source.base64: image cannot be empty"},"request_id":"req_011CV9HRsMsoawNajT67Fqsv"}
Environment:
Claude Code Version: 2.0.42
OS: macOS (Sonnet 4.5, Claude Pro subscription)
Terminal: Android Studio integrated terminal (also tested in external Terminal.app - same issue)
Project Type: Android/Kotlin project
Authentication: Claude account with subscription (successfully logged in)
Additional Context:
Error mentions "image.source.base64: image cannot be empty" - I'm not intentionally sending any images
Error occurs with simple text commands
Error references "messages.22" suggesting it might be related to message history/context
Claude Code installation was fresh (installed today via curl -fsSL https://claude.ai/install.sh | bash)
Impact:
Unable to use Claude Code at all in the terminal - blocks all functionality.
Workaround:
Currently using Claude web interface as alternative.
What Should Happen?
API Error 400 - Empty base64 image error in Android Studio Terminal
Description:
I'm using Claude Code (v2.0.42) in the Android Studio terminal on macOS, and I'm experiencing a consistent API error regardless of what command I input.
Steps to Reproduce:
Open Terminal in Android Studio (or external terminal)
Navigate to Android project directory: cd /Users/danielepauli/AndroidStudioProjects/Prometheus/Prometheus_V1
Start Claude Code: claude
Login successful, Claude Code interface loads
Type any command (e.g., "test", "show project structure", "list files", etc.)
Press Enter
Expected Behavior:
Claude should process the command and provide a response based on the input.
Actual Behavior:
Every command results in the following API error:
test
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.22.content.0.image.source.base64: image cannot be empty"},"request_id":"req_011CV9HRsMsoawNajT67Fqsv"}
Environment:
Claude Code Version: 2.0.42
OS: macOS (Sonnet 4.5, Claude Pro subscription)
Terminal: Android Studio integrated terminal (also tested in external Terminal.app - same issue)
Project Type: Android/Kotlin project
Authentication: Claude account with subscription (successfully logged in)
Additional Context:
Error mentions "image.source.base64: image cannot be empty" - I'm not intentionally sending any images
Error occurs with simple text commands
Error references "messages.22" suggesting it might be related to message history/context
Claude Code installation was fresh (installed today via curl -fsSL https://claude.ai/install.sh | bash)
Impact:
Unable to use Claude Code at all in the terminal - blocks all functionality.
Workaround:
Currently using Claude web interface as alternative.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.22.content.0.
image.source.base64: image cannot be empty"},"request_id":"req_011CV9Hp3Da4wCxEZDhTTPKF"}
Steps to Reproduce
I'm using Claude Code (v2.0.42) in the Android Studio terminal on macOS, and I'm experiencing a consistent API error regardless of what command I input.
Steps to Reproduce:
Open Terminal in Android Studio (or external terminal)
Navigate to Android project directory: cd /Users/danielepauli/AndroidStudioProjects/Prometheus/Prometheus_V1
Start Claude Code: claude
Login successful, Claude Code interface loads
Type any command (e.g., "test", "show project structure", "list files", etc.)
Press Enter
Expected Behavior:
Claude should process the command and provide a response based on the input.
Actual Behavior:
Every command results in the following API error:
test
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.22.content.0.image.source.base64: image cannot be empty"},"request_id":"req_011CV9HRsMsoawNajT67Fqsv"}
Environment:
Claude Code Version: 2.0.42
OS: macOS (Sonnet 4.5, Claude Pro subscription)
Terminal: Android Studio integrated terminal (also tested in external Terminal.app - same issue)
Project Type: Android/Kotlin project
Authentication: Claude account with subscription (successfully logged in)
Additional Context:
Error mentions "image.source.base64: image cannot be empty" - I'm not intentionally sending any images
Error occurs with simple text commands
Error references "messages.22" suggesting it might be related to message history/context
Claude Code installation was fresh (installed today via curl -fsSL https://claude.ai/install.sh | bash)
Impact:
Unable to use Claude Code at all in the terminal - blocks all functionality.
Workaround:
Currently using Claude web interface as alternative.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.0.42
Claude Code Version
v2.0.42
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
I'm using Claude Code (v2.0.42) in the Android Studio terminal on macOS, and I'm experiencing a consistent API error regardless of what command I input.
Steps to Reproduce:
Open Terminal in Android Studio (or external terminal)
Navigate to Android project directory: cd /Users/danielepauli/AndroidStudioProjects/Prometheus/Prometheus_V1
Start Claude Code: claude
Login successful, Claude Code interface loads
Type any command (e.g., "test", "show project structure", "list files", etc.)
Press Enter
Expected Behavior:
Claude should process the command and provide a response based on the input.
Actual Behavior:
Every command results in the following API error:
test
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.22.content.0.image.source.base64: image cannot be empty"},"request_id":"req_011CV9HRsMsoawNajT67Fqsv"}
Environment:
Claude Code Version: 2.0.42
OS: macOS (Sonnet 4.5, Claude Pro subscription)
Terminal: Android Studio integrated terminal (also tested in external Terminal.app - same issue)
Project Type: Android/Kotlin project
Authentication: Claude account with subscription (successfully logged in)
Additional Context:
Error mentions "image.source.base64: image cannot be empty" - I'm not intentionally sending any images
Error occurs with simple text commands
Error references "messages.22" suggesting it might be related to message history/context
Claude Code installation was fresh (installed today via curl -fsSL https://claude.ai/install.sh | bash)
Impact:
Unable to use Claude Code at all in the terminal - blocks all functionality.
Workaround:
Currently using Claude web interface as alternative.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗