hopsesh

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0

README

hopsesh logo

hopsesh

Find your Claude Code sessions on your other machines and continue one here.

CI OpenSSF Scorecard Go Reference

Install · Quick start · How it works · Why not…? · FAQ · Contributing

hopsesh lists Claude Code sessions on two machines grouped by repository, then moves one to this machine, cloning its repository and printing the resume command

Recorded with VHS from demo/hopsesh.tape, with made-up machines and sessions.

You started something in Claude Code on your desktop, and now you're on your laptop. hopsesh shows every session on all your machines and moves the one you pick here: repository, worktree, paths and all. Then it gives you the claude --resume command.

  • Finds your machines from Tailscale and ~/.ssh/config, and connects only to the ones you allow, with your own ssh, keys and agent. Nothing to install on the other machines.
  • Lists every session by repository: machine, path, branch, worktree, last prompt, when it was last active, and whether it's running right now.
  • Moves a session safely: finds the repo here or clones it, recreates the worktree, warns about unpushed or uncommitted work, rewrites paths, and shows a plan first. hopsesh undo reverses a move.
  • Picks up where you left off: the resumed session's first message tells Claude it was moved and asks it to check that nothing is missing. It can start with Remote Control on and tell the old session where the work went.
  • CLI, TUI and a macOS app on one engine. --json output everywhere it matters.

Status: alpha. It works end to end on macOS and Linux; Windows support is built but less tested. hopsesh is an independent project, not affiliated with Anthropic.

Install

No release is published yet; until then, build from source (Go 1.26+):

go install github.com/roeehrl/hopsesh/cmd/hopsesh@latest

From the first release on:

# macOS and Linux
curl -fsSL https://raw.githubusercontent.com/roeehrl/hopsesh/main/scripts/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/roeehrl/hopsesh/main/scripts/install.ps1 | iex

Both check the download against the release's checksums.txt and its signature. Releases also include Scoop and winget manifests, .deb/.rpm/.apk packages and the signed, notarized macOS app. hopsesh update installs new releases with the same checks.

The other machines need only an SSH server (Remote Login on macOS, OpenSSH on Windows) and their Claude Code sessions.

Quick start

hopsesh hosts                 # machines found in Tailscale and ~/.ssh/config (connects to nothing)
hopsesh hosts allow studio    # let hopsesh connect to one
hopsesh trust studio          # confirm its SSH host key
hopsesh                       # browse sessions and move one here

Or from scripts:

hopsesh ls --json                          # every allowed machine, grouped by repo
hopsesh pull studio:"fix flaky tests"      # plan, confirm, move, print the resume command
hopsesh pull studio:7f3c2a1e --clone --rc --notify --yes
hopsesh doctor studio                      # SSH, host trust, Claude version, Remote Control
hopsesh undo 7f3c2a1e
The macOS app
The hopsesh macOS app listing sessions from two machines, grouped by repository, each with a Hop here button

Same engine, with a preflight screen for each move: repository, worktree mode, what gets rewritten, and what's left behind on the other machine.

How it works

  1. Discovery reads tailscale status --json and your ~/.ssh/config. It connects to nothing until you allow a machine.
  2. Listing connects with your system ssh (strict host-key checking, ControlMaster) and reads the head and tail of each transcript over SFTP. One batched git probe per machine adds branch, worktree and unpushed/uncommitted counts.
  3. Moving builds a plan, then copies the transcript and its side files into a staging folder. It rewrites paths in one pass, so ids and signed thinking blocks are never touched. It re-reads the result, installs it where Claude Code looks for it, and keeps an undo journal.

The details, including the Claude Code file-format traps hopsesh handles, are in docs/design.md.

How it treats your data
  • Your machines only. Sessions travel over your own SSH. There's no hopsesh server, no cloud relay and no telemetry. The app can check GitHub once a day for new versions, only if you say yes.
  • Read-only until you say go. Each machine needs your permission, and every move is shown as a plan first.
  • Never moves credentials. Logins, keys, live sockets and account data stay where they are; each machine stays signed in on its own.
  • Transcripts can hold secrets. hopsesh scans for likely secrets while moving and can redact the copy (--redact). Every remote action goes to a local audit log.
  • Only Claude Code itself talks to the model. hopsesh never calls the API.

Why not…?

  • claude --teleport? Teleport brings a session from Claude Code on the web to your machine. hopsesh moves sessions between your own machines.
  • Remote Control? Remote Control lets you drive a session that keeps running where it is. hopsesh moves the session, so it continues on the machine you're at, with that machine's files and tools. It can turn Remote Control on for the moved session.
  • Copying the .jsonl and running claude --resume? It works only if every path is the same on both machines, the project folder name matches Claude Code's naming rules, and there's no second copy of the session. hopsesh handles those cases, plus the repository, worktree, side files and undo.
  • Syncing all of ~/.claude between machines? Sync tools copy everything, all the time. hopsesh moves the one session you pick, when you pick it, and fixes it up for the new machine.

Related projects, with different trade-offs:

  • parcels ships a repository together with a live agent session over Tailscale.
  • go-claude-teleport moves a session, its git worktree and its tmux window over SSH.
  • claude-nomad syncs your setup and history with path remapping.
  • chronicle syncs history through git.

FAQ

Does anything leave my machines?

No. Sessions go directly between your machines over SSH. hopsesh has no server and no telemetry, and it never calls the Anthropic API.

Do I need Tailscale?

No. Any machine you can ssh to works, including aliases, ProxyJump and ProxyCommand from your ~/.ssh/config. Tailscale just makes machines easy to find. When an alias's LAN name doesn't resolve, hopsesh falls back to the machine's Tailscale name.

Does the other machine need hopsesh installed?

No. It only needs an SSH server. There's an optional helper (hopsesh hosts helper install <machine>) that makes listing faster on machines with long histories. It's a copy of hopsesh pinned by SHA-256, checked before every run, listens on nothing, and is removed with hopsesh hosts helper remove <machine>.

What if the session is still running on the other machine?

By default hopsesh copies it as it is and asks the old session to stop (handoff). With --fork, both copies continue independently. hopsesh refuses to overwrite a session that's running on this machine.

Different usernames, home folders or operating systems?

That's the point. Paths are rewritten for the new machine, including JSON-escaped Windows paths, and separators are converted between Windows and macOS/Linux. Paths it can't map are left as they are and listed in the plan.

Different Claude accounts on the two machines?

hopsesh reads claude auth status on both sides. If the accounts differ, it leaves out thinking blocks, because they're signed for the original account.

Why does macOS ask about "devices on your local network"?

macOS 15 and later ask before an app may reach machines on your LAN. The hopsesh app asks when it first connects to such a machine, explains why, and if you chose Don't Allow, links to System Settings → Privacy & Security → Local Network. Tailscale connections aren't affected, and the command-line tool run from Terminal never needs this permission.

How do I undo a move?

hopsesh undo <session-id> removes the copy and restores anything it set aside. hopsesh undo with no arguments lists recent moves.

Contributing

Contributions are welcome. Issues labelled good first issue are a good place to start. You don't need two machines: demo/record.sh shell starts two made-up machines in Docker and drops you on one with hopsesh ready (see demo/README.md).

See CONTRIBUTING.md for the 60-second dev setup, and use Discussions for questions and ideas. Report security issues privately as described in SECURITY.md.

License

Apache License 2.0. "Claude" and "Claude Code" are trademarks of Anthropic, PBC; hopsesh is not affiliated with, endorsed by or sponsored by Anthropic.

Directories

