API Error 400 "Could not process image" on every message
The framework sends a screenshot to the Anthropic API on every agent message. The image encoding produces an invalid payload, causing a 400 error on every call regardless of the task.
Steps to reproduce:
- Run any squad with image-creator or template-designer skills
- Every message triggers: API Error 400 - Could not process image
- Error fires even on simple text messages like "hey" or "continue"
- Killing all processes and restarting does not fix it
Environment:
- Mac, Claude Sonnet 4
- Playwright/Chromium headless enabled in playwright.config.json
- Squad: blix-launch-content
Root cause suspected:
- Playwright screenshot is being encoded and passed to the Anthropic API as a vision input on every message
- The image buffer appears to be invalid or malformed at the point it hits the API
- Error persists across restarts, config changes, and squad state resets
Workaround needed:
- Option to disable screenshot capture entirely
- Or fix the base64 encoding before passing to Anthropic vision API
Vou fechar: o opensquad não envia imagens para a API da Anthropic por conta própria. O erro 400 "Could not process image" vem do cliente (Claude Code) quando um screenshot inválido fica no histórico da conversa, e a partir daí toda mensagem nova reenvia esse screenshot. Abrir uma conversa nova (/clear) resolve, e versões recentes do Claude Code já tratam melhor esse caso. Se acontecer de novo com uma versão atual, reabra com a versão do Claude Code e o passo em que começou.