-
-
Notifications
You must be signed in to change notification settings - Fork 55.9k
Closed
Description
Problem
When an image larger than 5MB is sent to Clawdbot, it gets stored in the session context. On every subsequent reply attempt, the Anthropic API rejects the request with:
LLM request rejected: image exceeds 5 MB maximum: 5775932 bytes > 5242880 bytes
This creates an infinite retry loop that completely blocks the session. The user cannot interact with the bot at all until manually clearing the session files.
Current Workaround
- Delete the session file:
rm ~/.clawdbot/sessions/<session>.json - Clear the session index:
rm ~/.clawdbot/sessions/index.json - Restart the gateway:
clawdbot gateway restart
Suggested Solutions
Short term
- Validate image size before storing in session context
- Reject images >5MB with a friendly user-facing message
- Or auto-resize/compress images to fit the limit
Medium term
- Add configurable fallback to OpenAI vision API for large images (OpenAI has higher limits)
- Something like:
{
"image": {
"maxSizeBytes": 5242880,
"fallbackProvider": "openai"
}
}
Long term
- Health check that detects sessions with problematic images
- Auto-recovery mechanism
Environment
- Clawdbot version: 2026.1.24-3
- Provider: Anthropic (Claude)
- Channel: Telegram
Impact
This is a critical issue - it completely blocks a session with no way to recover without manual intervention.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels