Skip to content

Claude Code Cloud Sessions: Web, --cloud, and Teleport

Core Concept LearningAugust 18, 202613 min readUpdated October 17, 2026

A cloud session is a Claude Code session that runs on a virtual machine Anthropic manages instead of on your laptop. You start it from [claude.ai/code](https://claude.ai/code), the Claude mobile app, the desktop app, or the terminal with claude --cloud. It clones your GitHub repository, works on its own branch, keeps running after you close the tab, and pushes the branch for you to review.

That makes cloud sessions good for tasks you can describe well and do not need to steer constantly: a flaky test, a documentation update, a well-specified refactor, or several of those in parallel. It also makes them different from a local session in ways that catch people out: only what is committed to the repository is available, network access is limited by default, and secrets need special handling.

This guide follows Anthropic's cloud-session documentation: setup, environments and network access, setup scripts, what carries over from your machine, moving work between terminal and cloud, auto-fixing pull requests, and the limits. For the local alternatives, see Claude Code Desktop App and Getting Started with Claude Code.

A cloud session clones your GitHub repository into an isolated VM, runs your setup, works, and pushes a branch for review
A cloud session clones your GitHub repository into an isolated VM, runs your setup, works, and pushes a branch for review

Requirements and first setup

Cloud sessions are available on Pro, Max, and Team plans, and to Enterprise users with premium seats or Chat + Claude Code seats. They count toward your plan's usage limits like any other Claude usage; there is no separate charge for the VM.

Setup is a one-time GitHub connection, in one of two ways:

  • Claude GitHub App: authorise it during onboarding at claude.ai/code. Sessions can clone any public repository, and private repositories where the app is installed. The app is also what enables auto-fix for pull requests.
  • /web-setup: run it inside the Claude Code CLI to send your local gh token to your Claude account. Sessions can then reach any repository that token can access, without installing the app.

Onboarding then creates a Default environment with Trusted network access (or asks you to create it on Team and Enterprise plans). Pick a repository and branch, choose a permission mode, and describe the task. Cloud sessions offer Auto, Accept edits, and Plan; there is no Manual or Bypass mode, because nobody is at the VM to approve prompts.

Quick reference

  • On Team and Enterprise, an Owner must turn on the GitHub connector before members can sign in with GitHub. /web-setup is hidden until an Owner enables Quick setup.
  • Organisations with Zero Data Retention, the HIPAA configuration, or customer-managed encryption keys cannot use cloud sessions.
  • If your organisation uses IP allowlisting for Claude, Anthropic-hosted cloud sessions fail authentication until support exempts Anthropic-hosted services.
  • Be specific in the task: name the file or test, paste the error, and describe the expected behaviour. Nobody is there to answer clarifying questions quickly.

Remember this

Connect GitHub once, keep the Default environment for a first try, and write the task as if you will not be around to clarify it.

Environments, network access, and secrets

Every cloud session runs in a cloud environment: a saved configuration for network access, environment variables, network secrets, and a setup script. The VM itself is Ubuntu 24.04 on x86_64, with common toolchains pre-installed and approximate limits of 4 vCPUs, 16 GB of RAM, and 30 GB of disk.

Network access has four levels:

  • None: no outbound access through the session's network.
  • Trusted (the default): an allowlist of package registries, GitHub, and cloud SDKs.
  • Full: any domain.
  • Custom: your own allowlist, optionally with the defaults.

At every level, a few paths bypass the allowlist: GitHub through its own proxy, MCP connectors you enable, hosts listed on network secrets, and the Anthropic API for Claude Code's own requests, even at None. So "None" does not mean data cannot leave the VM.

Environment variables are not secret. Anyone who uses the environment can read them and the setup script, and every command Claude runs can read them. For API keys, use a network secret: Anthropic's proxy attaches the key to requests for the hosts you list after they leave the VM, so the key never enters the session. Your GitHub credentials are handled the same way, through the GitHub proxy.

Quick reference

  • Changes to environment variables reach an existing session only when its VM is restored or rebuilt. To use a new value now, set it on the command or start a new session.
  • Interactive logins such as AWS SSO cannot run in a cloud session. Use a network secret or a Remote Control session on your own machine.
  • Commands Claude runs use the Bash tool defaults: 2 minutes for foreground commands, extendable to 10, then moved to the background for up to 30 more minutes.
  • For workloads beyond the VM limits, Anthropic suggests Remote Control on your own hardware or a self-hosted environment.

Remember this

Pick the narrowest network level that works, put keys in network secrets, and treat environment variables as visible to everyone.

Setup scripts, caching, and SessionStart hooks

A setup script is a Bash script, set in the environment dialog, that runs as root before Claude Code launches. Use it to install what the VM lacks:

1#!/bin/bash2apt update && apt install -y shellcheck3pip install -r requirements-dev.txt || true

It has three rules. It must exit zero, or the session fails to start (append || true to non-critical steps). It must finish in roughly five minutes, or the environment is not cached. And installs need network access, so a None-level environment cannot use package managers.

When setup finishes in time, Anthropic snapshots the filesystem and new sessions start from that snapshot, skipping the script. The cache keeps files, packages, and Docker images, but not running processes, so a database the script started is not running in the next session. The script runs again when you change it or the allowed hosts, and when the cache expires after roughly seven days.

For project setup that should happen in local and cloud sessions alike, such as npm install, use a SessionStart hook in the repository's .claude/settings.json instead. It runs after Claude Code launches, on every session including resumed ones.

Quick reference

  • Run independent installs in parallel with & and wait to stay under the five-minute budget.
  • Move one very large download into a SessionStart hook that starts it in the background, so the session becomes usable while it finishes.
  • Add set -x to a failing setup script to see which command failed.

Remember this

Setup scripts provision the VM and get cached if fast; SessionStart hooks do project setup everywhere.

What carries over from your setup

A cloud session starts from a fresh clone. Anything committed to the repository is available; anything that lives only on your machine is not.

Available: the repo's CLAUDE.md, .claude/rules/, .claude/skills/, .claude/agents/, and .claude/commands/; hooks and permission rules in .claude/settings.json; MCP servers in .mcp.json (in a session with one repository); and your organisation's server-managed settings.

Not available: your ~/.claude/CLAUDE.md, user-level skills, agents, and settings; MCP servers added with claude mcp add at the default local or user scope; plugins, even ones the repo's settings enable; managed settings deployed to your laptop by MDM; and interactive logins.

The fix is usually to commit the configuration. Add an MCP server with claude mcp add --scope project so it lands in .mcp.json, and move skills you want everywhere into the repository's .claude/skills/. Skills you enable on claude.ai also load in cloud sessions.

What a cloud session gets from your setup: what is committed to the repo carries over, what lives only on your machine does not
What a cloud session gets from your setup: what is committed to the repo carries over, what lives only on your machine does not

Quick reference

  • Hooks committed in the repo run in cloud sessions. Review them before starting a cloud session on a repository you did not write.
  • Transport variables such as NODE_EXTRA_CA_CERTS in the repo's settings env block are ignored, because the hosting environment manages the API connection.
  • Endpoint-managed policy does not reach cloud sessions. Organisations that need policy there must also use server-managed settings.

Remember this

If a cloud session behaves differently from your laptop, look for configuration that only exists in your home directory.

Move work between the terminal and the cloud

From the CLI, signed in with the same claude.ai account:

1# start a new cloud session for the current repository2claude --cloud "Fix the flaky test in auth.spec.ts"3 4# several independent tasks run in parallel, one session each5claude --cloud "Update the API documentation"6 7# queue a follow-up into a running session and exit8claude -p "also add a regression test" --cloud <session-id>9 10# pull a cloud session into this terminal11claude --teleport            # picker12claude --teleport <session-id>

--cloud clones your current directory's GitHub remote at the current branch, not your local checkout, so push local commits first. If the repository has no remote, or the GitHub App is not installed on it, Claude Code uploads a bundle of the local repository instead (under 100 MB, committed history plus uncommitted changes to tracked files, never untracked files). On macOS, Linux, and WSL, uncommitted changes to files that look like credentials, such as .env, *.tfvars, or id_rsa, are left out of the upload.

--teleport checks that your working tree is clean, that you are in a checkout of the same repository (not a fork), that the session's branch has been pushed, and that you use the same account. It then checks out the branch and loads the full conversation. The terminal gets its own copy: new work there does not appear in the cloud session.

Moving work between terminal and cloud: --cloud starts a new cloud session, --teleport pulls a cloud session into your terminal
Moving work between terminal and cloud: --cloud starts a new cloud session, --teleport pulls a cloud session into your terminal

Quick reference

  • A useful pattern: plan locally with claude --permission-mode plan, commit the plan file, push, then claude --cloud "Execute the plan in docs/plan.md".
  • Handoff from the CLI is one-way. You cannot push a running terminal session to the cloud; the desktop app's Open in menu can send a local Desktop session there.
  • --cloud and --teleport need a claude.ai login. They do not work with an API key or on Bedrock, Google Cloud, or Foundry.
  • On native Windows, uncommitted changes upload as they are whatever the file name, so stash anything sensitive before claude --cloud.

Remember this

Push before --cloud, keep the tree clean before --teleport, and remember the terminal copy diverges from the cloud one.

Review, pull requests, and auto-fix

Each session shows a diff indicator such as +42 -18. Open it to review changes against the base branch (or any branch you pick with Compare against), click lines to leave inline comments, and send them with your next message. When the diff looks right, Create PR opens a full or draft pull request. The session stays live afterwards, so you can paste CI failures or reviewer comments and keep going.

Auto-fix goes a step further: Claude subscribes to the pull request's GitHub activity, and when a check fails or a reviewer comments, it investigates and pushes a fix if one is clear. Ambiguous or architecturally significant comments come back to you as questions. Turn it on from the CI status bar in the session, with /autofix-pr in the CLI on the PR's branch, or by asking Claude to watch a PR. It requires the Claude GitHub App on the repository.

Two cautions from the docs. Auto-fix cannot react to merge conflicts, because GitHub sends no event when the base branch moves; ask Claude to rebase. And Claude's replies on review threads are posted with your GitHub account (labelled as Claude Code), which can trigger comment-driven automation such as Atlantis or issue_comment workflows.

Quick reference

  • Disable auto-fix on repositories where a PR comment can deploy infrastructure or run privileged operations.
  • On Team and Enterprise, sessions can be shared with Team visibility; on Pro and Max, Public visibility makes a session visible to any logged-in claude.ai user, so check it for credentials first.
  • /clear does not work in cloud sessions; start a new session from the sidebar. /compact and /context do work.

Remember this

Review the diff with inline comments, then let auto-fix handle CI and review churn, except where comments trigger deployments.

Limits to plan around

Cloud sessions share rate limits with the rest of your Claude usage, so five parallel sessions use limits five times as fast. Idle sessions pause after a few minutes and their VMs can be reclaimed; reopening provisions a fresh VM with the conversation restored, but background work such as running subagents or shell commands is lost.

Repository cloning and pull requests require GitHub (GitHub Enterprise Server is supported on Team and Enterprise). GitLab or Bitbucket code can be sent as a bundle with CCR_FORCE_BUNDLE=1, but the session cannot push results back to that remote. And because the session runs on Anthropic's infrastructure, it cannot reach services that exist only on your network unless they are reachable from the internet and allowed by the environment.

Cloud sessions compared with a local session
Cloud sessionLocal session
Code runs onAnthropic-managed VM (or a self-hosted runner)Your machine
Uses your local configNo, repository onlyYes
Requires GitHubYes, or a local bundle via --cloudNo
Keeps running if you disconnectYesNo
Permission modesAuto, Accept edits, PlanAll modes in the terminal
NetworkConfigurable per environmentYour machine's network

Quick reference

  • For work that needs your local tools, services, or network, use a local session, optionally with Remote Control to steer it from your phone.
  • A question Claude asks while you are away waits until you answer, up to environment expiry.
  • Check status.claude.com if sessions fail to start with Session creation failed.

Remember this

Use cloud sessions for self-contained GitHub work; keep anything that depends on your machine or network local.

Hands-on: one task, three ways

Use a GitHub repository with a test command and a small open issue.

1. Connect GitHub at claude.ai/code (or run /web-setup), keep the Default environment, and start a session on the issue in Plan mode. Approve the plan. 2. When the branch is pushed, open the diff, leave one inline comment, and send it. Create a draft PR. 3. In a local checkout, commit and push a small change, then run claude --cloud "add a test for <function>" and watch the setup checklist. 4. When that session finishes, run claude --teleport, pick it, and run the tests locally. 5. Add a setup script that installs one tool your project needs, start a new session, and confirm the tool is available. Start another session and confirm it starts faster from the cache.

Pass criterion: the PR contains the change and your inline comment's fix, the teleported branch passes tests locally, and the second session after the setup script skips the setup step.

Quick reference

  • If --cloud uploads a bundle instead of cloning, the GitHub App is not installed on the repository; that is fine for practice.
  • If teleport refuses, run git status: uncommitted changes or a fork checkout are the usual causes.
  • Archive the practice sessions afterwards; delete them if they contain anything sensitive.

Remember this

Try the browser, --cloud, and --teleport once each so you know which fits which task.

Key takeaway

Cloud sessions run Claude Code on an isolated Ubuntu VM against your GitHub repository, keep working after you leave, and hand back a branch to review. Their behaviour follows from that: only committed configuration carries over, network access is set per environment (Trusted by default, with a few paths that always bypass it), environment variables are visible to everyone while network secrets stay outside the VM, and setup scripts are cached when they finish in about five minutes.

From the terminal, claude --cloud starts sessions from your pushed branch and claude --teleport brings one back with its history. Auto-fix can then keep a pull request green, as long as comment-triggered automation is not at risk. For the hooks a repository can run in these sessions, see Claude Code Hooks; for scheduling cloud sessions, see Claude Code Routines.

Practice (45 min): run the five steps above, then write down which of your recurring tasks are self-contained enough to send to the cloud.

Share:

References

  1. Claude Code docs: Use Claude Code in the cloud — checked Oct 17, 2026
  2. Claude Code docs: Get started with cloud sessions — checked Oct 17, 2026
  3. Claude Code docs: Configure cloud environments — checked Oct 17, 2026
SH

Shoaib Hossain

Lead Author & Systems Architect

Software engineer and distributed systems architect specializing in backend scalability, cloud-native infrastructure, databases, and AI engineering workflows. Author and maintainer of Core Concept Learning.

Human-Engineered & Fact-CheckedOriginal Visual DiagramsEditorial Standards →Send Feedback

Related Articles

Mention @Claude with a coding task in a Slack channel and Claude can start a Claude Code cloud session, work on one of y…

Read

A routine is a saved Claude Code job: a prompt, one or more GitHub repositories, a cloud environment, and a set of conne…

Read

There is no separate Claude Code mobile app. The Claude app for iOS and Android has a Code tab, and it is a client: no c…

Read

Explore this topic

Keep learning

Follow a structured path or browse all courses to go deeper.