A Claude Code cloud session runs on a virtual machine that Anthropic manages instead of on your computer. You start one from your terminal with claude --cloud and pull it back into your terminal with claude --teleport. It keeps going after you close your laptop, and you can check on it from claude.ai/code or the Claude mobile app. Since v2.1.274, /status, /web-setup and the teleport messages say âcloud sessionâ instead of âClaude Code on the webâ.
A /code-review ultra review also runs as a cloud session, see the article on code review. For the SessionStart hooks mentioned below, read what hooks are in Claude Code.
How do I start a cloud session from the terminal?
Pass the task to --cloud. Each command creates its own session, and they run in parallel.
claude --cloud "Fix the flaky test in auth.spec.ts"
claude --cloud "Update the API documentation"
The VM clones your current directoryâs GitHub remote at your current branch, not your local checkout, so push your commits first. If the branch isnât on GitHub, the terminal prints Branch <name> is not on GitHub and names the point the session starts from instead. --cloud works with one repository at a time, and --remote still works as a deprecated alias.
To clone private repositories, connect GitHub through the Claude GitHub App or with /web-setup, which sends your local gh CLI token to your Claude account. When the app isnât installed on the repository, Claude Code uploads a bundle of your local repository instead, and untracked files arenât in it.
On the branch of an open PR, /autofix-pr starts a cloud session that watches the PR and pushes a fix, when one is clear, after a CI failure or a review comment. It needs the gh CLI and the Claude GitHub App on the repository.
How do I send a follow-up to a running session?
Pass the session ID to --cloud, together with -p.
claude -p "Also add a test for the empty case" --cloud <session-id>
The CLI queues the message and exits without waiting for a reply. The ID looks like session_... or cse_..., and the sessionâs claude.ai/code/<id> URL works too. The command runs from any machine signed in with claude auth login, a CI script included.
How do I pull a cloud session into my terminal?
claude --teleport opens a session picker, and claude --teleport <id> resumes one session directly. Inside a running CLI session, /teleport or /tp opens the same picker, and t in /tasks does the same. Claude checks the repository, then fetches the branch and the conversation history.
| Requirement | Details |
|---|
| Clean git state | No uncommitted changes, teleport offers to stash them |
| Same repository | A checkout of the sessionâs repository, not a fork |
| Branch pushed | The sessionâs branch must be on the remote |
| Same account | The claude.ai account that ran the session |
Your terminal gets its own copy of the session, and work you do locally doesnât show up on claude.ai. From the CLI, you canât push an existing local session to the cloud.
What is a cloud environment?
Itâs the saved configuration that sets network access, environment variables and the setup script. If you donât have one yet, onboarding sets up a Default environment with Trusted network access, either by creating it or by asking you to. Each session gets a fresh Ubuntu 24.04 VM with roughly 4 vCPUs, 16 GB of RAM and 30 GB of disk.
| Level | Outbound connections |
|---|
| None | None through the sessionâs network |
| Trusted | Allowlisted domains: package registries, GitHub, cloud SDKs |
| Full | Any domain |
| Custom | Your own allowlist, with or without the defaults |
GitHub, MCP connectors and the Anthropic API stay reachable even at None, because they donât go through that allowlist. To pick the environment your claude --cloud sessions use, run /remote-env in your terminal.
How do I prepare the VM with a setup script?
The script runs as root before Claude Code launches, the first time you start a session in an environment. It has to exit with code 0, or the session fails to start.
#!/bin/bash
apt update && apt install -y shellcheck
If it finishes in roughly five minutes, Anthropic snapshots the filesystem, and later sessions start from that snapshot without running the script again. The cache rebuilds when you change the script or the allowed hosts, and after about seven days. Since v2.1.310, a Choose file button loads the script from a file of up to 64 KB.
For a step that should also run locally, like npm install, use a SessionStart hook in the repositoryâs .claude/settings.json instead. CLAUDE_CODE_REMOTE is set to true inside the VM, so your script can exit right away on your laptop.
if [ "$CLAUDE_CODE_REMOTE" != "true" ]; then
exit 0
fi
Which parts of my setup reach the cloud?
The session starts from a fresh clone, so whatever you committed comes along: CLAUDE.md, .claude/rules/, the skills, agents and commands under .claude/, and the hooks in the repositoryâs .claude/settings.json. Your personal ~/.claude folder stays on your machine. MCP servers added at local or user scope donât come along either, so add them with claude mcp add --scope project and commit .mcp.json. Plugins turned on in the repositoryâs settings arenât installed.
To keep personal preferences out of the repository, have the setup script write ~/.claude/CLAUDE.md in the VM.
Who can use cloud sessions, and what do they cost?
Cloud sessions are available on Pro, Max and Team, and on Enterprise with a premium seat or a Chat + Claude Code seat. You need to sign in with a claude.ai account, so an API key or a third-party provider like Amazon Bedrock wonât do. Organizations with Zero Data Retention or the HIPAA configuration canât use them.
Thereâs no separate charge for the VM. Sessions count toward your planâs usage limits along with the rest of your usage, and parallel sessions use those limits up proportionally faster.
Section 8.4 of module 8, IDE, tools and practical cases covers the Desktop app and the web interface. Module 15, GUI, Cowork and Chrome goes through claude.ai/code and moving a web session to your terminal with teleport.