Skip to content

Claude Code on the web

Run Claude Code sessions in the cloud, move work between terminal and cloud with --cloud and --teleport, share sessions and auto-fix pull requests.

A cloud session is ordinary Claude Code running on a VM instead of your machine. Anthropic manages the infrastructure by default, though your organisation can route sessions to a self-hosted environment. The session carries on when you shut the lid, and you can check in or steer from any device.

If you have never started one, do the cloud sessions quickstart first. This page is the working reference: moving work between terminal and cloud, managing and sharing sessions, auto-fixing PRs, and what to do when things break.

Note: Available on Pro, Max and Team plans, and for Enterprise users with premium seats or Chat + Claude Code seats.

Ways to start a cloud session

SurfaceHow
Browserclaude.ai/code
PhoneThe Code tab in the Claude mobile app
Desktop appChoose Cloud rather than Local when starting a session (desktop)
Terminalclaude --cloud "task"
AutomationEach run of a routine is a cloud session

For a body of work that needs many coordinated sessions, a project starts and tracks them for you. To steer a session that is running on your own machine from elsewhere, use Remote Control instead.

Environments

Every session runs inside a cloud environment: the saved bundle of network access level, environment variables and setup script. Onboarding gives you a Default environment with Trusted network access. When you have several, the environment selector picks which one a session uses; /remote-env in the CLI sets the default for sessions you launch from the terminal.

Connecting GitHub

Sessions clone from and push to GitHub. There are two ways to give them access:

MethodSet up byReachesChoose it when
Claude GitHub AppAuthorising during web onboarding and installing the appAny public repo, plus private repos the app is installed onYou onboard in the browser, or want auto-fix
/web-setupRunning /web-setup in the CLI, which uploads your gh tokenAnything your gh token can see, app or notYou are an individual developer who already lives in gh

Two features always need the app on the repository, whichever method you used: auto-fix, and threads inside a project.

On Anthropic-hosted environments your GitHub credentials stay encrypted server side and never enter the VM. Git traffic goes through a GitHub proxy that adds the credential on the way out.

Warning: Organisations with Zero Data Retention or the HIPAA configuration cannot use /web-setup or cloud sessions at all.

Quick setup (Team and Enterprise)

An Owner can switch on Quick setup under Organization settings > Claude Code. It is off by default. With it on:

  • /web-setup becomes visible to members;
  • browser onboarding stops prompting members to install the GitHub App;
  • onboarding creates the Default environment for members instead of showing a form.

From the terminal to the cloud

These flows need the Claude Code CLI signed in to the same claude.ai account.

claude --cloud "Add pagination to GET /v1/orders and update the OpenAPI spec"

That creates a new session for the current repository. The VM clones your GitHub remote at your current branch, not your working copy, so push local commits first. --cloud handles one repository per session. --remote still works as a deprecated alias.

While the container boots, the CLI shows a checklist (cloning, setup script and so on) and queues anything you type until the session is ready. Then open it on the web or phone to follow along. If Claude asks a question and you wander off, you can answer later, right up until the environment expires.

Note: --cloud and --remote-control are unrelated. The latter exposes a local session to the web and phone; see Remote Control.

Handoff from the CLI only goes one way. You can pull a cloud session down, but you cannot push an existing terminal session up. The desktop app is the exception: its Open in menu can send a local Code tab session to the cloud.

A pattern I use: plan here, execute there

For anything non-trivial, I plan locally first:

claude --permission-mode plan

Once the plan is right, I have Claude write it to the repo, commit and push, then fire it off:

claude --cloud "Implement docs/plans/orders-pagination.md, including tests"

Fan-out

Every --cloud call is an independent session, so parallel work is just several commands:

claude --cloud "Replace moment with date-fns in packages/web"
claude --cloud "Add a CHANGELOG entry template and CI check"
claude --cloud "Investigate why test_export_csv is flaky and fix it"

Uploading a local repo instead of cloning

Claude Code bundles and uploads your local repository, instead of cloning, when you run --cloud from:

  • a repo with no git remote, or
  • a github.com repo the Claude GitHub App is not installed on (even if you used /web-setup).

You can force this with CCR_FORCE_BUNDLE=1:

CCR_FORCE_BUNDLE=1 claude --cloud "Run the integration suite and fix failures"

That is also how you get a GitLab or Bitbucket repo into a cloud session, though the session cannot push back to that remote.

What goes into the bundle:

  • Full history across all branches, plus uncommitted changes to tracked files. Untracked files are left out; git add anything you need.
  • On macOS, Linux and WSL, uncommitted changes to credential-like files are kept back (.env, *.tfvars, id_rsa, *.pem and similar) along with LFS-managed files. A Left on this machine: notice lists them, and the session gets the committed version or nothing.
  • On native Windows, uncommitted tracked changes upload as-is regardless of name. Stash anything sensitive first.

Limits and requirements:

