Back to browse
GitHub Repository

Claude Code Contextual Memory Virtualisation (CMV)

74 starsTypeScript

CMV – strip up to 70% of Claude Code without losing any conversation

by CosmoSantoni·Feb 20, 2026·2 points·0 comments

AI Analysis

●●●BangerSolve My ProblemBig BrainDark Horse

Git for Claude context — snapshot and branch sessions, trim 70% bloat without losing conversation.

Strengths
  • Solves a real, frequent pain point in Claude Code workflow — context loss between sessions.
  • Clever insight: 60-70% of context is synthesized file contents and base64 overhead, not conversation.
  • Simple, focused feature set (snapshot/branch/trim/tree) with clear mental model — borrows git UX idioms effectively.
Weaknesses
  • Very early (v1.0.0 just released, 12 stars, 1 fork) — stability and edge cases untested at scale.
  • Requires manual intervention; doesn't integrate directly into Claude Code UI, just manipulates session files.
Target Audience

Claude Code users managing long-running codebase analysis sessions

Similar To

Claude Code (native /compact feature) · Session managers like tmux resurrect

Post Description

kept losing good conversations to /compact. you spend 40 minutes having claude map your codebase, it builds up real understanding, then context fills up and /compact crushes everything into a 3k token summary. "we discussed auth and decided on JWT." cool thanks.

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.

https://github.com/CosmoNaught/claude-code-cmv

Similar Projects

AI/ML●●Solid

LLM-DAG-UI – A branching conversation interface for Claude

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.

Niche GemRabbit Hole
tenahu
103mo ago