hopsesh guide · Claude Code on the web
How to hand a Claude Code session to the cloud and bring it back
A cloud session starts from a prompt, not a conversation. How to hand over the work with a briefing and a branch, what to keep out, and how to bring it home.
Why a terminal session can’t be uploaded
A local Claude Code session is a file on your computer, ~/.claude/projects/<project>/<session-id>.jsonl. Claude Code on the web keeps its sessions on Anthropic’s side and starts each one from a prompt and a repository the cloud clones from GitHub. Claude Code’s documentation is direct about it: from the CLI you can pull cloud sessions into your terminal with --teleport, but you can’t push an existing terminal session to the cloud.
Two exceptions are worth knowing. The Claude desktop app can send a local session in its Code tab to the cloud from its Open in menu. And claude --cloud run in a repository with no git remote, or one the Claude GitHub App isn’t installed on, bundles the local repository and uploads it, uncommitted changes to tracked files included; repositories over 100 MB fall back to smaller bundles.
Otherwise, a hand-off from the terminal is two things:
- A briefing: a prompt that says what was done, what is open, what you asked for last and what to check first. It replaces the conversation.
- The code, on GitHub: the cloud clones your remote at your current branch, not your local checkout, so unpushed commits don’t exist for it.
Hand a Claude Code session to the cloud by hand
-
Put the work on a branch of its own, so your own branch isn’t touched:
git switch -c handoff/fix-flaky-tests git add -A && git commit -m "WIP for the cloud" git push -u origin handoff/fix-flaky-testsCheck
git statusfirst:git add -Astages everything that isn’t ignored. -
Write the briefing. A few hundred words is plenty: which branch to work on, what the session did, what is left, your last request, and what to verify before changing anything. Say that it is a summary, not the full history.
-
Start the cloud session from the repository:
claude --cloud "$(cat briefing.md)"Claude Code prints a link to the new session on claude.ai, where you can follow and steer it.
--cloudneeds a claude.ai sign-in; it isn’t available with an API key or a third-party provider. -
Bring it back from a clean checkout of the same repository:
claude --teleport <session-id>Teleport checks you’re in the same repository (not a fork), fetches the cloud session’s branch and loads the whole conversation. With uncommitted changes, it asks you to stash them first. Inside a session,
/teleport(or/tp) opens the same picker.
Teleport errors and requirements
- Clean git state: uncommitted changes block it until you stash them.
- Correct repository: run it from a checkout of the same repository; from another one Claude Code names both.
- Branch available: the cloud session’s branch must be pushed. The fetch never waits for a password or a new SSH host, so load your key into
ssh-agentand rungit fetchonce by hand if it fails. - Subscription sign-in: teleport needs claude.ai authentication. With an API key or a Console sign-in, the session picker shows
Error loading Claude Code sessions. --resumedoesn’t list cloud sessions; only--teleportfetches them.
What to keep out of a hand-off
The cloud clones what is on the branch, and the briefing is text you send. Neither should hold secrets.
- Files:
.envfiles, SSH keys,.pemand.keyfiles belong in.gitignore, never on a hand-off branch, even a short-lived one. - The briefing: a session’s history often holds tokens you pasted or a tool printed. Read the briefing before you send it.
- The conversation itself: committing the transcript to give the cloud more context means anyone who can see the branch can read it.
- Hidden reasoning stays with the local session in any case. The cloud starts fresh from your briefing.
Do it with hopsesh, from this computer or another
hopsesh is a free, open-source command-line tool, terminal UI and app for macOS and Windows that does the steps above, from a session on this computer or on another of yours, in Claude Code or Codex. It runs Claude Code’s own claude --cloud and claude --teleport, signed in as you; it never reads your login and never calls Anthropic’s servers itself.
hopsesh clouds allow claude-cloud # each cloud is off until you allow it
hopsesh plan claude/<id> --to claude-cloud # what goes and what stays; changes nothing
hopsesh handoff claude/<id> --to claude-cloud
hopsesh pull claude-cloud:<session-id> --run # bring it home (or paste its link)
In the app, choose Move › Hand off to Claude Code cloud… on the session. Before anything happens, the plan shows:
- The briefing, about 2,000 tokens, written by hopsesh from the session, never by a model. Likely secrets are masked, the plan says how many, and you can edit it.
- The branch: a clean branch already on GitHub goes as it is. Otherwise hopsesh pushes a
hopsesh/handoff/<date>-<id>branch with a snapshot of your unpushed commits and changed files, without touching your checkout, index or branch. Untracked files go only when you name them. - What stays: the conversation, tool output and hidden reasoning, plus credential-like files (
.env*, SSH keys,.pem,.key,.npmrc), Git LFS files and files over 50 MB, which never go whatever you pick.
claude --cloud runs in a terminal you see: a tab of the app’s hopsesh Terminal, or your own terminal app. When Claude Code asks whether it trusts hopsesh’s hand-off folder, you answer, once per repository; hopsesh never answers it and never changes Claude Code’s settings to skip it.
Bringing a cloud session home runs claude --teleport in a new worktree beside your checkout, so your own branch stays as it is, and keeps the cloud’s branch as hopsesh/from/claude-cloud/…. Claude Code saves its copy only after you send a message in it, so send one, even “ok”. From there it is an ordinary session: continue it here, move it to another computer, or continue it in Codex.
hopsesh undo takes a hand-off back: it deletes the hand-off branch while the cloud hasn’t pushed to it. The cloud session stays in your claude.ai list for you to archive there. Once the work is merged, hopsesh clouds cleanup offers to delete the hand-off branch and the cloud’s own claude/… branch, and deletes only what you confirm.
Codex cloud and the others
The same commands work with Codex cloud (--to codex-cloud --env <environment>), which runs each task in an environment you made on the web. For now the codex command can only use older Codex cloud environments. A Codex cloud task comes home as its diff, committed on a branch of its own, with its title and outcome written as a session. hopsesh can also pass a session from one cloud to the other through your computer, and, experimentally, hand sessions to the GitHub Copilot cloud agent, Jules, Devin and Amp, tested so far only against stand-ins of their command lines.
hopsesh is alpha software. Its Claude Code cloud and Codex cloud steps were also checked by hand against the real tools. It is an independent project, not affiliated with Anthropic or OpenAI.
Claude Code sessions and the cloud
Can I upload a local Claude Code session to Claude Code on the web?
Not from the terminal: the CLI pulls cloud sessions down with --teleport but can’t push a terminal session up. The Claude desktop app can send a session in its Code tab to the cloud from its Open in menu. Otherwise, start a cloud session with a briefing and push the work to a branch it can clone.
What does claude --teleport do?
It brings a Claude Code on the web session into your terminal: the whole conversation, and the branch the cloud worked on. Run it from a clean checkout of the same repository, signed in with a claude.ai account. /teleport or /tp does the same inside a session.
Do my unpushed commits and uncommitted files go to the cloud?
claude --cloud clones your GitHub remote at the current branch, not your local checkout, so push first. hopsesh does this for you: it pushes a hand-off branch with a snapshot of unpushed commits and changed files, without touching your checkout, and untracked files go only when you name them.
How do I keep secrets out of a cloud hand-off?
Keep .env files and keys out of git, and read the prompt before you send it, because a session’s history can hold pasted tokens. hopsesh masks likely secrets in its briefing, shows how many it masked, and never sends .env files, SSH keys, .pem or .key files, whatever you pick.
Can I hand a Claude Code session to Codex cloud instead?
Yes, with hopsesh: hopsesh handoff claude/<id> --to codex-cloud --env <environment> starts a Codex cloud task from the same kind of briefing and branch. For now the codex command can only use older Codex cloud environments.
Use the method
Try it with hopsesh
Open-source CLI and desktop app: move a Claude Code or Codex session to another computer, into the other agent, or to the cloud, with undo built in.
See everything hopsesh does →brew install roeehrl/tap/hopsesh Without Homebrew: curl -fsSL https://raw.githubusercontent.com/roeehrl/hopsesh/main/scripts/install.sh | sh, which checks the download against the release’s checksums and signature.irm https://raw.githubusercontent.com/roeehrl/hopsesh/main/scripts/install.ps1 | iex Same checks as the macOS and Linux script. The Windows app installs this command as well.More ways to install
- With Homebrew the same app, from the roeehrl tap
brew install --cask roeehrl/tap/hopsesh-app
More ways to install
- Installer for Arm64 Windows 10 or 11 on Arm
- Portable .zip x64 or Arm64, no install, on the release page
- Command line with Scoop from the roeehrl bucket, without the app
scoop bucket add roeehrl https://github.com/roeehrl/scoop-bucket; scoop install hopsesh - Command line only in PowerShell, without the app
irm https://raw.githubusercontent.com/roeehrl/hopsesh/main/scripts/install.ps1 | iex