Request too large (max 20MB) after MCP screenshot - session becomes unusable

Resolved 💬 9 comments Opened Mar 22, 2026 by bonskari Closed May 12, 2026

Bug Description

After taking a screenshot via an MCP tool (take_screenshot), Claude Code shows:

Request too large (max 20MB). Double press esc to go back and try with a smaller file.

After this error, the session becomes completely unusable - every subsequent message gets the same error. The only way to recover is to start a new session.

Steps to Reproduce

  1. Use an MCP tool that returns a screenshot (e.g. take_screenshot)
  2. Screenshot is apparently too large (4K display)
  3. Error: Request too large (max 20MB)
  4. After this, ALL subsequent messages fail with the same error
  5. Cannot type anything, cannot recover the session

Expected Behavior

  • The screenshot should be resized/compressed to fit within limits
  • OR the error should not break the entire session
  • User should be able to continue using Claude Code after dismissing the error

Environment

  • Claude Code version: 2.1.81
  • OS: CachyOS (Arch Linux)
  • Display: 4K (3840x2160)
  • The MCP screenshot tool likely returns a large uncompressed image

Impact

Session becomes completely frozen after this error. User loses all conversation context and must restart.

View original on GitHub ↗

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