RuleDetail
Must be a git repoWith at least one commit
SizeUnder 100 MB. Larger repos fall back to the current branch only, then to a squashed working tree snapshot, then fail
git version2.31 or later on macOS, Linux and WSL
Pushing backOnly if your GitHub connection can push to that repo
Attribute settingsUpload is refused if it cannot follow a git setting that affects attributes, such as core.attributesFile from an included config

Unsupported layouts produce an error containing Not uploading this working tree:. Common causes: starting inside a submodule; clones made with --separate-git-dir, --shared or --reference; core.worktree set; refs in reftable format; a linked worktree with sparse checkout settings (including ones created via worktree.sparsePaths); or git config that includes a file inside the working tree. Start from the main checkout of a plain git clone. A partial clone (git clone --filter) uploads as a history-less snapshot, provided every tracked file is present locally.

The simplest way around all of this for a GitHub repo: push the branch, install the GitHub App, and rerun so the VM clones normally.

Sending follow-ups from any machine

Once a session is running you can post a message to it from any CLI logged in with claude auth login. No local state is involved.

claude -p "Once tests pass, open a draft PR titled 'Orders pagination'" --cloud session_01AbCdEf
echo "Also bump the API minor version" | claude -p --cloud https://claude.ai/code/session_01AbCdEf

The ID can be a bare session_... or cse_... ID or the session URL (scheme and query string optional). The command queues the message and exits, printing Sent to cloud session., the session ID and a view link. Add --output-format json for {ok, session_id, url} or {ok: false, session_id, error}. stream-json is not supported here.

Note: --cloud needs an Anthropic account. It is unavailable with Bedrock, Vertex and other third-party providers. A gateway configured only via ANTHROPIC_BASE_URL does not count as third-party, but you still need claude auth login. The organisation policy allow_remote_sessions must also be on.

From the cloud to your terminal

Pulling a session down is called teleporting. Any of these work:

  • claude --teleport for a picker, or claude --teleport <session-id> directly;
  • /teleport or /tp inside a running CLI session;
  • /tasks, then press t on a background session;
  • Open in > Terminal in the session menu on claude.ai/code, which copies the command;
  • typing /teleport inside the cloud session itself, which replies with the exact claude --teleport <id> command (needs v2.1.223 or later in the session environment).

Teleport checks the repo, fetches and checks out the session's branch, and loads the conversation. From then on the terminal has its own copy: new local work does not appear in the cloud session. Start /remote-control locally if you still want to steer from your phone.

--resume is different: it only reopens local history and never lists cloud sessions.

RequirementWhat it means
Clean working treeUncommitted changes must be stashed (you are prompted)
Same repositoryNot a fork. A mismatch names both repos. For remotes it cannot parse, such as SSH host aliases, it asks you to confirm and accepts a matching owner and name
Branch pushedThe session's branch must exist on the remote
Same accountSigned in to the account that owns the session

The branch fetch never prompts. If git or ssh would ask for a password, passphrase or new host confirmation, the fetch fails. Load your key into ssh-agent and run one manual git fetch beforehand.

If teleport is unavailable: API key users need /login with claude.ai; third-party providers are not supported; and if you are already on claude.ai, your organisation may have cloud sessions turned off.

Working inside a session

Permission modes

Choose the permission mode when creating the task and change it while the session runs. Cloud sessions offer Accept edits, Plan and Auto. When a session is revived (after its Anthropic-hosted environment expired, or after a self-hosted runner released it while idle) it resumes in the mode it was last in.

Reviewing diffs

The +N -M indicator opens the diff view. It compares against the base branch by default; Compare against changes that. Diffs come from raw git blobs, so repository diff drivers and textconv filters are ignored. Click lines to queue inline comments that ride along with your next message.

Commands and context

Text-output commands work. Terminal-only ones such as /plugin and /resume do not. Commands that open pickers behave differently:

  • /model, /effort, /color, /rename take the value as an argument, for example /model opus (needs v2.1.205 or later in the environment).
  • /fast toggles fast mode where your account has it (v2.1.271 or later).
  • /config on the web opens your Claude Code settings page and ignores any arguments. To change settings for cloud sessions, set environment variables on the environment or commit keys to a single repository's .claude/settings.json. See settings.
Context commandAvailableNotes
/compactYesAccepts focus text, e.g. /compact keep the migration notes
/contextYesShows what is in the window
/clearNoStart a new session from the sidebar

Cloud sessions set CLAUDE_AUTOCOMPACT_PCT_OVERRIDE themselves, so compaction fires partway through the auto-compact window and your own value for that variable is overridden. To influence compaction, set CLAUDE_CODE_AUTO_COMPACT_WINDOW in the environment, or use /autocompact with a token count where that variable is unset.

Subagents behave exactly as they do locally, including ones in .claude/agents/. Agent teams are off unless you add CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 to the environment's variables.

Recalling a queued message

Messages sent while Claude is busy queue up. Click the ✕ on a queued message to pull it back into the input box. Once Claude has read it, it stays.

Share sessions

Set the session's visibility, then send the link. Recipients see the state as of when they open it; it does not stream live.

