[FEATURE] Selective image removal from conversation context
Problem
When working with images in a Claude Code session, large or accumulated images can trigger this error:
An image in the conversation exceeds the dimension limit for many-image requests (2000px). Run /compact to remove old images from context, or start a new session.
The only options currently available are:
/compact— compresses the entire conversation history into a summary, losing all original dialogue details/clear— wipes everything- Start a new session — loses all context
None of these allow selectively removing images while preserving the text conversation. This is a poor trade-off: users lose valuable conversation context just to free up space taken by images they no longer need.
Proposed Solution
Add a command to selectively remove images from the conversation context without affecting text messages. For example:
/clear-images— remove all images from context, keep text intact/clear-images last 3— remove only the last 3 images/clear-images all --before 10— remove images older than 10 messages ago
Alternatively, /compact could accept a flag like /compact --images-only that strips image data but preserves the original text conversation verbatim (not summarized).
Why This Matters
- Image-heavy workflows (UI review, screenshot debugging, design iteration) frequently hit the dimension/count limit
- Users who have built up significant conversation context (architectural decisions, code discussions) should not be forced to lose it just because images accumulated
/compactis a blunt instrument — it destroys the original dialogue structure and nuance, replacing it with a lossy summary- This creates a frustrating UX where users must choose between "keep working with images" and "keep my conversation history"
Current Workaround
There is no good workaround. Users can try /compact with a prompt like /compact preserve all code and decisions, only remove images, but this still summarizes the text rather than preserving it verbatim.
Environment
- Claude Code CLI + Desktop (all platforms)
- Affects any session with multiple or large images
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