[FEATURE] Cross-machine session resume — sync session state for CLI-to-CLI handoff
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 10 comments · opened Mar 8, 2026
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
- Allow a Claude Code CLI session started on one machine to be resumed from another machine's CLI, enabling true cross-device session handoff without requiring SSH or shared filesystems.
Current Workarounds
- SSH + tmux: SSH into the original machine and reattach to a tmux session. Works, but requires the original machine to stay on and accessible.
- Remote Control via claude.ai/code: Lets you view/interact with a running CLI session remotely, but the CLI must remain running on the host and you can't detach it to run locally on the second machine.
- --from-pr: Resumes from a PR's context, but doesn't carry over the full conversation history.
None of these provide a true "hand off and continue locally" experience.
Proposed Solution
Sync session state (conversation history, tool outputs, working directory context) to the cloud so that claude --resume <session-id> works from any authenticated machine. This could involve:
- Cloud-backed session storage — Opt-in sync of session data to Anthropic's servers (tied to the user's account)
- Session export/import — A simpler alternative: claude session export <id> produces a portable file, claude session import <file> loads it on another machine
- Hybrid approach — Cloud sync for conversation history, with a prompt to re-establish local context (working directory, file state) on the new machine
Considerations
- Privacy: Session data may contain sensitive code/context — cloud sync should be opt-in with clear data handling policies
- File state divergence: The working directory on machine B may differ from machine A — the resumed session should handle this gracefully (e.g., warn about missing files, re-read changed files)
- Authentication: Should be scoped to the same Anthropic account
Environment
- macOS (both machines)
- Claude Code CLI
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
Use Case
- I work across multiple machines (e.g., Mac Studio at my desk, MacBook Pro on the go). When I start a Claude Code session on one machine, I'd like to pick it up seamlessly on another — continuing the same conversation, context, and working state.
Additional Context
_No response_
Showing cached comments. Read the full discussion on GitHub ↗
8 Comments
This is a real workflow gap. I regularly switch between my desktop and laptop mid-task and the SSH+tmux workaround gets old fast.
I've been working on claude-brain which handles the config/state sync side of this — skills, memory, agents, rules, and settings all sync across machines via Git. It doesn't do full session transcript handoff yet, but it means your Claude Code environment is identical on both machines so you can pick up where you left off with the right context already loaded.
True session resume (with conversation history) would be amazing to see natively — that's something that really needs Anthropic's involvement since session state lives server-side.
bump. I run Claude Code on both a local work machine and a remote dev box (same account) and want to see/search all historical sessions in one place. Right now
/resumeis machine-local and Remote Control only works for live sessions. A unified session history across devices would be huge.Built this. Ships today.
session-roam — Cross-node Claude Code session continuity using Syncthing.
claude -con any machine in your cluster picks up exactly where you left off on another. No cloud, no server, just P2P file sync of~/.claude/projects/.Discovered it by accident during a late-night cluster maintenance marathon — rebooted a node, typed
claude -con a different machine, and the session was just... there. Syncthing had been silently syncing the session files.What it includes:
setup.sh— one-command Syncthing config for Claude Code session synccrto continue,csto browse all sessions,cfto search,cnto name,cforkto branch)verify.sh— 8-dimension health check.stignoretemplate optimized for Claude Code (skip worktrees/caches, keep sessions)Requirement: Same username and project paths across machines. If you're running a homelab or multi-workstation setup with consistent paths, this just works.
Tested across a 4-node cluster. 600 sessions syncing. All checks passing.
https://github.com/VirelNode/session-roam
Exactly this. Built a git-based workaround while waiting for native support: [https://github.com/NeoAcar/claude-handoff](url)
Exports the full session (transcript, subagent logs, memory) into
.claude-shared/, scrubs secrets, rewrites absolute paths, reconstructs under the receiver's~/.claude/projects/.claude --resumepicks it up with the original title and full history.Requires a git push/pull between machines but no SSH, no shared filesystem, no cloud sync. Works today.
npm i -g @neoacar/claude-handoff+1. Two angles I haven't seen yet in this thread or its neighbors that might be worth folding in:
Continuity for users without persistent compute. A class of users who'd benefit immediately from a portable export target: people who can't keep a laptop or VM on all the time. Students, anyone on a single shared device, anyone in a context where leaving a workstation running overnight isn't an option. Today, when they close the laptop, the session is gone in any practical sense — the JSONL is on disk, but loading it back means being at the same machine. A documented portable export format makes Claude Code something they can think with while not at compute, and pick up execution when they're back at a workstation. Not a power-user convenience — a different shape of user accessing the workflow at all.
The codec layer is solved in user space. achiii800/claude-snap is a ~500-LOC pure-stdlib Python codec that does this end-to-end on real
~/.claude/projects/JSONLs:Distinct from the neighboring tools: cctrace transcribes (lossy md/xml + verbatim copy of the JSONL, no codec), claude-mem summarizes via the agent-sdk (lossy by design), claude-conversation-extractor emits markdown (lossy). claude-snap is the only one of these where pack→unpack roundtrips byte-for-byte.
So the wire format isn't the gating problem — what's missing is the official surface (
claude --fork-session --export <path>andclaude --import <path>) and the matching ingestion path on receiving Claude clients. Cite this if it helps with the codec/format discussion.+1, with an adjacent ask: alongside resume, a native cross-machine spawn would be huge. Concrete use case: I'm signed into the same account on a laptop and a desktop, and I want to fire off a long-running session on the desktop from the laptop CLI (e.g.
claude --on <machine-id> "..."orclaude bg --remote <machine-id>) without SSH or third-party wrappers. Today Remote Control only exposes sessions started locally — there's no way to start one on a peer machine the account already owns.Two third-party products already ship this on top of CC: Happy (slopus/happy) and Vibe Companion (The-Vibe-Company/companion). Notably, Vibe Companion gets there by reverse-engineering an undocumented
--sdk-urlWebSocket protocol — which suggests the underlying primitive already exists internally and just needs an officially supported surface. Two independent teams building this is a strong signal of demand; pulling spawn-on-peer into the native CLI would let those projects focus on UX instead of reimplementing transport.Late to the party but if you're doing any kind of handoff, Envoy (my tool) is worth considering.
https://github.com/statecraft-protocol/envoy
hi
my tool https://github.com/PetePeter/gamepad-cli-hub
works on mac and pc
it includes an mcp server so each Claude, or codex, or GitHub copilot can send messages to other cli instances in the same machine, or on other machines running the same tool
so last night, on the mac it's building the ios version of my app, while sending messages to claude on my pc to ensure the build still works etcetc
give it a go. it may alleviate your cross pc usage