Own Your Stack/The Reach/claude-sync
Own your sessions
claude-sync
Pack a Claude Code session into one portable file and resume it on another machine, byte-identical.
Claude Code keeps every session on the machine that made it. The transcript lives at ~/.claude/projects/<encoded-cwd>/<session-id>.jsonl, and there is no native way to carry it to another box. The obvious fix — rsync the folder — breaks twice: the directory name is the absolute working-directory path, so the same repo on a Mac and a Windows machine hashes to different folders and the session arrives orphaned; and two machines writing the same transcript with no lock corrupt it.
claude-sync moves the session instead of the folder. It packs a transcript into a single portable .ccsync file, derives a canonical project key from the git remote so the same repo resolves to the same key wherever it's checked out, and unpacks the session on the other side byte-identical — it never parses the events, it just shuffles the JSONL. A transport carries the file between machines: a local synced folder you nominate, or a directory on a remote host over SSH.
# machine A — switching boxes $ claude-sync push → Pushed sess-abc123 → …/sess-abc123-desktop.ccsync # machine B — pick up where you left off $ claude-sync pull → Imported sess-abc123 from desktop $ claude --resume sess-abc123
Packs a session into one portable file
A .ccsync is a small, schema-versioned JSON wrapper around the raw transcript — the session id, the git-derived project key, the originating machine, and the entire JSONL verbatim. Ship it however you like: Dropbox, iCloud, Syncthing, a USB stick. Unpack on the other side and the session is restored byte-for-byte.
A git-derived key that survives the move
The project key is git:<host>/<owner>/<repo>, read from your git remote. SSH and HTTPS remotes normalize to the same key, so the same logical repo resolves identically no matter where it's checked out or which protocol you cloned with. With no remote, it falls back to the directory basename.
Push and pull by hand, or watch
You choose the cadence. push from machine A and pull on machine B when you switch, or run claude-sync watch to push-on-change and pull-on-interval automatically. Each machine writes its own file under its own name, so two machines pushing the same session don't collide.
Local folder or SSH — no relay
Two transports ship: a local synced directory you nominate, or a directory on a remote host reached over your system ssh — honoring ~/.ssh/config, running in BatchMode so it fails fast, multiplexing connections. The two interoperate against the same directory. There's no hosted service in the middle; the bytes stay on infrastructure you own.
A doctor, and a library underneath
claude-sync doctor checks connectivity, lists registered projects and transport peers, and warns when a registered directory has gone missing or a machine name would make pull a silent no-op. Every command is built on exported functions — sessions, the .ccsync codec, the Transport interface — so you can embed it or write your own transport. Zero runtime dependencies, MIT-licensed.
Part of The Reach.
claude-sync moves the session. The Reach is what extends an agent beyond one machine and one session — portable sessions, a remote control plane, and private search.
Your session, on whichever machine you're at.
claude-sync is open source and MIT-licensed. Read the code, install it, run it on your own boxes.
View claude-sync on GitHub →