Repository navigation
Releases
v0.9.16 - Session Sets: forks made visible, the sweep cleans what it read
Claude-Session-Backup v0.9.16
Git-backed Claude Code session backup with timeline view, deletion detection, content search, and full session restore -- plus session sets: reconstruct what you were running in any epoch, see what is open right now, and reclaim a whole workspace after a reboot, one command per window.
This release carries three versions of fixes. v0.9.14 and v0.9.15 were committed but never published, so upgrading from 0.9.13 brings all three. It is also a deliberate checkpoint: the next release reorganises csb's on-disk layout, and this is the version to roll back to if that migration misbehaves.
What's new in v0.9.14 -- csb tree sees every declared fork
A forked session's transcript names its parent in an explicit forkedFrom pointer. Claude Code has carried that identical pointer on at least four different event shapes across CLI versions and csb read only one of them. On a real machine, half the declared forks (18 of 35) were invisible, filed as unrelated never-forked sessions; whole families were missing from the csb tree.
Extraction is now keyed on the pointer itself, whatever event carries it. After csb update rebuild-index the recovered families appear (8 -> 19 trees on the machine that found it). Non-forks (in-place compaction, /clear) are unaffected; they carry no pointer at all.
Two things this does not yet do, tracked in #66: forks that declare no pointer (background forks) remain invisible, and the fork date shown for some carriers reflects copied history rather than the fork moment.
What's new in v0.9.15 -- the sweep deletes the file it actually read
After a restart, csb records which sessions were open and then clears their registry files. The clearing step rebuilt a filename from the session id inside each file and deleted that -- so a file whose name and contents disagreed (a hand edit, corruption, files moved by another tool) was recorded correctly and then never cleared, reappearing in every future restart record indefinitely.
Each entry now remembers the file it was read from, and cleanup deletes exactly that -- still refusing to touch anything outside the registry directory. The id inside the file remains the session's identity in the record; only what cleanup targets changed. This closes the last of the known file-identity defects and unblocks the layout reorganisation (#91).
What's new in v0.9.16 -- racing sweeps leave nothing behind
A Claude Code hook and a scheduled backup can sweep a restart concurrently in one process. Both built the same temporary filename, and on Windows a replace onto a file the other sweep held open failed with a sharing violation -- leaving the temp file behind. CI caught it; v0.9.15 fixed one of the two write sites and claimed both, and CI caught the other on the next push. v0.9.16 fixes both, with a test per site so a half-fix cannot pass again.
Still manual, still unrun: the full forced-reboot verification (two sessions open, restart,
csb set lastbefore launching anything). Every automatable check, red-green audits, and a 12-of-12 mutation kill on the sweep stand in for it.
Restart recovery: epochs you can address (v0.8.0, completed in v0.9.3)
csb set show last # the roster: who was active before the restart
csb set show last~2 # ...two restarts ago
csb set list # named sets + the addressable epoch table
csb resume last:3 # reclaim member 3, in THIS terminalWhat is open RIGHT NOW: the Live Session Registry (v0.8.4, hardened through v0.9.16)
csb set show current # true open order, with evidence tiers
csb set show boot # everything active since startup
csb set forget current:1 # retract a stale entry csb cannot disproveEvery row wears only what can be proven: [running], [no exit observed], [exited], [open at shutdown], and now [fork] for every declared fork.
Installation
pip install -U claude-session-backup
csb setup # guided: git store, first backup, checklist
claude plugin marketplace add "DazzleML/Claude-Session-Backup"
claude plugin install claude-session-backup@dazzle-claude-session-backup
csb setup schedule # the idle-machine layerUpgrading: pip install -U claude-session-backup && csb setup update, then csb update rebuild-index once to recover the fork families.
Version history (the sets arc)
| Version | Key change |
|---|---|
| v0.9.16 | Current -- racing sweeps leave no temp files; checkpoint before the layout reorganisation |
| v0.9.15 | The sweep deletes the file it read; last file-identity defect closed |
| v0.9.14 | csb tree reads the fork pointer from any event carrier -- 8 -> 19 families |
| v0.9.13 | One record per restart, ordered and named by its own contents |
| v0.9.12 | A resumed session is no longer deleted, and verifies correctly |
| v0.9.11 | Plugin drift reads the version that actually loads |
| v0.9.10 | csb set forget; registry ids treated as untrusted input |
| v0.9.9 | Elevated sessions verify correctly; liveness explains its negatives |
| v0.9.7 | One addressing grammar (csb resume last:3); names always win |
| v0.9.0 | Scheduled backup for idle machines |
| v0.8.4 | The Live Session Registry: csb set show current |
| v0.8.0 | Restart recovery: csb set show last |
Per-version detail, each header linking to its own diff: CHANGELOG.md.
Platform support
| Platform | Status |
|---|---|
| Windows 10/11 | Tested (daily use; the temp-file race was caught and fixed on the Windows CI runner) |
| Linux (incl. WSL2) | Tested (journalctl/wtmp fences; cron) |
| macOS | Expected to work (launchd + BSD last parsing; hardware verification tracked in #74) |
| BSD | Expected to work |
Requirements
- Python 3.10+
- git (the backup store IS a git repository)
- Claude Code (for the plugin/hooks; the CLI works standalone)
- 2027 automated tests
v0.9.13 - Session Sets: one record per restart, and it never shrinks
Claude-Session-Backup v0.9.13
Git-backed Claude Code session backup with timeline view, deletion detection, content search, and full session restore -- plus session sets: reconstruct what you were running in any epoch, see what is open right now, and reclaim a whole workspace after a reboot, one command per window.
What's new in v0.9.13 -- one record per restart, and it never shrinks
After a restart, csb writes one record naming the sessions that were open when the machine went down -- that is what csb set last --open reads back. csb names that record after the boot time, but on Windows and Linux it calculates that time (now - uptime), and the calculation drifts by seconds over days.
So csb concluded it was looking at a restart it had never seen, wrote a second record for the same boot -- and because each later pass has fewer leftover session files to read, the newer record named fewer sessions. On a real machine, eight recorded sessions degraded to one, one day after v0.9.12 reached PyPI.
The fix treats the record as sealed except to add. The sweep now merges across every record describing a boundary, unions their session lists, keeps the oldest record's identity, collapses the duplicates -- and skips the write entirely when the record is already complete, so repeated backups stop rewriting a file that rides every backup commit. A record can gain names; it can never lose them.
Hardened before it shipped: three ways an already-damaged record could still lose evidence
An adversarial test pass against the finished fix found three gaps -- none reachable from csb's own writes, all reachable from a record damaged outside csb (a hand edit, an older build, a store synced from another machine). All three are fixed in this release:
- Retention now judges a record's age by its contents, not its filename. The pruning that keeps the newest five records sorted them by filename -- and a record whose name disagreed with the boot time inside it could be deleted by the same sweep that had just added names to it. Retention now orders by the boot time each record declares, never deletes the record the current sweep just extended, and the sweep heals the disagreement by renaming the record to match its own contents.
- A structurally damaged record can no longer silently stop restart recording. Malformed content used to raise inside the sweep, where the hook's safety net swallowed it -- the sweep aborted, reported success, and kept aborting on every later run. Every reader now shares one tolerant policy: recover the readable entries, treat the rest as absent, and rewrite the record well-formed on the next pass.
- Entries without a session id are all kept. Two distinct entries that both lacked one used to collapse into a single entry during merging. They are now told apart by their content -- counted, never dropped.
The merge that repairs already-duplicated records is a recovery path with a planned retirement once the fleet is past v0.9.12; the tolerant reading and content-based retention are permanent. The hook safety net that converts internal errors into silence is now tracked as its own issue (#96).
Carried forward from v0.9.12: that release stopped new damage to live-session registrations but does not resurrect ones already deleted -- a session stays missing from
csb set currentuntil it next starts. Tracked in #93. And the full forced-reboot verification (which needs real restarts and days of real drift) remains a manual step not yet run; every automatable check, a red-green audit, and a 12-mutant mutation sweep at 12/12 killed stand in for it meanwhile.
Restart recovery: epochs you can address (v0.8.0, completed in v0.9.3)
csb set show last # the roster: who was active before the restart
csb set show last~2 # ...two restarts ago
csb set list # named sets + the addressable epoch table
csb resume last:3 # reclaim member 3, in THIS terminalThis release is what makes the last~N history trustworthy: one boundary, one record, named consistently.
What is open RIGHT NOW: the Live Session Registry (v0.8.4, hardened through v0.9.13)
csb set show current # true open order, with evidence tiers
csb set show boot # everything active since startup
csb set forget current:1 # retract a stale entry csb cannot disproveEvery row wears only what can be proven: [running], [no exit observed], [exited], and [open at shutdown].
Installation
pip install -U claude-session-backup
csb setup # guided: git store, first backup, checklist
claude plugin marketplace add "DazzleML/Claude-Session-Backup"
claude plugin install claude-session-backup@dazzle-claude-session-backup
csb setup schedule # the idle-machine layerUpgrading: pip install -U claude-session-backup && csb setup update.
Version history (the sets arc)
| Version | Key change |
|---|---|
| v0.9.13 | Current -- one record per restart, ordered and named by its own contents |
| v0.9.12 | A resumed session is no longer deleted, and verifies correctly |
| v0.9.11 | Plugin drift reads the version that actually loads |
| v0.9.10 | csb set forget; registry ids treated as untrusted input |
| v0.9.9 | Elevated sessions verify correctly; liveness explains its negatives |
| v0.9.8 | Named-set rosters show which members are open |
| v0.9.7 | One addressing grammar (csb resume last:3); names always win |
| v0.9.6 | Activity-timeline epoch membership |
| v0.9.5 | csb setup update + plugin drift detection |
| v0.9.0 | Scheduled backup for idle machines |
| v0.8.4 | The Live Session Registry: csb set show current |
| v0.8.0 | Restart recovery: csb set show last |
Per-version detail, each header linking to its own diff: CHANGELOG.md.
Platform support
| Platform | Status |
|---|---|
| Windows 10/11 | Tested (daily use; the drift that caused this bug was measured here) |
| Linux (incl. WSL2) | Tested (same derived-boot-time mechanism; journalctl/wtmp fences; cron) |
| macOS | Expected to work (boot time is recorded there, so the drift cannot occur; hardware verification tracked in #74) |
| BSD | Expected to work |
Requirements
- Python 3.10+
- git (the backup store IS a git repository)
- Claude Code (for the plugin/hooks; the CLI works standalone)
- 2019 automated tests
v0.9.12 - Session Sets: a resumed session is no longer deleted
Claude-Session-Backup v0.9.12
Git-backed Claude Code session backup with timeline view, deletion detection, content search, and full session restore -- plus session sets: reconstruct what you were running in any epoch, see what is open right now, and reclaim a whole workspace after a reboot, one command per window.
This release carries two versions of fixes. v0.9.11 was committed but never published, so upgrading from 0.9.10 brings both.
What's new in v0.9.12 -- a resumed session is no longer removed from the session set
csb records every open session as a file on disk. A clean close erases the record, so whatever survives a restart was open when the machine went down -- that is how csb set last knows who to offer back. After a restart, csb photographs those records and clears the board.
Each record carries two timestamps: when the session first opened, and when csb last confirmed its host process was alive. A session you resume after a restart keeps its original open time on purpose (so compaction cannot reset it) but gets a brand-new host process. It is therefore old by one measure and new by the other, and its own record says both.
Three separate places read the first and answered a question only the second can answer:
- The clearing step deleted it. A running session's registration was erased one second after it registered, and it vanished from
csb set currentuntil that session next started. - Verification then refused to confirm it. The guard against recycled process IDs compared the host's age against the session's open time, but a resumed session's host is legitimately younger than the session. Reclaimed sessions read
[no exit observed]indefinitely, which is indistinguishable from crash evidence. - The display showed a blank where it meant "unknown." With no restart record written yet, every row simply lacked its open-at-shutdown mark and nothing said why, so "nobody was open" and "csb has not looked yet" looked identical.
All three are fixed. Recording and clearing are now separate decisions, because a resumed session is honestly both "open at the shutdown" and "open right now"; neither truth evicts the other.
Two more gaps closed alongside them:
csb backupnow clears the restart boundary too, so the scheduled backup covers a machine that reboots and is then left alone. Previously only launching Claude Code did this, which meant an idle machine never persisted that restart's record at all -- and that evidence cannot be reconstructed afterward.csb set lastis correct immediately after a restart, before you launch anything. The evidence was already on disk; only the saved copy was missing, so the roster now reads through to it. Display commands still never write.
And a restart where nothing was open is now recorded as such rather than leaving nothing behind -- proven-empty is evidence, and it should not read as ignorance.
One caveat worth knowing. This stops new damage; it does not repair old. If a session's registration was already deleted by the old behavior, it stays missing from
csb set currentuntil that session fires a fresh start (a/compactalone will not do it). Detecting a running session that has no record is tracked in #93.
What's new in v0.9.11 -- drift detection reads the version that actually loads
A machine can show a satisfied setup checklist while running a full release behind. Plugin-drift detection read the newest directory in Claude Code's plugin cache -- but that cache keeps every version ever downloaded and prunes none, so its highest number answers "what has been fetched", not "what runs". A newer download masked an older active plugin.
Claude Code records the loaded version in its plugin registry, and csb now reads that first; the cache scan remains only as a fallback.
Drift also has two directions, and they need different remedies:
plugin behind CLI -> csb setup update
CLI behind plugin -> pip install -U claude-session-backup
unrankable pair -> report both, name no remedy
That last case is the honest floor: when either side cannot be ordered, "these differ" is provable and "yours is older" is not.
csb status also stopped printing (current). Agreement between plugin and CLI is all csb has ever checked -- it has never looked upstream -- so it now says (matches CLI), which is the claim it can actually support. Checking currency against PyPI is tracked in #94.
Restart recovery: epochs you can address (v0.8.0, completed in v0.9.3)
A forced restart preserves every session and used to destroy the one thing csb could not recover -- which sessions were active together when the machine went down.
csb set show last # the roster: who was active before the restart
csb set show last~2 # ...two restarts ago
csb set show 2026-7-15 # ...by date (ambiguity listed, never guessed)
csb set list # named sets + the addressable epoch table
csb resume last:3 # reclaim member 3, in THIS terminalBoot/shutdown fences read from the Windows event log or the journalctl -> wtmp chain on POSIX, with an honest unknown cause where the sources cannot testify. Epochs collapse update double-cycles into one restart, and csb set new NAME --from last~2 freezes any epoch into a named set.
What is open RIGHT NOW: the Live Session Registry (v0.8.4, hardened through v0.9.12)
No activity heuristic can answer "is this session open" -- a provably-live session sat ~64 hours idle in testing. csb's hooks observe instead: every session records itself on start and erases the record on a clean close, so a leftover entry is evidence, of a running session or of a crash.
csb set show current # true open order, with evidence tiers
csb set show boot # everything active since startup
csb set forget current:1 # retract a stale entry csb cannot disproveEvery row wears only what can be proven: [running], [no exit observed], [exited], and [open at shutdown]. Resuming an already-open session warns before inviting a second client onto one transcript; -- --fork-session branches instead.
Epoch membership from real activity timelines (v0.9.6)
The index records every sitting (contiguous activity, split at 10-minute-plus gaps), and an epoch's roster holds every session whose timeline actually touched it. Reactivating an old session no longer erases it from the epochs it lived in.
One addressing grammar (v0.9.7)
The same view-or-set:N tokens work wherever a session is named, and an exact session name always wins:
csb resume last:3 # member 3 of the last epoch
csb resume MYSET:2 # member 2 of a named set
csb resume --set MYSET # the reclaim menu: who is NOT open yetScheduled backup: the idle-machine gap (v0.9.0)
Hooks fire when you use Claude Code; Claude Code's own cleanup timer runs whether you do or not. csb setup schedule registers a recurring backup with Task Scheduler, cron, or launchd -- and as of this release it clears the restart boundary too.
Installation
pip install -U claude-session-backup
csb setup # guided: git store, first backup, checklist
claude plugin marketplace add "DazzleML/Claude-Session-Backup"
claude plugin install claude-session-backup@dazzle-claude-session-backup
csb setup schedule # the idle-machine layerUpgrading: pip install -U claude-session-backup && csb setup update.
Version history (the sets arc)
| Version | Key change |
|---|---|
| v0.9.12 | Current -- a resumed session is no longer deleted, and verifies correctly |
| v0.9.11 | Plugin drift reads the version that actually loads; (current) becomes (matches CLI) |
| v0.9.10 | csb set forget; registry ids treated as untrusted input |
| v0.9.9 | Elevated sessions verify correctly; liveness explains its negatives |
| v0.9.8 | Named-set rosters show which members are open |
| v0.9.7 | One addressing grammar (csb resume last:3); names always win |
| v0.9.6 | Activity-timeline epoch membership |
| v0.9.5 | csb setup update + plugin drift detection |
| v0.9.4 | Grab roster rows by number; the liveness ancestry walk |
| v0.9.3 | The epic completes: POSIX fences, epoch history, promotion provenance |
| v0.9.2 | One pid, one owner: capture-beats-argv arbitration |
| v0.9.1 | Liveness that survives forks and session switching |
| v0.9.0 | Scheduled backup for idle machines |
| v0.8.5 | The boot view + the full tier ladder |
| v0.8.4 | The Live Session Registry: csb set show current |
| v0.8.1 | Named sets |
| v0.8.0 | Restart recovery: csb set show last |
Per-version detail, each header linking to its own diff: CHANGELOG.md.
Platform support
| Platform | Status |
|---|---|
| Windows 10/11 | Tested (daily use; event-log fences, Task Scheduler, elevated-session verification) |
| Linux (incl. WSL2) | Tested (journalctl/wtmp fence chain frozen against real captures; cron) |
| macOS | Expected to work (launchd + BSD last parsing; hardware verification tracked in #74) |
| BSD | Expected to work (no-year last rollover handling in place) |
Requirements
- Python 3.10+
- git (the backup store IS a git repository)
- Claude Co...
v0.9.10 - Session Sets: retract a stale live entry
Claude-Session-Backup v0.9.10
Git-backed Claude Code session backup with timeline view, deletion detection, content search, and full session restore -- plus session sets: reconstruct what you were running in any epoch, see what is open right now, and reclaim a whole workspace after a reboot, one command per window.
What's new in v0.9.10
csb set forget -- retract a stale live-registry entry. A session closed with Ctrl+C leaves its entry behind: Claude Code cancels the SessionEnd hook before it can erase it. An entry written by an older plugin carries no host pid to check. Both then read [no exit observed] indefinitely -- indistinguishable from genuine crash evidence, which is the one ambiguity the evidence tiers exist to avoid. You were there; csb was not:
csb set forget current:1 # the row you are looking at
csb set forget <session> # by name or UUID
csb set forget current:1 --force # even if it verifies as runningIt refuses a session csb can verify is running -- claiming that one is closed would be wrong, not merely overridden. --force exists for the other reason to want an entry gone: privacy about a recorded path. It is deliberately a different verb from csb set rm, which edits membership you declared; this retracts evidence csb recorded. Either way the session itself is untouched -- still listed, still searchable, still resumable.
Registry entries are now treated as untrusted input. A session id arrives in an entry's JSON body, becomes part of a filename, and set forget deletes that path -- so ids are validated (no separators, no .., no drive punctuation), a body-claimed id is honoured only when safe, and the deletion re-checks containment against the registry directory. Hardening, not a patched vulnerability: no exploit path exists today (stores are local, csb never pushes, and planting an entry needs write access you would already have). It matters for a misbehaving neighbour writing into your Claude data directory, for corruption, for restore replay, and for any future where a store is shared.
Restart recovery: epochs you can address (v0.8.0, completed in v0.9.3)
A forced restart preserves every session and used to destroy the one thing csb could not recover -- which sessions were active together when the machine went down.
csb set show last # the roster: who was active before the restart
csb set show last~2 # ...two restarts ago
csb set show 2026-7-15 # ...by date (ambiguity listed, never guessed)
csb set list # named sets + the addressable epoch table
csb resume last:3 # reclaim member 3, in THIS terminalv0.8.0 shipped last and the Windows event-log fences; v0.9.3 made it platform-agnostic and deep -- the journalctl -> wtmp chain on POSIX (parsers frozen against real captured output; an honest unknown cause where sources cannot testify), last~N and date addressing, epochs that collapse update double-cycles into one restart, and csb set new NAME --from last~2 freezing any epoch into a named set with provenance that survives its address drifting deeper into history. Named sets themselves arrived in v0.8.1.
What is open RIGHT NOW: the Live Session Registry (v0.8.4, hardened through v0.9.9)
No activity heuristic can answer "is this session open" -- a provably-live session sat ~64 hours idle in testing. csb's hooks observe instead: every session records itself on start and erases the record on a clean close, so a leftover entry is evidence, of a running session or of a crash.
csb set show current # true open order, with evidence tiers
csb set show boot # everything active since startupEvery row wears only what can be proven: [running], [no exit observed], [exited], and [open at shutdown] from the boundary snapshot frozen at the first hook after a reboot. current and the tier ladder landed in v0.8.4, boot in v0.8.5; the pid verification behind [running] was built over v0.9.1 (survives forks and session switching), v0.9.2 (capture beats argv when two claims collide), v0.9.4 (the ancestry walk through the shell Claude Code interposes), and v0.9.9 (elevated sessions, whose command line Windows refuses to show). Resuming an already-open session warns before inviting a second client onto one transcript; -- --fork-session branches instead. And when a row is wrong in a way csb cannot detect, csb set forget is now the answer.
Epoch membership from real activity timelines (v0.9.6)
The index records every sitting (contiguous activity, split at 10-minute-plus gaps), and an epoch's roster holds every session whose timeline actually touched it. Reactivating an old session no longer erases it from the epochs it lived in; per-row gap and message counts are in-window values, and they partition -- a session's counts across its epochs sum to its lifetime total. Backfill is automatic: the first backup after upgrading records timelines for every live session.
One addressing grammar (v0.9.7)
The same view-or-set:N tokens the membership verbs take work wherever a session is named, and an exact session name always wins, so nothing you named can be shadowed:
csb resume last:3 # member 3 of the last epoch
csb resume MYSET:2 # member 2 of a named set
csb resume --set last:3 # the explicit lane -- always the member
csb resume --set MYSET # the reclaim menu: who is NOT open yetRoster numbers became addressable in v0.8.2 and v0.9.4; v0.9.7 unified them into one grammar that works wherever a session is named; v0.9.8 taught named-set rosters to show which members are already open, which is what makes the reclaim menu above worth reading.
Scheduled backup: the idle-machine gap (v0.9.0)
Hooks fire when you use Claude Code; Claude Code's own cleanup timer runs whether you do or not. csb setup schedule registers a recurring backup with the OS scheduler -- Task Scheduler, cron, or launchd -- with a guided interval, an immediate prime run so a broken entry fails on your screen, and run-log evidence health checks that report INSTALLED BUT NOT RUNNING when an entry exists but nothing fires.
The plugin keeps itself honest (v0.9.5)
The plugin delivers the hook scripts, so a stale install silently withholds hook-side features. csb status shows a drift line naming the fix, the setup checklist flags it, and csb setup update runs the unmemorable claude plugin update name@marketplace for you -- no session restarts needed.
Installation
pip install claude-session-backup
csb setup # guided: git store, first backup, checklist
claude plugin marketplace add "DazzleML/Claude-Session-Backup"
claude plugin install claude-session-backup@dazzle-claude-session-backup
csb setup schedule # the idle-machine layerUpgrading: pip install -U claude-session-backup && csb setup update.
Version history (the sets arc)
| Version | Key change |
|---|---|
| v0.9.10 | Current -- csb set forget; registry ids treated as untrusted input |
| v0.9.9 | Elevated sessions verify correctly; liveness explains its negatives |
| v0.9.8 | Named-set rosters show which members are open |
| v0.9.7 | One addressing grammar (csb resume last:3); names always win |
| v0.9.6 | Activity-timeline epoch membership; reclaiming stops rewriting the past |
| v0.9.5 | csb setup update + plugin drift detection |
| v0.9.4 | Grab roster rows by number; the liveness ancestry walk |
| v0.9.3 | The epic completes: POSIX fences, epoch history, promotion provenance |
| v0.9.2 | One pid, one owner: capture-beats-argv arbitration |
| v0.9.1 | Liveness that survives forks and session switching |
| v0.9.0 | Scheduled backup for idle machines |
| v0.8.5 | The boot view + the full tier ladder |
| v0.8.4 | The Live Session Registry: csb set show current |
| v0.8.3 | Checklist-sweep fixes: canonical indices under --window |
| v0.8.2 | Index addressing: reclaim by roster number |
| v0.8.1 | Named sets |
| v0.8.0 | Restart recovery: csb set show last |
Per-version detail, each header linking to its own diff: CHANGELOG.md.
Platform support
| Platform | Status |
|---|---|
| Windows 10/11 | Tested (daily use; event-log fences, Task Scheduler, elevated-session verification) |
| Linux (incl. WSL2) | Tested (journalctl/wtmp fence chain frozen against real captures; cron) |
| macOS | Expected to work (launchd + BSD last parsing; hardware verification tracked in #74) |
| BSD | Expected to work (no-year last rollover handling in place) |
Requirements
- Python 3.10+
- git (the backup store IS a git repository)
- Claude Code (for the plugin/hooks; the CLI works standalone)
- 1912 automated tests; each feature ships with a hand-runnable checklist under
tests/checklists/
v0.9.9 - Session Sets: restart recovery, live tracking, and honest liveness
Claude-Session-Backup v0.9.9
Git-backed Claude Code session backup with timeline view, deletion detection, content search, and full session restore -- plus session sets: reconstruct what you were running in any epoch, see what is open right now, and reclaim a whole workspace after a reboot, one command per window.
This page is self-contained: the patch delta is first, then the full session-sets arc it builds on (v0.8.0 -> v0.9.9), so you can read the whole story here without opening older releases.
What's new in v0.9.9
Elevated sessions verify correctly (#89). A session started from an administrator terminal showed [no exit observed] in csb set current while plainly running. A process at a higher integrity level hides its command line from a non-elevated query -- the executable name still reads -- and the process scan admitted sessions to its pid map only when the command line identified them. So pid verification silently inherited the argv dependency that capturing the host pid exists to escape. The scan now accepts the executable name when the command line is unreadable, for pid verification only; the argv-derived maps are unchanged, Claude Desktop stays excluded, and the pid-reuse guard still applies. It affected only sessions launched from an admin terminal, which is why it looked intermittent and seemed to heal on its own.
Liveness now explains its negatives. --json rosters carry recorded_pid and pid_at (what the registry entry stored) beside pid (what verification concluded) -- previously a null pid meant either "no host was ever captured" or "captured but unverifiable", opposite problems shown identically. The backup hook also records how it captured a pid (via=walk, via=env-fallback, via=none), and its previously-silent no-pid path now says so.
From v0.9.8: csb set show <name> now shows which members of a named set are open -- the same evidence tiers the live views use, an open count in the header, and a branching hint on running rows so a plain resume never invites a second client onto one live transcript.
The session sets arc (v0.8.0 -> v0.9.9)
Restart recovery: epochs you can address
A forced restart preserves every session and used to destroy the one thing csb could not recover -- which sessions were active together when the machine went down.
csb set show last # the roster: who was active before the restart
csb set show last~2 # ...two restarts ago
csb set show 2026-7-15 # ...by date (ambiguity listed, never guessed)
csb set list # named sets + the addressable epoch table
csb resume last:3 # reclaim member 3, in THIS terminalBoot/shutdown fences read from the Windows event log or the journalctl -> wtmp chain on POSIX (parsers frozen against real captured output; an honest unknown cause where sources cannot testify). Epochs collapse update double-cycles into one restart, relative addresses walk past empty epochs with full disclosure, and csb set new NAME --from last~2 freezes any epoch into a named set with provenance that survives its address drifting deeper into history.
What is open RIGHT NOW: the Live Session Registry
No activity heuristic can answer "is this session open" -- a provably-live session sat ~64 hours idle in testing. csb's hooks observe instead: every session records itself on start and erases the record on a clean close, so a leftover entry is evidence, of a running session or of a crash.
csb set show current # true open order, with evidence tiers
csb set show boot # everything active since startupEvery row wears only what can be proven: [running] (a live process, verified by the exact host pid the hook captured -- surviving forks, session switching, the shell Claude Code interposes, and as of this release, elevation), [no exit observed], [exited], and [open at shutdown] from the boundary snapshot frozen at the first hook after a reboot. Resuming an already-open session warns before inviting a second client onto one transcript; -- --fork-session branches instead.
Epoch membership from real activity timelines
The index records every sitting (contiguous activity, split at 10-minute-plus gaps), and an epoch's roster holds every session whose timeline actually touched it. Reactivating an old session no longer erases it from the epochs it lived in; per-row gap and message counts are in-window values, and they partition -- a session's counts across its epochs sum to its lifetime total. Backfill is automatic: the first backup after upgrading records timelines for every live session.
One addressing grammar
The same view-or-set:N tokens the membership verbs take now work wherever a session is named, and an exact session name always wins, so nothing you named can be shadowed:
csb resume last:3 # member 3 of the last epoch
csb resume MYSET:2 # member 2 of a named set
csb resume --set last:3 # the explicit lane -- always the member
csb resume --set MYSET # the reclaim menu: who is NOT open yetScheduled backup: the idle-machine gap
Hooks fire when you use Claude Code; Claude Code's own cleanup timer runs whether you do or not. csb setup schedule registers a recurring backup with the OS scheduler -- Task Scheduler, cron, or launchd -- with a guided interval, an immediate prime run so a broken entry fails on your screen, and run-log evidence health checks that report INSTALLED BUT NOT RUNNING when an entry exists but nothing fires.
The plugin keeps itself honest
The plugin delivers the hook scripts, so a stale install silently withholds hook-side features. csb status shows a drift line naming the fix, the setup checklist flags it, and csb setup update runs the unmemorable claude plugin update name@marketplace for you -- no session restarts needed.
Installation
pip install claude-session-backup
csb setup # guided: git store, first backup, checklist
claude plugin marketplace add "DazzleML/Claude-Session-Backup"
claude plugin install claude-session-backup@dazzle-claude-session-backup
csb setup schedule # the idle-machine layerUpgrading: pip install -U claude-session-backup && csb setup update. The csb setup update step matters for this release -- the hook-side logging ships with the plugin, not the pip package.
Version history (the sets arc)
| Version | Key change |
|---|---|
| v0.9.9 | Current -- elevated sessions verify; liveness explains its negatives |
| v0.9.8 | Named-set rosters show which members are open |
| v0.9.7 | One addressing grammar (csb resume last:3); names always win |
| v0.9.6 | Activity-timeline epoch membership; reclaiming stops rewriting the past |
| v0.9.5 | csb setup update + plugin drift detection |
| v0.9.4 | Grab roster rows by number; the liveness ancestry walk |
| v0.9.3 | The epic completes: POSIX fences, epoch history, promotion provenance |
| v0.9.2 | One pid, one owner: capture-beats-argv arbitration |
| v0.9.1 | Liveness that survives forks and session switching |
| v0.9.0 | Scheduled backup for idle machines |
| v0.8.5 | The boot view + the full tier ladder |
| v0.8.4 | The Live Session Registry: csb set show current |
| v0.8.3 | Checklist-sweep fixes: canonical indices under --window |
| v0.8.2 | Index addressing: reclaim by roster number |
| v0.8.1 | Named sets |
| v0.8.0 | Restart recovery: csb set show last |
(Earlier history: v0.7.3 and back. Per-version detail lives in CHANGELOG.md.)
Platform support
| Platform | Status |
|---|---|
| Windows 10/11 | Tested (daily use; event-log fences, Task Scheduler, the elevation fix above) |
| Linux (incl. WSL2) | Tested (journalctl/wtmp fence chain frozen against real captures; cron) |
| macOS | Expected to work (launchd + BSD last parsing; hardware verification tracked in #74) |
| BSD | Expected to work (no-year last rollover handling in place) |
Note for non-Windows users: whether the elevation blackout fixed in v0.9.9 has a POSIX equivalent is an open question, tracked in #88 with the experiment that would settle it -- stated as unverified rather than assumed either way.
Requirements
- Python 3.10+
- git (the backup store IS a git repository)
- Claude Code (for the plugin/hooks; the CLI works standalone)
- 1893 automated tests; each feature ships with a hand-runnable checklist under
tests/checklists/
v0.9.7 - Session Sets: Restart Recovery, Live Tracking & One Addressing Grammar
Claude-Session-Backup v0.9.7
Git-backed Claude Code session backup with timeline view, deletion detection, content search, and full session restore -- and now session sets: reconstruct what you were running in any epoch, see what is open right now, and reclaim a whole workspace after a reboot, one command per window.
This release rolls up the entire session-sets arc (v0.8.0 -> v0.9.7, fourteen releases): the epic itself (#60), scheduled backup (#69), the Live Session Registry and liveness verification (#64, #72, #78), epoch history on every platform (#68), activity-timeline membership (#80), and one unified addressing grammar.
What's New in the 0.8.x -> 0.9.7 Arc
Restart recovery: epochs you can address (#60, #61, #68)
A forced restart preserves every session and used to destroy the one thing csb could not recover -- which sessions were active together when the machine went down. Now:
csb set show last # the roster: who was active before the restart
csb set show last~2 # ...two restarts ago
csb set show 2026-7-15 # ...by date (ambiguity listed, never guessed)
csb set list # named sets + the addressable epoch table
csb resume last:3 # reclaim member 3, in THIS terminalBoot/shutdown fences read from the Windows event log or the journalctl -> wtmp chain on POSIX (parsers frozen against real captured output; an honest unknown cause where sources cannot testify). Epochs collapse update double-cycles into one restart, relative addresses walk past empty epochs with full disclosure, and csb set new NAME --from last~2 freezes any epoch into a named set with provenance that survives its address drifting deeper into history.
What is open RIGHT NOW: the Live Session Registry (#64, #67, #72, #78)
No activity heuristic can answer "is this session open" (a provably-live session sat ~64 hours idle in testing). csb's hooks now observe: every session records itself on start and erases the record on clean close -- so a leftover entry is evidence, of a running session or of a crash.
csb set show current # true open order, with evidence tiers
csb set show boot # everything active since startupEvery row wears only what can be proven: [running] (a live process, verified by the exact host pid the hook captured -- surviving forks, session switching, and the shell Claude Code interposes), [no exit observed], [exited], [open at shutdown] (from the boundary snapshot frozen at the first hook after a reboot). Resuming an already-open session warns before inviting a second client onto one transcript; -- --fork-session branches instead.
Epoch membership from real activity timelines (#80)
The index now records every sitting (contiguous activity, split at 10-minute-plus gaps), and an epoch's roster holds every session whose timeline actually touched it. Reactivating an old session no longer erases it from the epochs it lived in; per-row gap and message counts are the in-window values, and they partition: a session's counts across its epochs sum to its lifetime total. Backfill is automatic -- the first backup after upgrading records timelines for every live session (schema migration v9 applies itself).
One addressing grammar: csb resume last:3 (v0.9.7)
The same view-or-set:N tokens the membership verbs take (csb set add NAME boot:1 boot:8) now work everywhere a session is named -- and an exact session name always wins, so nothing you named can ever be shadowed. --set is the explicit lane for the pathological case (a session literally named last:3) and the reclaim menu:
csb resume last:3 # member 3 of the last epoch
csb resume MYSET:2 # member 2 of a named set
csb resume --set last:3 # always the member, even under a name collision
csb resume --set MYSET # the reclaim menu: who is NOT open yetBreaking: the old --set 3 / --set NAME 3 spellings are retired (a bare number silently meant last when a reader could as easily assume boot); they error with the exact token to type instead.
Scheduled backup: the idle-machine gap (#69)
Hooks fire when you use Claude Code; Claude Code's own cleanup timer runs whether you do or not. csb setup schedule registers a recurring backup with the OS scheduler -- Task Scheduler, cron, or launchd -- with a guided interval, an immediate prime run so a broken entry fails on your screen, and run-log evidence health checks (--status says INSTALLED BUT NOT RUNNING when an entry exists but nothing fires).
The plugin keeps itself honest (#75)
The plugin delivers the hook scripts, so a stale install silently withholds hook-side features. csb status now shows a drift line naming the fix, the setup checklist flags it, and csb setup update runs the unmemorable claude plugin update name@marketplace incantation for you -- no session restarts needed.
Installation
pip install claude-session-backup
csb setup # guided: git store, first backup, checklist
claude plugin marketplace add "DazzleML/Claude-Session-Backup"
claude plugin install claude-session-backup@dazzle-claude-session-backup
csb setup schedule # the idle-machine layerUpgrading: pip install -U claude-session-backup && csb setup update -- the v9 schema migration applies on first use; your first backup afterwards backfills activity timelines for every live session.
Version History (the sets arc)
| Version | Key Change |
|---|---|
| v0.9.7 | Current -- one addressing grammar (csb resume last:3), names always win |
| v0.9.6 | Activity-timeline epoch membership (#80); reclaiming stops rewriting the past |
| v0.9.5 | csb setup update + plugin drift detection (#75) |
| v0.9.4 | Grab roster rows by number (#76); the liveness ancestry walk (#78) |
| v0.9.3 | The epic completes: POSIX fences, epoch history last~N/dates, promotion provenance (#68) |
| v0.9.2 | One pid, one owner: capture-beats-argv arbitration (#72) |
| v0.9.1 | Liveness that survives forks and session switching (#72) |
| v0.9.0 | Scheduled backup for idle machines (#69) |
| v0.8.5 | The boot view + the full tier ladder (#68 R1) |
| v0.8.4 | The Live Session Registry: csb set show current (#64, #67) |
| v0.8.3 | Checklist-sweep fixes: canonical indices under --window |
| v0.8.2 | Index addressing: reclaim by roster number (#63) |
| v0.8.1 | Named sets (#62) |
| v0.8.0 | Restart recovery: csb set show last (#61) |
(Earlier history: v0.7.3 and back.)
Platform Support
| Platform | Status |
|---|---|
| Windows 10/11 | Tested (daily use; event-log fences, Task Scheduler) |
| Linux (incl. WSL2) | Tested (journalctl/wtmp fence chain frozen against real captures; cron) |
| macOS | Expected to work (launchd + BSD last parsing; hardware verification tracked in #74) |
| BSD | Expected to work (no-year last rollover handling in place) |
Requirements
- Python 3.10+
- git (the backup store IS a git repository)
- Claude Code (for the plugin/hooks; the CLI works standalone)
- 1880 automated tests; each feature ships with a hand-runnable checklist under
tests/checklists/
v0.7.3 - Path-Exposure Rungs (csb show --paths) & the Folder-Harvest Arc
Claude-Session-Backup v0.7.3
Git-backed Claude Code session backup with timeline view, folder analysis, deletion detection, session restore, and guided onboarding.
The folder-analysis release, in three acts: csb now sees where work actually happened (v0.7.1), tells the truth about it under adversarial testing (v0.7.2), and lets you choose how much of it you trust (v0.7.3).
Installation
For this update you'll need to do:
pip install --upgrade claude-session-backup
csb update rebuild-indexRequires dazzle-filekit>=0.4.2 and dazzle-lib>=0.8.2 (both on PyPI; installed automatically).
The headline: csb scan finds cross-repo work
Claude Code stamps every transcript event with the directory the session was launched from -- it never follows your work into another repository. So a session that spent its whole life editing C:\code\other-repo recorded exactly one folder, and csb scan other-repo found nothing. Measured before the fix: wrong for 14 of 14 real sessions.
The work locations were in the transcript all along -- in the tool calls, not the cwd field. csb now harvests them: every folder a session touched is findable by csb scan, and usage_count measures work units (one per tool call, credited to the folder the call actually operated in) instead of transcript events, which had let the launch directory outrank the real workplace by construction (1201 event-ticks vs 226 tool calls on the reference session).
Upgrade note: run csb update rebuild-index once after upgrading. All three versions share that single rebuild; sessions indexed before it simply keep their old cwd-only folders until then.
Breaking change (v0.7.2): csb scan --no-usage / -NU is now --no-index / -NI
The old names described a side effect ("only consider start_folder"); the flag actually bypasses the SQLite index and reads transcripts from disk -- the escape hatch for a stale or half-built index. Old spellings fail loudly with unrecognized arguments rather than silently changing behavior. Note -NI cannot find deleted sessions (they exist only in the index) -- csb says so explicitly if you try.
What's new in v0.7.3: path-exposure rungs
The harvest inherently produces path mentions at different confidence levels -- a cd target the shell provably entered is not the same kind of fact as a string lifted out of command text. Instead of one display cut for every question, csb show --paths <level> picks a rung, and selecting a level shows it and everything more trusted:
| level | shows |
|---|---|
cd |
only folders the shell provably stood in |
verified |
+ folders that exist on disk |
approximated |
+ unverifiable leaves folded up into their nearest existing ancestor, counts merged, marked (~) |
suspected |
everything stored, as extracted -- the default (output unchanged from v0.7.2) |
So ...\Foxit\FoxitPDFReader.exe.manifest (2x) [not found] -- a file mentioned in a command, on a machine where it no longer exists -- displays as-extracted at the default, and heals into ...\Foxit (6x) (~) under --paths approximated. Work-credit totals are conserved through every view, tested as a property and verified on real data.
Persist a default with csb config paths_level <level>. Matching is deliberately unaffected: csb scan -D <folder> finds exact-folder history no matter how condensed anyone's display is -- display can never change what matches, by tested design rule.
Also new: prominent scratch directories escape the low-value collapse (a real session's #1 workplace was its 207-work-unit scratchpad, previously invisible behind "(N hidden)"), with the boundary yours to tune via csb config scratch_escape_min_work / scratch_escape_top_rank. The hidden tier always reports its aggregate ("26 hidden, 5 work units"). And csb show --filter min-work=N thresholds the work list -- repeatable, strictest wins, loud on bad input.
What v0.7.2 hardened (four adversarial verification rounds)
Every fix below came from an adversarial tester pass or live vault spot-checking, each verified against real data:
csb scan -d/-D <path-that-no-longer-exists>now searches the index instead of returning early -- the index is the only place a vanished folder's history lives, and "the folder is gone" is exactly the recovery scenario.- Relative
cdtargets resolve (cd ..,cd foo) instead of leaking as literal folder names; quoted paths keep their spaces and commas in every spelling --"C:\Program Files\App", Git-Bash"/d/M/Software/ ...", and quoted relative tokens all harvest whole. - Primary credit ranks by certainty of evidence: with an explicit
cd, only paths the move corroborates outrank the cd target -- a string literal inside apython -cpayload or sed expression no longer steals credit from the folder the command actually worked in. Measured against all 4,532 command calls in a real vault before adoption. - Files are no longer stored as folders (the filesystem is asked first; conventional extensionless names and dotfiles are known);
..and.collapse; devices, shell metacharacters, backticks, all-dots components, and colon-joined path lists are rejected -- every junk class measured in a real index went to zero. csb scan,list, andtreegroup their--helpby what each flag does: selection, display, limits.--topis display-only and can never change which sessions match.
Version History (0.7.x)
| Version | Key Change |
|---|---|
| v0.7.3 | Current -- path-exposure rungs: csb show --paths <level>, provenance, tunable scratch boundary |
| v0.7.2 | Harvest hardening: four adversarial rounds, certainty-based crediting, -NU -> -NI (breaking) (tag only -- published with v0.7.3) |
| v0.7.1 | Work folders harvested from tool calls, not cwd; work-unit counting; schema v7 (tag only -- published with v0.7.3) |
| v0.7.0 | csb tree -- fork lineage forest |
Platform Support
| Platform | Status |
|---|---|
| Windows | Primary development platform; verified against real vaults |
| Linux / macOS / BSD | Supported; the tool-path harvester's POSIX handling is reasoned and unit-tested but has not yet run against a real POSIX vault (#35) -- reports welcome |
Verification
1338 automated tests (up from 1089 at v0.7.0). Six adversarial verification rounds across the arc, each HOLD fixed same-day; human test checklists ship in tests/checklists/ (v0.7.1__Feature__tool-call-folder-harvesting.md, v0.7.3__Feature__path-exposure-rungs.md).
Since this release: session naming docs (v0.7.4)
If you're new to csb, start here: docs/naming.md.
Every csb lookup -- list, scan, tree, resume -- matches on the session name, but Claude Code only assigns a UUID. Naming your sessions is the difference between finding old work with an instant metadata filter and excavating it with a content search. The doc covers the PROJECT__DATE__topic convention, /rename vs the logger's /renameAI, the workflow that leaves a searchable trail, and naming forks so csb tree reads as a narrative.
v0.7.0 - csb tree: Fork Lineage Forest
claude-session-backup v0.7.0
Git-backed backup for Claude Code sessions: every transcript preserved and recoverable, with a timeline view, folder analysis, full-text search, deletion detection, and byte-exact restore of sessions Claude Code has already purged.
What's New in v0.7.0
csb tree — fork lineage forest (#31)
Every time you run /branch, continue a /rewind, or claude --fork-session -r, Claude Code mints a new session that inherits the old one's history. csb has always backed those up; it never showed how they relate. Now it does:
$ csb tree multi-term
CLAUDE-SESSION-BACKUP__adding-transcript-search 2 months ago
└── CLAUDE-SESSION-BACKUP__phase-1-grep-first 2 months ago forked 2026-05-18, at 09:12
├── CLAUDE-SESSION-BACKUP__phase-2-fts5-index 6 weeks ago forked 2026-05-24, at 14:03
│ └── CLAUDE-SESSION-BACKUP__fts5-escaping-fix 1 month ago forked 2026-06-21, at 17:11
└── CLAUDE-SESSION-BACKUP__multi-term-boolean 1 month ago forked 2026-06-21, at 19:03 *
1 tree | 5 sessions | 96 never forked (--orphans to list)
With no filter the whole forest renders. With one, every family containing a match renders and the matches are marked * — so a session's ancestors and descendants are visible at once.
csb tree # the whole forest
csb tree search # families containing a match
csb tree . # families that worked in the current folder
csb tree search "C:\code\proj" # a keyword filter AND a folder scope, together
csb tree --root 722c24c2 # one family
csb tree --orphans # sessions that never forked
csb tree -ff --json # per-node detail; machine-readable nested outputA path-shaped first argument is understood as a path, so csb tree . needs no flag. Flags otherwise mirror the sibling verbs (-f/-ff, --shortid, --sort, -d/-D, --deleted, --json, -n), plus --root, --orphans, --lineage, --max-nodes, -u/--uuid, -E regex, and --ascii.
Purged ancestors keep chains whole (#31)
csb's index remembers sessions Claude Code has deleted, and csb tree puts that to work: a purged ancestor still renders — dimmed and marked [purged] — so a lineage never reads headless. A purged leaf stays hidden until --deleted all, keeping the default scope at parity with csb list. A parent csb has never indexed appears as [not indexed] so its children still group as siblings instead of scattering as unrelated roots.
csb show gains lineage, and accepts names (#22)
csb show now prints Forked from: / Forks: lines with a pointer to the full tree — and accepts a session name, path, or keyword, not just a UUID prefix. The tree displays names, so csb show <that name> had to work; both commands now share the resolver csb resume has used since #42.
Schema v6: fork lineage columns (#22)
parent_session_id, parent_message_uuid, is_fork, and forked_at on the sessions table, populated during normal indexing — and from historical git blobs during csb update backfill-deleted, so purged ancestors get lineage too. The migration is automatic, additive, and idempotent.
⚠️ One-time step after upgrading. Lineage is read from transcripts during indexing, so sessions indexed before v0.7.0 carry no fork pointers yet. Runcsb backup(orcsb update rebuild-index) once and the trees appear. Until thencsb treesays exactly that and names the command.
Installation
pip install --upgrade claude-session-backup
csb backup # one pass to populate fork lineage for existing sessions
csb treeVersion History (0.6.x – 0.7.x)
| Version | Key Change |
|---|---|
| v0.7.0 | Current — csb tree fork lineage forest; schema v6; csb show lineage + name resolution |
| v0.6.3 | csb resume works on npm installs (PATHEXT resolution) |
| v0.6.2 | Git refusal is not absence — four-state repo detection |
| v0.6.1 | Guided onboarding (csb setup), protected-by-default, beta |
Platform Support
| Platform | Status |
|---|---|
| Windows | Tested — CI runs the full suite on Python 3.10–3.13; primary development platform |
| Linux | Package builds in CI; full suite not yet run there (#35) |
| macOS / BSD | Expected to work; not tested |
Requirements
- Python 3.10+
- git (for backup protection;
csb backup --no-commitindexes without it)
Quality
1089 tests pass (+48 this release), with extraction, migration, and both upgrade regressions red-green verified against v0.6.3. Verified end-to-end on a real vault — 9 trees / 41 sessions in lineage, including a 21-node multi-branch family and a 5-deep chain — plus an agent-run checklist covering console rendering at the byte level across three codepages.
Closes #31; advances #22 and #15. Details in CHANGELOG.md and docs/commands.md.
Full changelog: v0.6.3...v0.7.0
v0.6.3 - csb resume Works on npm Installs (PATHEXT resolution)
Claude-Session-Backup v0.6.3
Git-backed Claude Code session backup with timeline view, folder analysis, deletion detection, session restore, and guided onboarding.
Small fix, wide reach:
csb resumenow works on npm-installed Claude Code.
What's New in v0.6.3
csb resume on npm-shim installs (#55)
If Claude Code was installed via npm, claude exists only as shims (claude + claude.cmd -- no claude.exe). csb resume used to spawn the bare name, which goes to Win32 CreateProcess -- and CreateProcess searches PATH for .exe only, never applying PATHEXT. The result was maddening:
D:\work> csb resume my-session
Error: 'claude' command not found in PATH.
D:\work> claude --resume <uuid> <- the exact same line... works fine
csb now resolves claude via shutil.which() (which applies PATHEXT) and spawns the full resolved path -- CreateProcess runs a .cmd by full path automatically. The "not found in PATH" error still exists, but only for the case where it's actually true. Native-installer boxes (claude.exe) and POSIX platforms are byte-identical to before. Verified live on the reporting machine, including -- passthrough (csb resume <query> -- --fork-session).
Installation
pip install --upgrade claude-session-backupVersion History (0.6.x)
| Version | Key Change |
|---|---|
| v0.6.3 | Current -- csb resume works on npm-shim installs |
| v0.6.2 | Four-state repo detection: git refusal is not absence |
| v0.6.1 | Optional session-logger detection, full -V build string |
| v0.6.0 | Onboarding overhaul: csb setup, protected-by-default, beta (tag only -- published with v0.6.1) |
Platform Support
| Platform | Status |
|---|---|
| Windows 10/11 | Tested (npm-shim and full-path .cmd spawn verified live) |
| Linux / macOS / BSD | Unchanged by this fix (which() mirrors execvp's PATH walk) |
Requirements
- Python 3.10+, Git
Validation: 1041 automated tests (+2 pinning the resolution behavior); human checklist in tests/checklists/.
v0.6.2 - Git Refusal Is Not Absence (four-state repo detection)
Claude-Session-Backup v0.6.2
Git-backed Claude Code session backup with timeline view, folder analysis, deletion detection, session restore, and guided onboarding.
A fix release with a story: three days after v0.6.0 shipped, its own NO BACKUP PROTECTION banner told csb's author that a repo with an unbroken commit history didn't exist -- and
csb setupoffered to re-initialize it. v0.6.2 teaches csb the difference between "there is no repository" and "git is refusing the repository it can see."
What's New in v0.6.2
Four-state repo detection (#54)
Git has more answers to "is this a repo?" than yes/no. Since git 2.35.2, the dubious ownership safety check can refuse a perfectly healthy repository -- and on Windows the check is elevation-dependent for Administrators-owned directories (common on imaged/provisioned machines): the same repo works in an elevated shell and is refused in a standard one. csb used to collapse that refusal into "no repository," discarding the stderr where git spells out the fix.
Now git_repo_state() distinguishes ok / absent / refused / error, and every surface says what git actually said:
====================================================================
csb: BACKUPS BLOCKED IN THIS SHELL -- a git repository EXISTS at
C:\Users\you\.claude, but git refuses it here.
git said: fatal: detected dubious ownership in repository at ...
Your history is intact; do NOT re-initialize. Run `csb setup`
for diagnosis and fixes. Details: `csb status`.
====================================================================
csb status shows Git repo: REFUSED with git's message; bare csb backup, the SessionStart warning, and the hook logs all name refusal as refusal. A broken git installation gets its own honest state (GIT ERROR), never "no repository."
csb setup under refusal: diagnose, never damage
- Never offers
git initover an existing.git-- a refused repo gets a diagnosis page instead: your data is intact, here's git's message, here's the durable fix (repair directory ownership) and the band-aid (git config --global --add safe.directory ..., offered interactively with default No;--autonever touches your git config). - Re-probes after any fresh
git init--git initsucceeds even where git then refuses the result, so setup no longer prints "Initialized" and walks into a failing first backup one line later. - Safe to run repeatedly in every state: repeated runs re-diagnose without compounding any state.
Installation
pip install --upgrade claude-session-backup
csb setup # guided; safe to re-run anytimeVersion History (0.6.x)
| Version | Key Change |
|---|---|
| v0.6.2 | Current -- four-state repo detection: refusal is not absence |
| v0.6.1 | Optional session-logger detection, full -V build string |
| v0.6.0 | Onboarding overhaul: csb setup, protected-by-default, beta (tag only -- published with v0.6.1) |
Platform Support
| Platform | Status |
|---|---|
| Windows 10/11 | Tested (including a real elevation-dependent ownership refusal, end-to-end) |
| Linux | Expected to work (O_APPEND/ownership semantics differ; refusal handling is platform-neutral) |
| macOS / BSD | Expected to work |
Requirements
- Python 3.10+, Git
Validation: 1039 automated tests; refusal behavior pinned by 17 new tests plus a human checklist (tests/checklists/).