Path Synopsis
cmd
hopsesh command
Command hopsesh finds Claude Code sessions on your other machines and continues one here.
Command hopsesh finds Claude Code sessions on your other machines and continues one here.
hopsesh-app command
Command hopsesh-app is the hopsesh desktop app (macOS, Windows).
Command hopsesh-app is the hopsesh desktop app (macOS, Windows).
internal
cli
Package cli implements the hopsesh command line.
Package cli implements the hopsesh command line.
config
Package config holds hopsesh's user configuration and state locations.
Package config holds hopsesh's user configuration and state locations.
core/audit
Package audit keeps an append-only JSONL log (one file per day in the state folder) of every remote command, copy, install and undo.
Package audit keeps an append-only JSONL log (one file per day in the state folder) of every remote command, copy, install and undo.
core/fsys
Package fsys is the small filesystem interface hopsesh reads sessions through, so the same code enumerates sessions on this machine (os) and on a remote one (SFTP).
Package fsys is the small filesystem interface hopsesh reads sessions through, so the same code enumerates sessions on this machine (os) and on a remote one (SFTP).
core/hosts
Package hosts discovers the user's machines without connecting to any of them.
Package hosts discovers the user's machines without connecting to any of them.
core/link
Package link connects the old and new sessions using only official Claude Code features: it builds the resume command (--resume, --fork-session, --remote-control, --desktop), the start prompt that tells the resumed session it was moved and asks it to check its environment (and, when asked, to notify the old session with SendMessage), and the text to paste into the old session otherwise.
Package link connects the old and new sessions using only official Claude Code features: it builds the resume command (--resume, --fork-session, --remote-control, --desktop), the start prompt that tells the resumed session it was moved and asks it to check its environment (and, when asked, to notify the old session with SendMessage), and the text to paste into the old session otherwise.
core/lnp
Package lnp handles macOS local network privacy (macOS 15 and later).
Package lnp handles macOS local network privacy (macOS 15 and later).
core/repos
Package repos matches a session's working directory to a git repository.
Package repos matches a session's working directory to a git repository.
core/rewrite
Package rewrite adapts a copied session to the target machine.
Package rewrite adapts a copied session to the target machine.
core/scan
Package scan finds likely secrets in transcripts before they move.
Package scan finds likely secrets in transcripts before they move.
core/sessions
Package sessions locates and summarizes Claude Code sessions.
Package sessions locates and summarizes Claude Code sessions.
core/transport
Package transport runs commands and reads files on remote machines.
Package transport runs commands and reads files on remote machines.
devtools/demoseed command
Command demoseed fills a demo machine with made-up git repositories and Claude Code sessions, for the recordings in demo/.
Command demoseed fills a demo machine with made-up git repositories and Claude Code sessions, for the recordings in demo/.
devtools/icon command
Command icon renders hopsesh's app icon (1024×1024 PNG): a teal rounded square with a "hop" arc between two dots.
Command icon renders hopsesh's app icon (1024×1024 PNG): a teal rounded square with a "hop" arc between two dots.
devtools/lnpcheck command
Command lnpcheck reports, for each host given, whether macOS local network privacy applies to it and what an in-process probe sees.
Command lnpcheck reports, for each host given, whether macOS local network privacy applies to it and what an in-process probe sees.
devtools/realcheck command
Command realcheck validates the session reader against the real ~/.claude on this machine: every project folder name must equal Slug(cwd) for the cwd its transcripts record (or the relocated cwd), and summaries must have titles.
Command realcheck validates the session reader against the real ~/.claude on this machine: every project folder name must equal Slug(cwd) for the cwd its transcripts record (or the relocated cwd), and summaries must have titles.
engine
Package engine plans and performs a session transport: it decides where a session goes on this machine, which files move, how paths map, what to do about the repository and worktrees, and then stages, rewrites, verifies and commits the copy with an undo record.
Package engine plans and performs a session transport: it decides where a session goes on this machine, which files move, how paths map, what to do about the repository and worktrees, and then stages, rewrites, verifies and commits the copy with an undo record.
gui
Package gui is the backend of the hopsesh desktop app (Wails v3).
Package gui is the backend of the hopsesh desktop app (Wails v3).
inventory
Package inventory scans machines for Claude Code sessions and joins each session with its live status and git state.
Package inventory scans machines for Claude Code sessions and joins each session with its live status and git state.
tui
Package tui is hopsesh's interactive terminal UI: machines → repositories → sessions, then plan, confirm and move, ending with the command to resume.
Package tui is hopsesh's interactive terminal UI: machines → repositories → sessions, then plan, confirm and move, ending with the command to resume.
update
Package update checks for and installs new hopsesh releases from GitHub.
Package update checks for and installs new hopsesh releases from GitHub.
version
Package version carries build metadata injected at link time by GoReleaser.
Package version carries build metadata injected at link time by GoReleaser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL