Repository navigation
Releases: IngressionLabs/contextual-memory-virtualisation
Release list
v2.2.1
Changed
- New home: IngressionLabs/contextual-memory-virtualisation. Old GitHub URLs redirect. API docs are now at https://ingressionlabs.github.io/contextual-memory-virtualisation/.
Fixed
- Hooks are recognised whatever folder CMV is installed in. v2.2.0 identified its absolute-path hooks only when the install path contained
cmv, so a clone intocontextual-memory-virtualisation/would have duplicated hooks on reinstall and been invisible tocmv hook status/uninstall.
Note for forks and clones
The repository history was rewritten on 2026-10-22 to clean up commit metadata. Code, authors and dates are unchanged, but commit IDs are new. If you have a fork, use Sync fork → Discard commits; for a local clone run git fetch origin && git reset --hard origin/main (or re-clone).
v2.2.0
Fixed
- Trimmed sessions resume with their full history (#10). Trimming could break the
parentUuidchain Claude Code walks on resume, so a branch could resume nearly empty:- Session-title
summaryrecords (which carryleafUuidand can appear anywhere) were treated as compaction boundaries, discarding everything before them. Onlycompact_boundaryand legacy leaf-lesssummaryrecords count now. - Compaction boundaries that preserve earlier messages (
compactMetadata.preservedSegment/preservedMessages) no longer have those messages skipped. - Rows left with no content after trimming (thinking-only assistant rows, tool_result-only rows) are dropped and their children re-linked to the nearest kept ancestor. The final row is never dropped, so a running session can keep appending safely.
- Branch files are stamped with the new session ID on every row, as Claude Code's own
--fork-sessiondoes. sessions-index.jsonentries record the real message count and git branch instead of0/ empty.- The multi-branch orientation message is written as a proper chained
userrow instead of a barehumanline.
- Session-title
- Write/Edit inputs are no longer stubbed on trim (#11, #12 by @VolanticSystems). Stubbing them could silently corrupt files when replayed. Opt back in with
autoTrim.stubWriteInputs. Agent/Taskpromptfields are preserved too. - Auto-trim no longer rewrites an already-trimmed session on every tool call (#12). It waits until the file grows past
autoTrim.reTrimGrowthBytes(default ~64KB). cmv --versionand snapshot metadata report the real version, read from package.json (#12).- Hooks work in non-interactive shells (#7 by @VolanticSystems). Hook commands now call CMV as
"<node>" "<cmv>/dist/index.js", so they need neither PATH (nvm,~/.npm-global) nor the executable bit, and work on Windows and in paths with spaces. Re-running install replaces old hook entries in every format. - New windows open in the snapshotted project folder (#4). gnome-terminal, ptyxis and Konsole ignore the caller's working directory, so windows opened in
$HOME. Every window nowcds into the project itself; Windows usesstart /D. - Closed sessions no longer stay "busy" (#13). Only processes that are
claudeitself count as running, not terminals whose arguments mention the session.
Added
- Choose your terminal (#13).
cmv config terminal <preset>with presets for Terminal.app, iTerm2, Ghostty, kitty, WezTerm, Alacritty (macOS and Linux), plus ptyxis, gnome-terminal, Konsole, xfce4-terminal, foot, xterm. Or set a custom command containing{cmd}. Without a setting, CMV opens new windows in the terminal it's running in. - ptyxis support (Fedora 41+ default terminal).
- Dashboard honours
claude_cli_pathwhen opening new windows.
v2.1.1
Changed
- Coverage thresholds raised to 95/85/95/95 — statements, branches, functions, lines. Up from 85/80/85/85.
- 465 tests across 34 files, up from 403.
Added
- 62 new tests closing coverage gaps in:
trimmer.ts— unparseable JSON pass-through, orphaned tool_result filtering (both content paths).session-reader.ts— scanJsonlFiles fallback, IDE lock file detection, projectFilter, short prefix matching, needsCount/needsPath enrichment.- Command files — error paths and edge cases for branch, trim, sessions, info, config, list, import, export, dashboard, snapshot.
paths.ts— previously untested utility functions (getCmvAutoBackupsDir, getCmvAutoTrimLogPath, getClaudeSettingsPath, getClaudeBaseDir).
v2.1.0
What's new
Added
- Comprehensive test suite — 403 tests across 34 files covering core modules, utilities, and all CLI commands
- Coverage enforcement — 85% statements, 80% branches, 85% functions, 85% lines thresholds
- CI/CD pipeline — 3 OS × 3 Node versions, type-checking, Codecov integration
- API documentation — TypeDoc-generated docs deployed to GitHub Pages
- CONTRIBUTING.md, SPDX license headers, CI and Codecov badges
Fixed
- Windows file lock in branch-manager —
checkHasConversationnow destroys the file stream in afinallyblock, preventing test cleanup hangs on Windows CI (Node 18/20)
Changed
package.json: addedfilesfield,test:run,test:coverage,docsscripts
Full changelog: https://github.com/CosmoNaught/claude-code-cmv/blob/main/CHANGELOG.md
v2.0.2
Ground-truth cache impact analysis
cmv benchmark --allruns the real v2.0 trimmer on all 76 qualifying sessions — actualTrimMetricsinstead of byte-ratio estimates- Mean 20% token reduction, median 12%. Moderate tool use sessions: 39% mean reduction, 10-turn breakeven
- Publication-quality charts with
--theme light/dark,--individualper-panel PNGs,--statsfor JSON + LaTeX tables - Bloat tier segmentation: heavy / moderate / light tool use
- All data exported to
data/for reproducibility - arXiv paper link: arXiv:2602.22402
Full Changelog: v2.0.1...v2.0.2
v2.0.1
Fixed
- Linux terminal detection — kitty, alacritty, wezterm, foot, and ghostty added to the terminal emulator detection list. Previously only gnome-terminal, konsole, xfce4-terminal, and xterm were checked, causing sessions to spawn headlessly on modern terminals.
v2.0.0: TUI Overhaul
Highlights
- TUI overhaul — two-column, four-pane layout. Projects + details on the left, snapshots + sessions on the right.
- Sessions open in new terminal windows —
Enteron a branch or session spawnsclaude --resumein a new OS window. The TUI stays running. - Live session status — hybrid detection (process list + file growth + JSONL type). Active (green ●), busy (amber ●), idle (grey ○).
- Auto-trim hooks — PreCompact and PostToolUse hooks trim sessions in the background. Installed automatically on
npm installafter build. - Orphaned tool_result fix — trimmer now strips tool_result blocks that reference tool_use IDs from skipped pre-compaction content. Fixes API errors on resumed trimmed sessions.
Breaking Changes
cmv branchnow trims by default. Use--no-trimfor raw context.- TUI no longer exits when opening sessions — they open in new terminal windows.
Full Changelog
See CHANGELOG.md for the complete list.
v1.2.0: Test Suite
30 tests covering the critical paths: trimmer, session-reader, and cache-analyzer.
Added
- Trimmer tests (21): file-history removal, queue-op removal, tool_result stubbing (string + array), image stripping, thinking block removal, tool_use input stubbing (Write, Edit, broad fallback), pre-compaction skipping (single + multiple boundaries), usage stripping, threshold options (custom + minimum enforcement), byte metrics, conversation preservation.
- Session reader tests (3): cwd extraction from JSONL, version extraction, missing file handling.
- Cache analyzer tests (6): token estimation, zero-byte edge case, system overhead preservation, removal ratio cap, tool_use savings factor, stub overhead accounting.
Verified
- Both community PRs (#1, #2) tested against a real session: sessions list, benchmark, and trim all work correctly. 86% reduction on current session.
Full changelog: https://github.com/CosmoNaught/claude-code-cmv/blob/main/CHANGELOG.md
v1.1.1: macOS Bug Fixes
Community-contributed fixes for macOS users.
Fixed
- macOS: parse cwd from JSONL session data instead of ambiguous dash-encoded directory names (thanks @KaustubhPatange)
- macOS: resolve full claude CLI path via
command -vto fix spawn ENOENT, graceful fallback when stored cwd no longer exists (thanks @nrolland)
Full changelog: https://github.com/CosmoNaught/claude-code-cmv/blob/main/CHANGELOG.md
v1.1.0: Enhanced Trimmer
6 new trim rules, ~70-80% total context reduction.
Added
- Image block stripping (base64 screenshots)
tool_useinput stubbing (Write/Edit file contents, broad fallback for all tools)- Pre-compaction content skipping (two-pass approach)
queue-operationentry removal- Configurable
--thresholdflag oncmv trimandcmv branch --trim cmv benchmarkcommand now registered and functional
Changed
- Trimmer refactored into
processContentArrayandstubToolUseInputhelpers - Cache analyzer estimation includes tool_use input savings
- Trim metrics output shows new categories when present
Full changelog: https://github.com/CosmoNaught/claude-code-cmv/blob/main/CHANGELOG.md