[FEATURE] Selective image removal from conversation context

Resolved 💬 3 comments Opened Apr 23, 2026 by 24kchengYe Closed Apr 26, 2026

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:

  1. /compact — compresses the entire conversation history into a summary, losing all original dialogue details
  2. /clear — wipes everything
  3. 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
  • /compact is 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

View original on GitHub ↗

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