opensquad icon indicating copy to clipboard operation
opensquad copied to clipboard

API Error 400 "Could not process image" on every message

Open theartworkclub-oss opened this issue 8 months ago • 1 comments

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

theartworkclub-oss avatar Apr 03 '26 20:04 theartworkclub-oss

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.

renatoasse avatar Oct 08 '26 01:10 renatoasse