birdmanhj/dsh-mv-session
Migrates DSH sessions and workspaces to a new path or title, rewriting only the first zstd frame so the boot invariant holds.
Performs the whole migration that a directory rename otherwise leaves half-done, where sessions stay bound to the old path and tool cwd breaks with ENOENT while the harness creates an empty workspace at the new one. The technical core is zstd frame handling: session.jsonl.zstd is a multi-frame stream and the harness asserts at boot that frame 0 decompresses to exactly one header line, so a decompress-edit-recompress round trip collapses everything into one frame and crashes the next boot — a failure the README records as hit in production. The bundled CLI rewrites only frame 0, leaves every other frame byte-identical, repairs already-collapsed logs, and re-verifies the boot invariant before replacing the file atomically.
Install
dsh plugin --profile web add dsh-mv-sessionThe npm line, then restart dsh web once. After that the recommended route is conversational: ask the agent to migrate a workspace to a path or title, and it runs dry_run first so you can review the plan before anything moves. The bundled CLI is the manual equivalent and adds a --fix-projcache step that has to run while dsh web is stopped.
Compatibility
Exactly one restart, and the README argues the count in both directions: zero is impossible because DSH exposes no online rehome API, and the migration edits disk while the running process holds in-memory state it never re-reads and checkpoints back over the registry and projection cache. Two is unnecessary because a read-only --verify check replaces the post-symlink confirmation. The transition symlinks exist only to keep the old process alive during that window and can be deleted afterwards.
Details
- Repo: birdmanhj/dsh-mv-session
- Category: Sessions & Messages
- Stars: 0
- Version: 0.1.2 (npm)
- Last push: 2026-09-25
- First seen: 2026-08-25
Alternatives
YanzuoLu/dsh-at-sessions · kittimzhe/dsh-session-eval · YeqingTang/dsh-session-flow