Team and EnterprisePro and Max
Visibility optionsPrivate, Team (your claude.ai organisation)Private, Public (any signed-in claude.ai user)
Repo access checkOn by default, using the recipient's connected GitHub accountOff by default
Your nameShown to recipientsCan be hidden
Slack sessionsShared with Team visibility automaticallyn/a

On Pro and Max, check for private code or secrets before going Public. Sharing defaults (require repo access, hide your name) live under Settings > Claude Code > Sharing settings on claude.ai.

Archive and delete

  • Archive: hover over a session in the sidebar and click the archive icon. Archived sessions are hidden unless you filter for them.
  • Delete: either filter for archived sessions and use the delete icon, or open the session and choose Delete from the menu beside its title. You confirm first, and it cannot be undone.

Auto-fix pull requests

With auto-fix on, Claude subscribes to a PR's GitHub activity. When a check fails or a reviewer comments, it investigates and pushes a fix if the answer is clear. It needs the Claude GitHub App on the repository.

Turning it on:

  • PR made in a cloud session: open the CI status bar in the session and select Auto-fix.
  • From the terminal: on the PR's branch, run /autofix-pr (optionally with a prompt such as only fix lint and type errors). It finds the PR with gh pr view, starts a cloud session and enables auto-fix.
  • From the mobile app: ask Claude to watch the PR and fix CI failures and review comments.
  • Any PR: paste its URL into a session and ask Claude to auto-fix it.

It is a per-PR toggle; clear it in the CI status bar or tell Claude to stop.

How Claude handles events:

  • Clear, uncontroversial fix: it commits, pushes and explains in the session.
  • Ambiguous or architectural comment: it asks you first.
  • Duplicate or no-op event: it notes it and moves on.

Merge conflicts from a moving base branch do not generate a webhook, so ask Claude to rebase yourself. Claude may reply to review threads; those replies post under your GitHub account, labelled as coming from Claude Code.

Warning: If PR comments trigger automation in your repo (Atlantis, Terraform Cloud, workflows on issue_comment), Claude's replies can set it off. Audit that before enabling auto-fix, and avoid it on repos where a comment can deploy infrastructure.

Security and isolation

  • Isolated VMs per session on Anthropic-hosted environments. On self-hosted environments, isolation is your responsibility.
  • Network controls. Limited by default and can be disabled entirely; see cloud environments. Even with networking off, the session still talks to the Anthropic API, which is a possible exit path for data. Self-hosted sessions are restricted at your own boundary.
  • Credentials outside the sandbox. Git credentials and signing keys stay outside; a proxy authenticates with scoped credentials.
  • Network secrets. On Pro and Max with Anthropic-hosted environments, secrets you add to an environment are attached to matching requests outside the sandbox. Not yet on Team and Enterprise, and not on self-hosted.

Troubleshooting

General API errors such as 529 Overloaded or Prompt is too long are covered in the error reference.

Session creation failed or stuck provisioning. No VM could be allocated. Check status.claude.com, retry in a minute, and confirm GitHub can reach the repo.

Unable to get organization UUID, a message asking you to run claude auth login, or Error loading Claude Code sessions in the teleport picker. You are on an API key or stale credentials. Run claude auth login (or /login inside a session). Versions 2.1.274 to 2.1.289 phrased this as a longer message mentioning API key authentication not being sufficient.

Remote Control session expired or Access denied during teleport. Teleport rides the Remote Control infrastructure. Run /login, confirm the account, and if you see Remote Control may not be available for this organization, an Owner has not enabled cloud sessions.

Errors from --cloud <session-id> (prefixed Error: , delivery failures wrapped as failed to send message to cloud session <id>: <reason>):

Message starts withFix
Cloud sessions aren't available with <provider>Unset the provider config (e.g. CLAUDE_CODE_USE_BEDROCK) and claude auth login
Cloud sessions are disabled by your organization's policyAsk an admin to enable allow_remote_sessions
Couldn't verify your organization's policyNetwork problem fetching policy; retry
Attaching to an existing cloud session is not enabledYou forgot -p
Session not foundCheck the ID against the session URL
... is archived and cannot accept new messagesStart a new session

Environment expired. Idle sessions have their VM reclaimed; waiting on an MCP tool approval or MCP sign-in counts as idle. Reopen the session to get a fresh VM. Conversation history comes back; in-flight background work (subagents, shell commands) does not.

Limitations

  • Rate limits are shared with all your other Claude usage; parallel sessions burn through them faster. There is no separate VM charge.
  • Time limits apply to commands and SessionStart hooks (adjustable), and setup scripts are only cached if they finish in about five minutes.
  • Teleport only works into the same account.
  • GitHub only for cloning and PRs. GitHub Enterprise Server is supported on Team and Enterprise. Other hosts work via CCR_FORCE_BUNDLE=1 but cannot be pushed to.
  • IP allowlists. Anthropic-hosted sessions call the API from Anthropic's infrastructure, so an organisation IP allowlist makes every hosted session fail authentication. The same goes for Code Review and hosted routines. Ask Anthropic support to exempt hosted services.