[Bug] Anthropic API Error: Usage Policy violation when sending images

Resolved 💬 3 comments Opened Nov 16, 2025 by illusivejosiah Closed Nov 20, 2025

Bug Description
API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last
message or start a new session for Claude Code to assist with a different task. If you are seeing this refusal repeatedly, try running /model claude-sonnet-4-20250514 to switch models.

This happens when sending images randomly.

Environment Info

  • Platform: linux
  • Terminal: tmux
  • Version: 2.0.42
  • Feedback ID: 5cc0edff-5cff-4222-a7aa-b6aa24323f72

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at mD (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1062:4489)\n    at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1062:4217\n    at Array.map (<anonymous>)\n    at tC (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1062:4208)\n    at ELQ (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:3003)\n    at Y$ (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:105:19414)\n    at st (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:107:42814)\n    at h9 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:107:38355)\n    at up (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:107:38283)\n    at z$ (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:107:38137)","timestamp":"2025-11-16T16:02:14.672Z"}]

View original on GitHub ↗

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