[BUG] Sessions with many screenshots become unrecoverable at 20MB limit

Resolved 💬 3 comments Opened Apr 9, 2026 by chrisdoerman Closed Apr 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Description:
Long-running Claude Code sessions that involve iterative UI work (screenshots for verification, user sharing screenshots of app state) accumulate images in the conversation context that cannot be purged. Once the context hits the 20MB message limit, every subsequent message fails with "Request too large (max 20MB). Try with a smaller file." The session is permanently bricked — there is no recovery path.

Impact:

  • All in-progress work context is lost (the user must start a fresh session and re-explain everything)
  • Approved permissions don't carry over to the new session, causing repeated permission prompts
  • Project-specific context built up over hours of collaboration is gone
  • Particularly painful for frontend/UI work where screenshots are essential for verification

What Should Happen?

Suggested improvements:

  • Auto-compact old images when approaching the limit (replace with text descriptions)
  • Let users manually drop specific images from context
  • Warn at 80% capacity so users can proactively start a new session before being forced
  • Carry over approved permissions between sessions on the same project

Error Messages/Logs

Steps to Reproduce

Long-running Claude Code sessions that involve iterative UI work (screenshots for verification, user sharing screenshots of app state) accumulate images in the conversation context that cannot be purged. Once the context hits the 20MB message limit, every subsequent message fails with "Request too large (max 20MB). Try with a smaller file." The session is permanently bricked — there is no recovery path.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Version 2.1.52

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

I am using the Windows app

View original on GitHub ↗

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