Skip to content

Releases: IngressionLabs/contextual-memory-virtualisation

v2.2.1

Choose a tag to compare

@CosmoNaught CosmoNaught released this 22 Oct 22:22

Changed

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 into contextual-memory-virtualisation/ would have duplicated hooks on reinstall and been invisible to cmv 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

Choose a tag to compare

@CosmoNaught CosmoNaught released this 22 Oct 22:00

Fixed

  • Trimmed sessions resume with their full history (#10). Trimming could break the parentUuid chain Claude Code walks on resume, so a branch could resume nearly empty:
    • Session-title summary records (which carry leafUuid and can appear anywhere) were treated as compaction boundaries, discarding everything before them. Only compact_boundary and legacy leaf-less summary records 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-session does.
    • sessions-index.json entries record the real message count and git branch instead of 0 / empty.
    • The multi-branch orientation message is written as a proper chained user row instead of a bare human line.
  • 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/Task prompt fields 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 --version and 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 now cds into the project itself; Windows uses start /D.
  • Closed sessions no longer stay "busy" (#13). Only processes that are claude itself 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_path when opening new windows.

v2.1.1

Choose a tag to compare

@CosmoNaught CosmoNaught released this 16 Mar 00:24

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

Choose a tag to compare

@CosmoNaught CosmoNaught released this 15 Mar 23:45

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 — checkHasConversation now destroys the file stream in a finally block, preventing test cleanup hangs on Windows CI (Node 18/20)

Changed

  • package.json: added files field, test:run, test:coverage, docs scripts

Full changelog: https://github.com/CosmoNaught/claude-code-cmv/blob/main/CHANGELOG.md

v2.0.2

Choose a tag to compare

@CosmoNaught CosmoNaught released this 27 Feb 01:28

Ground-truth cache impact analysis

  • cmv benchmark --all runs the real v2.0 trimmer on all 76 qualifying sessions — actual TrimMetrics instead 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, --individual per-panel PNGs, --stats for 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

Choose a tag to compare

@CosmoNaught CosmoNaught released this 23 Feb 12:19

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

Choose a tag to compare

@CosmoNaught CosmoNaught released this 22 Feb 15:35

Highlights

  • TUI overhaul — two-column, four-pane layout. Projects + details on the left, snapshots + sessions on the right.
  • Sessions open in new terminal windows — Enter on a branch or session spawns claude --resume in 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 install after 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 branch now trims by default. Use --no-trim for 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

Choose a tag to compare

@CosmoNaught CosmoNaught released this 21 Feb 21:05

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

Choose a tag to compare

@CosmoNaught CosmoNaught released this 21 Feb 20:58

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 -v to 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

Choose a tag to compare

@CosmoNaught CosmoNaught released this 21 Feb 20:57

6 new trim rules, ~70-80% total context reduction.

Added

  • Image block stripping (base64 screenshots)
  • tool_use input stubbing (Write/Edit file contents, broad fallback for all tools)
  • Pre-compaction content skipping (two-pass approach)
  • queue-operation entry removal
  • Configurable --threshold flag on cmv trim and cmv branch --trim
  • cmv benchmark command now registered and functional

Changed

  • Trimmer refactored into processContentArray and stubToolUseInput helpers
  • 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