Volantic Systems
Repo Room

Specimen 04 of 09

claudecm-stack

Claude Code assumes you run one session. I run twenty. This is the harness I wrote to make that workable, and it ships every day on my own desk.

Overview

Two problems hit anyone running Claude Code seriously. First, sessions are identified by GUID (claude --resume a17b8d20-71c1-4eb6-8e7d-438222b649fc) which is unmanageable the moment you have more than two. Second, when a long conversation compacts to free context space, Claude loses file paths, debugging state, and the reasoning behind decisions you made three hours ago. You come back the next morning to a partner with amnesia.

claudecm-stack solves both. The session manager is my own work and gives every session a human name that follows it from terminal tab to phone app. The context stack is a curated three-tool integration (Context-Manager by DxTa, CMV by CosmoNaught, Claude-Mem by Alex Newman) that survives compaction and survives days off. The result is something close to picking up where you left off, instead of re-explaining yourself for fifteen minutes every morning. Twenty sessions on six monitors, every working day, for months. Not a productivity demo.

Technical

The session manager (ClaudeCM) is a PowerShell module on Windows and a bash script on Linux. It assigns a machine - project display name that propagates to the terminal tab, the Claude phone app, and the session list. Sessions are addressed by index (claudecm 3) instead of GUID. Resume from inside a project directory and it auto-detects the right session; stray transcript files in the wrong project get flagged for quarantine before they can be loaded by mistake.

GUID resolution is the part that took the most care. ClaudeCM never uses CMV’s --latest selector (which picks globally and silently grabs the wrong session) and never copies JSONL transcripts between projects. Every session GUID is resolved through three independent layers, the ~/.claude/sessions/<pid>.json manifest, a project-scoped JSONL snapshot diff, and a project-scoped fallback. If any two layers disagree, the script warns loudly. The sessions.txt registry uses file locking and atomic-rename writes so two parallel ClaudeCM operations cannot corrupt each other’s state.

Transcript protection: Claude Code defaults to deleting session transcripts after 30 days. ClaudeCM sets cleanupPeriodDays to 100,000 on first launch. If a transcript has already been lost, picking that session offers a recovery path: the script generates recovery-prompt.md from surviving memory files and subagent state, you edit it if you want, paste it as the first message of a new session.

The context stack is three open-source tools layered: Context-Manager hooks compaction events to checkpoint working state and restore it post-compaction, plus tracks repeated file reads (third read truncates, fourth blocks) and repeated failed commands (third attempt blocks). CMV does virtual-memory-style trimming of mechanical bloat (raw file dumps, tool metadata, base64 image blocks) while keeping every user message and Claude response intact, with snapshot/branch primitives modeled on git. Claude-Mem captures observations across sessions through a background worker that produces AI-compressed semantic summaries, then injects relevant ones at the start of new sessions.

Why You Should Care

I built this because I needed it. Every failure mode the code addresses is one I hit personally, watched cost real time, and decided not to keep paying for. That is the kind of tooling that gets the right primitives right, because the bill for getting them wrong lands in my own day.

The hard parts are the ones you would expect a service engineer to take seriously, applied to a single-user tool: file locking and atomic-rename writes around the session registry, three independent layers of GUID resolution that warn when they disagree, transcript-loss recovery that does not silently overwrite anything. The context stack is a curation decision, not an invention. Three open-source tools, each hooking a different layer (compaction events, context-window size, background observation worker), integrated so they cooperate without conflict and documented so the integration is reproducible. Knowing what not to build is its own skill.

The README closes by comparing the stack to Volt, a research project that beats Claude Code on long-context benchmarks but replaces the Claude Code ecosystem entirely. Plain-spoken about which tradeoff wins for which user. That is the level at which I want to be having technical conversations.

Status

Actively used daily. Original work, not a fork. Open source under the VolanticSystems org.

I wrote the full account up on Medium as My Claude is Better than Your Claude: the failure mode behind each layer, the exact setup, and the measured results, including compaction recovery dropping from twenty or thirty minutes down to seconds and a single session shrinking roughly 85 percent after a trim.

Repo: https://github.com/VolanticSystems/claudecm-stack Writeup: https://medium.com/@med25_4356/my-claude-is-better-than-your-claude-f38a130b97f0

claudecm-stack