Show HN: Cc-session-migrate: Cross-node migration for Claude Code sessions A new open-source tool, cc-session-migrate (csm), enables cross-node migration and backup of Claude Code sessions between machines using a Consul-style cluster model. Developed by GitHub user bigwhite, the tool uses a leader server with WebSocket relay to transfer session data between agents without requiring inbound ports, solving NAT traversal issues. The project supports S3-compatible storage backup and is available for Linux, macOS, and Windows. Cross-node migration and backup tool for Claude Code sessions. Migrate session data between development machines and back up to any S3-compatible storage. Claude Code stores session data on local disk ~/.claude/ . When you start a session on your MacBook and switch to an Ubuntu server to continue, the context is lost — the session is locked to the original machine. csm solves this with a Consul-style cluster model, making session data portable across nodes. ┌──────────────────────────┐ │ Server Leader │ │ │ │ · cluster topology │ │ · WebSocket hub │ │ · session relay │ │ · S3 backup │ │ HTTP + WS :9827 │ └─────┬──────────┬─────────┘ WS │ │ WS ┌───────────┘ └───────────┐ ▼ ▼ ┌───────────────┐ ┌───────────────┐ │ Agent A │ │ Agent B │ │ MacBook │ │ SVR1 │ │ │ │ │ │ session ops │ │ session ops │ │ S3 backup │ │ S3 backup │ │ no listen │ │ no listen │ └───────────────┘ └───────────────┘ Cluster mgmt: agents → server WebSocket Session migration: any node ↔ any node relayed via server WebSocket S3 backup: per-node, independent storage The server Leader runs an HTTP server with a WebSocket endpoint. All agents maintain persistent outbound WebSocket connections to the server — no inbound ports required on agent machines , solving NAT traversal issues. Server mode — Cluster leader. Manages topology, accepts agent WebSocket connections, relays session operations between nodes. Agent mode — Connects to the server via outbound WebSocket. Handles session commands relayed by the server. No port listening needed. S3 backup — Optional. Each node independently configures R2/MinIO/any S3-compatible storage. Linux recommended for server node : make build sudo ./scripts/install.sh --local ./bin/cc-session-migrate This installs the binary to /usr/local/bin , sets up the csm alias, creates the systemd service, and generates a default config at /etc/cc-session-migrate/env . macOS / Windows: go install github.com/bigwhite/cc-session-migrate@latest Then create a csm alias so the examples below work: macOS / Linux add to ~/.zshrc or ~/.bashrc alias csm='cc-session-migrate' Windows PowerShell add to $PROFILE Set-Alias csm cc-session-migrate Tip:Run the server leader node on a Linux server that is always online. Agent nodes on your laptop or other machines can join and leave freely. Step 1 — Start the server node: Linux sudo sed -i 's/CSM AGENT ROLE=agent/CSM AGENT ROLE=server/' /etc/cc-session-migrate/env sudo systemctl enable --now cc-session-migrate cat ~/.csm/config.yaml view the generated cluster-id and auth-token macOS / Windows run in tmux or a dedicated terminal csm agent --server --name server-01 Step 2 — On each agent machine, join the cluster: Linux make build && sudo ./scripts/install.sh --local ./bin/cc-session-migrate sudo sed -i 's/ CSM CLUSTER SERVER ADDR=/CSM CLUSTER SERVER ADDR=