chipfighter/context-attachment-manager
Local agent plugin that keeps image-heavy chats small and recalls originals by ID
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Context Attachment Manager (CAM) uses a shared local attachment engine with agent-specific plugins and adapters. It rewrites the model-bound request rather than deleting assets from the saved conversation. An image goes out inline when introduced. On the next turn, CAM replaces it with a stable ID placeholder and a short note generated by the model. The same placeholder is reused across requests, so later exchanges do not keep moving the prompt-cache invalidation point backward.
When the model calls cam_view_image with an ID, CAM appends the full original to the current turn instead of editing the historical placeholder. The project is primarily TypeScript, with a local proxy used by Codex and Claude Code and a separate native, in-process Python plugin for Hermes Agent. The root contains cam and cam.cmd launchers plus plugin/ and hooks/. These integration paths share the attachment behavior, but they do not all run through the same process model.
Key Capabilities & Differentiators
Auto-select keeps new and pinned images inline and replaces older attachments with placeholders. When tools produce many screenshots in one turn, CAM batches out the earlier ones while keeping the newest few in the request. The desktop panel supports search, browsing by character or place, manual selection and “Send every turn.” Claude Code also supports page-level retrieval for both text PDFs and scans under Auto-select. Codex does not send PDFs as files; pages converted to images follow the ordinary image path.
In one Codex conversation with nine keyframes, a request that failed to send after restart or compaction was 42.4 MB without CAM and 0.12 MB with it. In a separate 16-turn short-film comparison using Claude Code and Sonnet 5.5, post-compaction image questions scored 20/20 with CAM versus 8/20 without it. The largest request was 41,859 rather than 110,671 tokens, at about the same cost in that test. Payload size, recall quality and spend are distinct measures; these results do not establish a general latency or cost reduction.
Trade-offs & Limitations
Native compaction is a better fit when the aim is to shorten the conversation as a whole. Resizing is simpler when coarse visual detail is enough. CAM addresses a narrower problem: carrying fewer old attachments without giving up the ability to inspect the exact original. It is not a lossless substitute for compaction of the whole conversation; it preserves access to the assets that the model can still identify and chooses to retrieve.
The first placeholder rewrite still causes the rest of that historical turn to be processed again once. Changing an older image’s selection or pinning can invalidate the cache from that point, while fetching an original adds a tool call and puts the full image back into the current request. Agent compaction or provider-side context editing can still invalidate the prefix independently. In one Claude Code long-task comparison, the cached-input share was 87% with CAM and 91% without it. Evaluate the plugin on request-size failures and post-compaction recall first; do not assume it will lower every bill.
Hardware & Deployment Guide
Follow the agent-specific setup in INSTALL.md and restart the host; in Claude Desktop, start a new Code session. Codex also offers installation from its Plugins page. Codex and Claude Code have live-tested auto-selection and desktop panels. WorkBuddy, Gemini CLI, DeepSeek Harness and Hermes Agent are live-tested for auto-selection. Adapters for agents such as OpenCode, pi, Qwen Code and Cline have not been live-tested, so validate them with a representative workload before relying on them.
The local proxy has a Node.js runtime path; Hermes uses its native Python plugin. No separate GPU or VRAM requirement is specified, and running CAM locally does not move model inference off the agent’s configured backend. v0.13.2 improved shared proxy startup and memory use, v0.13.3 removed the visible Node console window on affected Windows setups, and v0.14.0 improved concurrent-session isolation and memory use while adding the Hermes plugin. Codex and Claude Code can install updates in the background and activate them on the next launch; review that behavior before a managed rollout.
Long screenshot-driven debugging, visual QA or storyboard sessions where repeated image payloads threaten request delivery and later turns still need exact originals. Start with a live-tested host.
Sessions are mostly text or short, downsampling is sufficient, you need a hard guarantee that images never reach the model provider, or your deployment depends on an adapter you cannot validate.
Quick Start & Installation
Install Context Attachment Manager for me, following https://github.com/chipfighter/context-attachment-manager/blob/main/INSTALL.md
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| context-attachment-manager ★ | 841 | +18 | TypeScript | MIT | Local agent plugin that keeps image-heavy chats small and recalls originals by I |
| ponytail | 204.4k | +4.1k | JavaScript | MIT | A prompt-driven coding-agent plugin for smaller changes and focused tests. |
| obsidian-skills | 56.2k | +1.7k | Shell | MIT | Agent Skills plugins for editing Obsidian files and working with vaults |
| ECC | 316.1k | +4.2k | JavaScript | MIT | Plugins and CLI workflows for planning, reviewing, and verifying agent-written c |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/chipfighter/context-attachment-manager.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about context-attachment-manager
How does the agent recover an image without rewriting old turns?
Does CAM need a GPU, and how should I size the host?
Can we use CAM commercially and keep sensitive images on-premises?
When is CAM preferable to native compaction or image resizing?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy