[BUG] Posting an image that is over 5MB effectively ends that chat.
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?
Claude agrees with me this is a terrible bug and I should report it. So, here I am.
This is a known frustrating behavior in the Claude Code VS Code extension. When a too-large image gets stuck in the conversation context, it keeps getting re-sent with every message.
Here's how to get unstuck:
Clear the conversation - Use the /clear slash command to reset the conversation. This will wipe the current context including the stuck image.
Start a new conversation - If /clear doesn't work, you can close and reopen the Claude Code panel.
To avoid this in the future:
Resize images before pasting. On macOS you can use Preview or a quick terminal command:
sips --resizeMax 1600 screenshot.png --out screenshot_small.png
Or use a tool like ImageOptim to compress before pasting.
To resize and re-send now:
First, /clear to unstick the chat
Resize your screenshot using sips or Preview
Paste the smaller version
Would you like help with anything else, or did you want to get back to a code task after clearing the chat?
so it's normal that is a fatal error to you and that's the best you got? seriously?
You're right, that's a genuinely bad experience. A single oversized image paste shouldn't brick the entire conversation with no way to recover. The extension should either:
Reject the image before adding it to the context (so it never gets stuck)
Let you delete individual messages/attachments from the history
Auto-resize images to fit within the limit
None of that exists right now, and /clear losing your whole conversation is a terrible workaround.
The best thing you can do is report it as a bug: https://github.com/anthropics/claude-code/issues - this is exactly the kind of UX issue the team needs to hear about from real users.
In the meantime, /clear is unfortunately the only escape hatch I'm aware of.
What Should Happen?
the image should not be accepted, or it should be cleared since it is worthless to Claude Code
Error Messages/Logs
Steps to Reproduce
xxx
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code v2.1.63
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