Currently Available: Need a skilled Software Developer for your next project?
Categories
Coding Agents

How to Run Claude Code Entirely in the Cloud: Web Sessions vs. a Remote VM

You can run Claude Code on a remote machine, so your laptop does not need to hold the code, tools, or active session. The main choice is who runs that machine: Anthropic, you, or your organization. A remote virtual machine (VM) is a computer you access over a network; Anthropic’s web sessions also run in VMs, but Anthropic manages them.

For a browser-first workflow with little infrastructure to maintain, use Claude Code on the web. Run Claude Code’s command-line interface (CLI) on a VM you manage to choose its operating system and installed tools. You also control its network access and lifecycle. Organizations that want browser-started sessions on their own infrastructure can also consider Anthropic’s self-hosted environments. In all three cases, running code remotely does not mean that the model’s work of generating responses, called inference, or every piece of session data stays on the remote machine.

The three ways to run Claude Code remotely

People use the phrase “remote Claude Code session” for several different arrangements. For a web session, Anthropic sets up and manages the machine that runs Claude Code. With a VM you manage, you install and run the CLI on your own machine. Anthropic’s Remote Control feature can connect a browser or phone to the session, while Claude Code continues to run on its existing machine.

Option Where Claude Code runs Who operates the machine Best fit
Claude Code on the web An Anthropic-managed VM Anthropic Starting work from a browser with minimal infrastructure setup
CLI on a remote VM A VM you configure You or your organization Custom tools, network access, and control over the host
Self-hosted environment Organization-provisioned infrastructure using runners Your organization Browser-started sessions that run on company infrastructure

These differences affect repository access, network boundaries, and who handles maintenance. The product documentation describes features and controls, but does not provide a controlled comparison of speed, reliability, coding quality, or total cost.

What happens in a Claude Code web session

At claude.ai/code, you connect a code repository and give Claude a task. Anthropic provisions a cloud environment, downloads a working copy of the repository and runs Claude Code there. You can watch the session in a browser or supported Claude app, close your laptop while the session continues, and later move the work to a terminal with --teleport. Anthropic says the cloud VM has no separate charge; sessions count against the account’s usage limits. Check the current cloud session documentation for plan eligibility and organizational access rules.

For the usual GitHub workflow, the cloud environment starts from the remote branch. Unpushed commits and other local changes are therefore not automatically included. Anthropic also documents a repository bundle upload option for some local work, with platform-specific handling of uncommitted files. If the changes you need are only on your laptop, push them to the repository or check the documented bundle behavior before starting the cloud session.

The cloud environment uses saved settings for network access, environment variables (named values that programs read), and setup scripts. A default environment starts with limited network access, so project dependencies and permitted external services may require configuration. The cloud environment does not automatically include the tools or settings on your laptop.

A cloud session can outlast the laptop connection, but it does not run indefinitely. Anthropic says an inactive session can expire and its VM can be reclaimed. The conversation history returns when you reopen the session, but background work still running or pending when Anthropic reclaims the VM does not. Before starting a long-running task, plan for the session to expire and save important work to the repository.

What changes when you use your own VM

With a VM you manage, you choose the computer and prepare its operating system and required software. You also copy the repository to it, set up credentials, and run the Claude Code CLI there. SSH (Secure Shell) gives you a secure connection to the VM’s terminal. You are responsible for keeping the machine and Claude Code process available, as well as deciding how the host recovers after a restart.

Anthropic’s Remote Control feature lets you continue a session from a browser or phone while Claude Code still runs on its host. That host can be a remote VM, but it must remain on and the claude process must keep running. If the host or its network connection goes down, the session becomes unavailable until the machine returns. Remote Control is documented for subscription authentication, rather than API-key authentication, and does not support every third-party provider or gateway configuration.

A VM gives you control over installed tools, storage, network routes, and access to internal services. That control also makes you responsible for security and reliability: restrict access, protect credentials, patch the host, isolate the workspace, and decide what to back up. A VM’s location and configuration do not by themselves guarantee that the setup meets your organization’s security or compliance requirements.

When an organization runs the sessions

Anthropic’s self-hosted environments offer another option: users start sessions from supported Claude surfaces, while organizational runners, the machines that run the sessions, use infrastructure the organization sets up and operates. Anthropic announced the feature in public beta on August 6, 2026, for Team and Enterprise availability. Because availability and eligibility can change, check the current self-hosted environment details before planning a rollout.

This option keeps some files and computing on the organization’s infrastructure, but session content still leaves its network. Anthropic says repository checkouts, build artifacts, secrets, and files created or changed in sessions stay on the organization’s infrastructure. Prompts, responses, and tool results, including code Claude reads, still go to Anthropic for inference. Anthropic also says the feature is off by default and unavailable to organizations using Zero Data Retention. Before enabling the feature, organizations should check that these data flows and eligibility rules meet their requirements.

Choose based on who should operate the environment

Choose Claude Code on the web to start from a browser without maintaining a VM. It suits work based on a GitHub branch when the project’s required software fits the cloud environment. Remember that sessions consume account usage, can expire after inactivity, and do not automatically include unpushed local changes.

Run the CLI on a VM you manage when you need to choose the machine’s setup, access an internal network, or control the machine and its files. Before relying on browser or phone access, confirm that Remote Control works with your authentication and provider setup, and decide how the VM and CLI process will stay available.

Consider self-hosted environments when your organization wants users to start sessions from supported Claude surfaces, but wants those sessions to run on its own infrastructure. Someone in the organization must set up and maintain the runners. Session content still goes to Anthropic for inference. No option is more secure for every organization. Compare where data goes and who maintains the machines against your organization’s requirements.

What I'm building

Delegate tasks. Get software.

Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.

Take a look at vroni.com

Email updates

Usually a new article and a few links I found interesting.

No spam. Unsubscribe with one click.

Leave a Reply

Your email address will not be published. Required fields are marked *