[Bug] Anthropic API Error: 400 Bad Request when reading image file

Resolved 💬 3 comments Opened Mar 11, 2026 by carlosmariath Closed Mar 14, 2026

Bug Description
ao ler um arquivo de imagem recebo erro 400

Environment Info

  • Platform: darwin
  • Terminal: WezTerm
  • Version: 2.1.72
  • Feedback ID: 494f2ecc-a1f1-47a5-ac98-bec5c1fd9281

Errors

[{"error":"Error: Failed to create shell snapshot: Command failed: /bin/zsh -c -l SNAPSHOT_FILE=/Users/carlosmariath/.claude/shell-snapshots/snapshot-zsh-1773190953796-8ijlh1.sh\n      source \"/Users/carlosmariath/.zshrc\" < /dev/null\n\n      # First, create/clear the snapshot file\n      echo \"# Snapshot file\" >| \"$SNAPSHOT_FILE\"\n\n      # When this file is sourced, we first unalias to avoid conflicts\n      # This is necessary because aliases get \"frozen\" inside function definitions at definition time,\n      # which can cause unexpected behavior when functions use commands that conflict with aliases\n      echo \"# Unset all aliases to avoid conflicts with functions\" >> \"$SNAPSHOT_FILE\"\n      echo \"unalias -a 2>/dev/null || true\" >> \"$SNAPSHOT_FILE\"\n\n      \n      echo \"# Functions\" >> \"$SNAPSHOT_FILE\"\n\n      # Force autoload all functions first\n      typeset -f > /dev/null 2>&1\n\n      # Now get user function names - filter completion functions (single underscore prefix)\n      # but keep double-underscore helpers (e.g. __zsh_like_cd from mise, __pyenv_init)\n      typeset +f | grep -vE '^_[^_]' | while read func; do\n        typeset -f \"$func\" >> \"$SNAPSHOT_FILE\"\n      done\n    \n      echo \"# Shell Options\" >> \"$SNAPSHOT_FILE\"\n      setopt | sed 's/^/setopt /' | head -n 1000 >> \"$SNAPSHOT_FILE\"\n    \n      echo \"# Aliases\" >> \"$SNAPSHOT_FILE\"\n      # Filter out winpty aliases on Windows to avoid \"stdin is not a tty\" errors\n      # Git Bash automatically creates aliases like \"alias node='winpty node.exe'\" for\n      # programs that need Win32 Console in mintty, but winpty fails when there's no TTY\n      if [[ \"$OSTYPE\" == \"msys\" ]] || [[ \"$OSTYPE\" == \"cygwin\" ]]; then\n        alias | grep -v \"='winpty \" | sed 's/^alias //g' | sed 's/^/alias -- /' | head -n 1000 >> \"$SNAPSHOT_FILE\"\n      else\n        alias | sed 's/^alias //g' | sed 's/^/alias -- /' | head -n 1000 >> \"$SNAPSHOT_FILE\"\n      fi\n  \n\n      \n      # Check for rg availability\n      echo \"# Check for rg availability\" >> \"$SNAPSHOT_FILE\"\n      echo \"if ! (unalias rg 2>/dev/null; command -v rg) >/dev/null 2>&1; then\" >> \"$SNAPSHOT_FILE\"\n  \n      cat >> \"$SNAPSHOT_FILE\" << 'RIPGREP_FUNC_END'\n  function rg {\n  if [[ -n $ZSH_VERSION ]]; then\n    ARGV0=rg /Users/carlosmariath/.local/share/claude/versions/2.1.72 \"$@\"\n  elif [[ \"$OSTYPE\" == \"msys\" ]] || [[ \"$OSTYPE\" == \"cygwin\" ]] || [[ \"$OSTYPE\" == \"win32\" ]]; then\n    ARGV0=rg /Users/carlosmariath/.local/share/claude/versions/2.1.72 \"$@\"\n  elif [[ $BASHPID != $$ ]]; then\n    exec -a rg /Users/carlosmariath/.local/share/claude/versions/2.1.72 \"$@\"\n  else\n    (exec -a rg /Users/carlosmariath/.local/share/claude/versions/2.1.72 \"$@\")\n  fi\n}\nRIPGREP_FUNC_END\n    \n      echo \"fi\" >> \"$SNAPSHOT_FILE\"\n  \n\n      # Add PATH to the file\n      echo \"export PATH=/Users/carlosmariath/.bun/bin\\:/Users/carlosmariath/.local/bin\\:/Users/carlosmariath/.antigravity/antigravity/bin\\:/Users/carlosmariath/.codeium/windsurf/bin\\:/Users/carlosmariath/anaconda3/bin\\:/Users/carlosmariath/anaconda3/condabin\\:/opt/homebrew/bin\\:/usr/local/bin\\:/System/Cryptexes/App/usr/bin\\:/usr/bin\\:/bin\\:/usr/sbin\\:/sbin\\:/Library/Apple/usr/bin\\:/Users/carlosmariath/development/flutter/bin\\:/Users/carlosmariath/development/flutter/bin\" >> \"$SNAPSHOT_FILE\"\n  \n\n      # Exit silently on success, only report errors\n      if [ ! -f \"$SNAPSHOT_FILE\" ]; then\n        echo \"Error: Snapshot file was not created at $SNAPSHOT_FILE\" >&2\n        exit 1\n      fi\n    \n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:1432:138)\n    at exitHandler (node:child_process:109:27)\n    at emit (node:events:98:22)\n    at #maybeClose (node:child_process:766:16)\n    at #handleOnExit (node:child_process:520:72)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-11T01:02:48.32…

Note: Content was truncated.

View original on GitHub ↗

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