Skip to content

Claude Code

csm moves Claude Code sessions between machines

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →
Image: github.com

Claude Code stores session data locally in ~/.claude/, so switching from a MacBook to an Ubuntu server loses your context. The open-source cc-session-migrate (csm) tool makes sessions portable using a cluster model in the style of Consul.

The design centers on a leader server running HTTP and WebSocket on port 9827. Agents hold persistent outbound WebSocket connections to it, so no inbound ports are needed on their machines, which sidesteps NAT. Sessions move between nodes through the server, streamed in 64 KB chunks with a SHA256 check before an atomic move.

Backups to S3-compatible storage (R2, MinIO) are configured per node, defaulting to 30-day retention and at least 3 copies per session. Builds are available for Linux, macOS, and Windows on amd64 and arm64, under the MIT license.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.