CMV – Virtual memory for Claude Code sessions
Git-like versioning for Claude's context window—finally replay work without rebuilding understanding.
Claude Code Contextual Memory Virtualisation (CMV)
Git for Claude context — snapshot and branch sessions, trim 70% bloat without losing conversation.
Claude Code users managing long-running codebase analysis sessions
Claude Code (native /compact feature) · Session managers like tmux resurrect
dug into the actual session JSONL files and the breakdown is kind of absurd -- 60-70% is raw file contents from tool reads that claude already synthesized, another 15-20% is base64 thinking signatures. your actual conversation is like 10-15% of the window.
so i built cmv. it strips the junk and keeps every message verbatim. tool results over 500 chars become stubs, thinking sigs get removed, everything you said stays.
cmv trim --latest # trim and relaunch, 50-70% smaller
cmv snapshot "analysis" --latest # save a session state
cmv branch "analysis" --name "auth" # fork from it later
also has a TUI dashboard that shows the token breakdown per session so you can see what's eating your context before you do anything.
what it's not:
* not a token monitor (ccusage etc already do that)
* doesn't touch original sessions, everything creates copies
* local only, reads JSONL directly, no API calls
curious how others handle this. most people seem to just accept /compact but losing a deep architectural discussion to a bullet point summary felt wrong enough to build something.
Git-like versioning for Claude's context window—finally replay work without rebuilding understanding.
Conversation branching and navigation beats Claude Code's linear chat model.
Drag-to-branch is the clear selling point: you can fork any message and pursue alternate prompts while that branch only inherits direct ancestors. The BYOK approach (API key stored in your browser + local Express proxy) keeps it lightweight and safe for a demo, but it's clearly a concept build tied to Claude rather than a multi-model, production-ready tool.
Claude memory is solved—Pinecone, LLamaIndex, and Continue already do this.
Git for agent memory beats Letta's file-level versioning with zero-copy branching.
Seamlessly hand off Claude Code sessions to Gemini without losing 30 messages of context.