Context Attachment Manager for Claude Code: earlier images go out as short placeholders instead of being sent again with every message, and the model fetches the original back by its ID.
For Claude Code sessions with many images or PDFs: earlier images and PDFs go out as short placeholders instead of being sent again with every message, the model fetches the original back by its ID (also after compaction), and the prompt cache keeps working.
Keep long, image-heavy chats in AI agents fast. Works with Codex, Claude Code, WorkBuddy, Gemini CLI, DeepSeek Harness, Hermes Agent, and more. Earlier images become one-line placeholders with an ID; when the model needs one again, it fetches the original by its ID, also after the chat is compacted.
Questions about the images after compaction (Sonnet 5.5)
About the same cost
Largest request: 41,859 vs 110,671 tokens
Get started in three steps
1. Install. Send this to your agent. It identifies its platform and installs the right setup:
Install Context Attachment Manager for me, following https://github.com/chipfighter/context-attachment-manager/blob/main/INSTALL.md
Then restart the agent (in Claude Desktop, start a new Code session). To do it by hand, see installation, updates and uninstall. In Codex and Claude Code it then keeps itself up to date: new versions install in the background and take effect the next time the agent starts.
2. Work as usual. The plugin is on by default. Images from earlier turns go out as one-line placeholders; new images and the references you pin go out as they are. A placeholder looks like this:
[Image IMG-004 omitted | shot-1.png | generated image | turn 2 | 505×505]
Features: place: Street | Qinghe | medium shot, umbrella, lanterns
For the original, call cam_view_image with "IMG-004".
3. The model fetches by ID. When it needs to look at an earlier image again, it fetches the original by its ID, also after compaction. Nothing is deleted, and your images and chat history stay on your computer.
The panel: browse by character and place
The plugin works without the panel; open it when you want control:
Browse by character and place: images are sorted into characters, places, screens and documents, with one card per name. Open a character to see their design images first, then the shots they appear in, place by place.
Find an image by a detail or a comment you remember, like "rainy night" or "best face".
Keep a reference in view: open an image and check Send every turn.
Choose images yourself: turn off Auto-select and pick what goes with your next message.