[Bug] Anthropic API Error: Request exceeds maximum size (413)

Resolved 💬 3 comments Opened Dec 19, 2025 by jlmacedo Closed Dec 22, 2025

Bug Description
 API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}

Environment Info

  • Platform: darwin
  • Terminal: pycharm
  • Version: 2.0.70
  • Feedback ID:

Errors

[{"error":"Error: Failed to create shell snapshot: Command failed: /bin/zsh -c -l SNAPSHOT_FILE=/Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\n      source \"/Users/paiva/.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 system ones and write directly to file\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 ! command -v rg >/dev/null 2>&1; then\" >> \"$SNAPSHOT_FILE\"\n      echo '  alias rg='\"'/Users/paiva/.claude/local/node_modules/\\@anthropic-ai/claude-code/vendor/ripgrep/x64-darwin/rg'\" >> \"$SNAPSHOT_FILE\"\n      echo \"fi\" >> \"$SNAPSHOT_FILE\"\n  \n\n      # Add PATH to the file\n      echo \"export PATH=/Users/paiva/PycharmProjects/CNPJData/.venv/bin\\:/usr/local/lib/ruby/gems/3.4.0/bin\\:/usr/local/opt/php\\@8.2/sbin\\:/usr/local/opt/php\\@8.2/bin\\:/usr/local/bin\\:/System/Cryptexes/App/usr/bin\\:/usr/bin\\:/bin\\:/usr/sbin\\:/sbin\\:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin\\:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin\\:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin\\:/Library/Apple/usr/bin\\:/Users/paiva/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    \nzsh:5: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:10: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:11: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:14: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:24: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:25: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:27: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:34: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:40: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:41: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:42: permission denied: /Users/paiva/.claude/shell-snapshots/snapshot-zsh-1765895767951-9e1sag.sh\nzsh:43: permission denied: /Users/paiva/

Note: Error logs were truncated.

View original on GitHub ↗

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