Cloud sessions, explained by monkey
(plus the cheat sheet)
claude --cloud runs Claude Code on Anthropic's machines, so it keeps working after you close the laptop, and /teleport pulls it back into your terminal. Here's how to start one, steer it, bring it home, and the traps that catch everyone.
A cloud session is Claude Code running on a computer Anthropic manages instead of yours. You give it a task, close the laptop, and it keeps going. You can check on it from the browser, the Claude phone app or the Desktop app, and when it's done you can open a pull request or pull the whole session, branch and chat, back into your terminal.
Copy-paste setup
Connect GitHub once, push your branch, then send the task:
claude auth login # sign in with your claude.ai account
claude # then, inside Claude Code:
/web-setup # sends your local gh login to your Claude account
git push # the cloud copies GitHub, not your laptop
claude --cloud "Fix the authentication bug in src/auth/login.ts"
- /web-setup uses the GitHub CLI (gh) you're already logged into, and reaches any repo your gh token can. The other route is installing the Claude GitHub App during onboarding at claude.ai/code.
- The terminal shows a live checklist while the cloud machine starts (cloning, setup script). Anything you type meanwhile is queued and sent when it's ready.
- The old spelling --remote still works, but it's deprecated. Use --cloud.
Push first, or the cloud won't see it
The cloud machine clones your repo's GitHub remote at your current branch. It doesn't look at your laptop. Commits you haven't pushed, and edits you haven't committed, aren't there.
No GitHub remote, or the Claude GitHub App isn't installed on the repo? Then --cloud bundles your local repo and uploads it instead:
- The bundle has your history plus uncommitted changes to tracked files.
- Untracked files don't go. Run git add on anything you want the cloud to see.
- On macOS, Linux and WSL, uncommitted changes to .env, *.tfvars, *.pem and id_rsa files stay behind, and a "Left on this machine:" notice names them.
- The bundle has to be under 100 MB. Bigger repos fall back to just the current branch, then to a single snapshot.
- CCR_FORCE_BUNDLE=1 claude --cloud "..." forces the upload even when GitHub would work. That's also the route for GitLab or Bitbucket, but the session can't push results back there.
Run several at once
Every --cloud command starts its own session, so three lines start three jobs side by side:
claude --cloud "Fix the flaky test in auth.spec.ts"
claude --cloud "Update the API documentation"
claude --cloud "Refactor the logger to use structured output"
It only goes one way
From the terminal you can pull a cloud session down, but you can't push the session you're in up to the cloud. --cloud always starts a new session. The docs' workaround: plan locally, commit the plan, and hand it over.
claude --permission-mode plan # work out the plan with Claude
git add docs/migration-plan.md && git commit -m "Plan" && git push
claude --cloud "Execute the migration plan in docs/migration-plan.md"
The Desktop app can send a local session to the cloud (session menu → Open in → Cloud), but the conversation goes over as a summary, not word for word.
Steer it from anywhere
claude -p "also update the docs" --cloud <session-id>
- That queues one message into the session and exits without waiting for an answer.
- The session ID is the session_… part of its claude.ai/code URL, or paste the whole URL.
- It works from any machine you're signed in on, not just the one that started the session.
- Or just open the session at claude.ai/code or in the Code tab of the Claude phone app.
Bring it back: /teleport
- claude --teleport opens a picker of your cloud sessions. claude --teleport <session-id> goes straight to one.
- Already in Claude Code? Type /teleport, or the short /tp.
- From /tasks, press t on a session's row.
- On claude.ai/code, the session menu → Open in → Terminal copies the command for you.
- Type /teleport inside the cloud session itself and it replies with the exact claude --teleport command to run.
Teleport checks you're in the right repo, fetches and checks out the session's branch, and loads the whole conversation into your terminal.
Teleport checklist
- A clean git state. If you have uncommitted changes, it offers to stash them.
- The same repository, not a fork.
- The session's branch pushed to GitHub.
- The same claude.ai account, signed in with a subscription. With an API key, run /login first.
- Your SSH key loaded. The branch fetch never stops to ask for a password or passphrase, it just fails. Run ssh-add, then git fetch once by hand.
Commands that change in the cloud
- /clear doesn't work. Start a new session from the sidebar instead.
- /compact and /context work as usual.
- /model, /effort, /color and /rename need the value typed after them, like /model sonnet, because there's no picker.
- Terminal-only commands like /plugin and /resume aren't there.
Gotchas
- A teleported copy is its own copy. New work in your terminal stays local and doesn't show up on claude.ai or your phone. Run /remote-control in it if you want to keep steering from your phone.
- Idle sessions expire and the machine is taken back. Reopening one brings back the conversation, but not subagents or shell commands that were still running. The docs don't say how long idle is.
- --cloud and --remote-control are different things. Remote Control steers a session still running on your own machine.
- Organizations with Zero Data Retention, the HIPAA configuration or customer-managed keys can't use cloud sessions, and an org with an IP allowlist needs Anthropic support to exempt them.
- /desktop (alias /app) moves a terminal session into the Desktop app on this machine, not to the cloud. macOS and x64 Windows only.
Monkey believe in you. Now go build.
follow @nocodemonkey
More guides
Shortcuts most people missplus a cheat sheetMonkey only ever pressed Enter and Esc. Claude Code has way more keys hiding in it
Pluginsplus a plugin setupMonkey turn on one plugin. Now it eat tokens in every session
Permission rulesplus a safe rules setupMonkey wrote "never push" in CLAUDE.md. Claude Code doesn't enforce that. It enforces permission rules