Claude Code Cloud: How It Works, What It Costs, and When to Use Persistent Hosting

"Claude Code cloud" now means Anthropic's cloud sessions: GA since September 2026, managed VMs, no extra compute charge, task-scoped by design. Here is how they work, what the launch credits were, and what an always-on Claude Code instance looks like.

•

Published on

•

Claude Code Cloud: How It Works, What It Costs, and When to Use Persistent Hosting
Do not index
Claude Code cloud runs your coding agent inside an Anthropic-managed virtual machine you can reach from a browser at claude.ai/code, the Claude mobile app, the desktop app, or your terminal with claude --cloud. Sessions keep running after you close the tab. No separate VM fee applies; usage counts against your existing Claude plan. When you need a session that persists indefinitely across days and clients, a dedicated cloud host like Agent 37 Claude Code hosting from $4.76/mo closes the gap that native sessions leave open.
Quick answer: Claude Code cloud is Anthropic's native feature for running Claude Code in isolated, managed VMs accessible from any device. Sessions survive tab closes, connect to GitHub, and cost no extra beyond your plan. For always-on, multi-client, or agency use cases, persistent third-party hosting on Agent 37 from $4.76/mo adds isolation, BYOK, and white-label APIs that native sessions do not provide.
notion image
IMAGE TAG: Two engineers pair-programming while one watches Claude Code output in a browser terminal on a large monitor. Background detail: glass wall with printed sprint sticky notes, late afternoon light.

What is a Claude Code cloud session and what exactly runs in the cloud?

A Claude Code cloud session is an isolated Anthropic-managed Linux VM that clones your GitHub repository, runs the Claude Code agent, and streams output to whichever surface you are watching. Your local machine is not involved in execution. The VM has its own filesystem, network stack, and process space. When the session ends, Anthropic tears down the VM; nothing persists to the next session by default.
The session starts with your repo at head, executes tasks autonomously, can open pull requests, and can respond to CI results or reviewer comments without you sitting at a keyboard. Browser, iOS, Android, the Claude desktop app, and the terminal flag claude --cloud all reach the same running session. You are controlling a remote computer, not a chat window.

What runs in the cloud versus on your machine?

The entire agent runtime runs in the cloud VM: the Claude Code process, the cloned repository, shell commands, file edits, and git operations. What stays on your machine is only the terminal client when you use claude --cloud or /teleport, your local CLAUDE.md file (which Anthropic syncs into the session), and any locally installed tools listed in your project config. API keys never leave Anthropic's infrastructure during a cloud session.
[Book a 30 minute call with Agent 37](https://cal.com/vishnukool/30min)

How do I connect GitHub to Claude Code cloud?

Installing the Claude GitHub App is the required first step. Navigate to claude.ai/code, click Connect GitHub, and authorize the app for the repositories or organizations you want Claude to access. The app requests read access to repository contents, write access to pull requests and branches, and workflow scope to trigger and read CI runs.
Once the app is installed, your repositories appear in the session launcher. For Team and Enterprise plans, an admin installs the app once at the organization level and individual members inherit access. If no repositories appear after installation, confirm the app has been granted access to the correct org or repo from the GitHub App settings page, not just the Claude UI.
The /web-setup command, typed inside an active session, re-runs the GitHub authentication handshake if you need to add repositories mid-session or fix a broken connection.

What permissions does the GitHub App request and why?

The Claude GitHub App requests contents read, pull requests write, issues write, and workflows read. Contents read lets it clone the repo. Pull requests write lets it open and update PRs. Issues write lets it comment on reviews. Workflows read lets it check CI status and retry failed runs. It does not request admin permissions, secrets read, or org-wide write. You can revoke access at any time from GitHub Settings under Installed GitHub Apps.

How do I start a Claude Code cloud session from the browser, phone, or terminal?

From the browser, go to claude.ai/code, select a connected repository, type a task, and click Start cloud session. The session launches in a managed VM and streams output to the browser. From a phone, open the Claude app, tap the Code tab, and follow the same repo-plus-task flow. From the desktop app, choose Cloud instead of Local when starting a new session.
From a terminal on your local machine, run claude --cloud "your task description" inside a repository that is connected to GitHub. Claude Code authenticates through your existing Anthropic account, launches the cloud VM, and streams output back to your terminal. You can send follow-up messages in the same terminal session by typing normally after the initial task completes or while it is still running.

How do I pull a cloud session back into my local terminal?

Run claude --teleport from your local terminal, or type /teleport inside an active session in the browser or desktop app. Teleporting pulls the cloud session's current working state, including the repo and conversation context, into your local Claude Code process. From that point you control the agent locally. Teleporting does not delete the cloud session; it hands off control rather than copying files.

How do I configure a Claude Code cloud environment?

Cloud environments are configured in the Anthropic dashboard under Environments before you start a session or as a named environment you reuse across sessions. The four network access levels are: none (no outbound network), limited (Anthropic allowlist only), full (open internet), and allowed domains (you specify a list). Most coding tasks run on limited or allowed domains to restrict unexpected outbound calls.
Environment variables and secrets are added in the environment editor. Secrets are stored encrypted and injected at session start; they are not visible in session logs. Setup scripts run once when the VM boots, before Claude Code starts, and are cached after the first run unless you force a rebuild. Cached environments launch significantly faster on repeat use. Organizations on Team or Enterprise plans can mark an environment as org-shared, making it available to all members without each person reconfiguring it.

What are environment variables, network secrets, and setup scripts in Claude Code cloud?

Environment variables are plain key-value pairs injected into the VM shell, visible to any process. Network secrets are credentials that the security proxy uses to authenticate outbound requests to specific domains on your allowlist; they are never exposed as environment variables and do not appear in logs. Setup scripts are shell scripts that install dependencies, configure toolchains, or seed data before Claude starts. A well-written setup script cached on first run makes cold starts indistinguishable from warm starts for most workflows.

Is Claude Code cloud free, which plans include it, and does it use more tokens?

Claude Code cloud sessions are included in Claude Pro, Team, and Enterprise plans as of October 2026. There is no separate VM or compute charge; usage counts against the token limits of your existing plan. Free plan accounts cannot access cloud sessions. Running tasks in the cloud does not inherently use more tokens than the same task run locally; the model processes the same context either way. Long autonomous sessions do consume more tokens than short interactive ones regardless of where they run.
Claude Pro is priced at approximately $20 per month from Anthropic's pricing page. Team plans are priced per seat above the Pro base. Enterprise pricing is negotiated. No published source documents a hard per-session token cap specific to cloud; sessions are bounded by the plan's overall usage limits.

Claude Code cloud vs local: when should I use each?

Use cloud sessions when you need the agent to run while your laptop is off, when you are working on a phone or tablet, when you want PR automation without keeping a terminal open, or when you want session output shareable with a teammate. Use local when you need to access files that are not in a connected GitHub repo, when your work is offline or behind a firewall that blocks Anthropic, or when you prefer lower latency on fast iteration loops. Cloud and local are complementary; teleport moves you between them without losing context.
When you need sessions that persist for days rather than hours, serve multiple clients from isolated containers, or run under a white-label brand, Anthropic's native cloud sessions reach their limit. That is the gap that Agent 37's persistent Claude Code cloud hosting covers: always-on instances with BYOK, browser terminal, and agency provisioning APIs.
notion image

What are the session management options in Claude Code cloud?

Sessions have a permission mode set at launch: auto-approve (Claude acts without confirmation), confirm-each (Claude pauses before every file write or shell command), or review-only (Claude proposes changes and waits). You can switch modes during a session from the browser UI. Diffs are shown in a side panel before applying; you can approve, reject, or edit individual hunks.
Sessions can be shared by copying a session link from the browser UI. Shared sessions are read-only for the recipient; they see output but cannot send messages. Archiving a session removes it from your active list but retains the transcript. Deleting a session removes the transcript permanently. Queued messages sent to a session while it is at a confirmation gate can be retracted by clicking the retract button before Claude resumes.

How does Claude Code cloud handle pull requests and PR review automation?

When a cloud session completes a task, Claude can open a pull request directly from the session UI or from claude --cloud. The PR includes Claude's task description as the body and a link back to the session transcript. If a reviewer leaves comments or CI fails, Claude can re-enter the session, read the feedback, apply fixes, and push an updated commit, all without you opening a terminal. This loop is triggered either manually from the session UI or automatically on Team and Enterprise plans through the GitHub App webhook.

How long can a Claude Code cloud session run and does it keep running when I close the tab?

Sessions keep running after you close the browser tab or put your laptop to sleep. Anthropic has not published a hard wall-clock timeout for sessions as of October 2026. In practice, sessions that sit idle without an active task will pause; sessions with active tasks continue until the task completes or hits the plan's usage limit. You can reconnect to a running session by returning to claude.ai/code and selecting the session from your history.
Cloud sessions are not equivalent to a permanently on server. For workflows that must wake on a schedule, poll external sources, or serve agent output 24 hours a day without a user initiating each session, a persistent always-on host is the correct architecture. Agent 37's always-on AI agent hosting from $3.99/mo is purpose-built for that pattern: the instance never sleeps, files and memory survive between tasks, and you pay a flat monthly rate rather than per-session credits.

How does the security and isolation model work in Claude Code cloud?

Each cloud session runs in a separate sandboxed VM. The VM has no access to other users' VMs or to Anthropic's internal infrastructure beyond the APIs it is explicitly granted. Outbound network access is filtered by the security proxy according to the environment's network access level. GitHub access goes through a GitHub proxy that logs every API call the session makes; you can audit this log from the session detail view.
Your local CLAUDE.md file and project-level settings are synced into the session. Installed tools from your local Claude Code installation are not automatically available; you install them in the setup script instead. API keys you configure as network secrets are injected by the proxy and are never written to the VM filesystem in plaintext.

What data leaves my machine during a cloud session?

When you start a cloud session, Anthropic clones the GitHub repository you selected into the managed VM; no local files are uploaded unless you explicitly push them to the connected repo first. Your task description and follow-up messages are sent to Anthropic as conversation turns. CLAUDE.md is synced from your local config. Nothing else from your local machine is transmitted. To revoke all access, uninstall the Claude GitHub App from GitHub Settings and delete the session from claude.ai/code.

How do I troubleshoot common Claude Code cloud failures?

The four most common failures are session creation failed, no repositories appear, the "Claude Code isn't available on your account" error, and setup script failures. Session creation usually fails because the GitHub App is not installed or the repo is private and the app lacks access; reinstall the app and re-authorize the repo. No repositories appearing is almost always a GitHub App permission issue: go to GitHub Settings, find the Claude app, and confirm it has access to the correct repositories or organization.
"Claude Code isn't available on your account" means your plan does not include cloud sessions. Upgrade to Pro, Team, or Enterprise from Anthropic's pricing page. Setup script failures appear in the session log with an exit code; the most common cause is a package that is not available on the Ubuntu base image the VM uses or a missing environment variable the script depends on. Add missing variables to the environment editor and push a corrected script. If the session hangs during setup, open the session log, find the last output line, and confirm the package or command at that line is correct for the VM's architecture.
notion image
IMAGE TAG: A staff engineer reviewing Claude Code terminal output on a laptop in an open-plan office. Background detail: whiteboard with a half-erased system diagram, teammate walking past with a notebook.
[Book a 30 minute call with Agent 37](https://cal.com/vishnukool/30min)

When does persistent third-party hosting beat native Claude Code cloud sessions?

Anthropics native cloud sessions are strong for individual developers running tasks they can initiate manually. They do not support per-client container isolation, white-label branding, scheduled recurring jobs, or flat-rate billing that an agency can pass to a client. When those requirements appear, a persistent always-on host is the correct fit.
Agent 37 runs Claude Code on persistent, always-on instances from $4.76/mo per instance through the Agent 37 Cloud API. Instances use isolated containers, support BYOK so API keys go directly to Anthropic without passing through Agent 37, offer a browser-based terminal and live Linux desktop via noVNC, and connect to 1,000+ integrations through Composio. Agencies use the white-label provisioning API to spin up one instance per client and resell under their own brand. The case study from Vision shows how one team replaced AWS and Hetzner infrastructure, saved approximately $2,000 per month, and eliminated CPU bottlenecks by moving coding sessions to Agent 37 instances.
Gartner predicts 40% of enterprise apps will feature task-specific AI agents by 2026. Persistent cloud infrastructure is the production baseline when agents touch client repos around the clock rather than responding to manual prompts.

How do you deploy Claude Code on Agent 37 cloud?

Create an account at agent37.com, add a card and receive a $5 starter credit, then provision a Claude Code instance from the claude-code template with one click or one POST to the API. Configure your Anthropic API key as BYOK in the instance settings; Agent 37 never stores the key. Open the browser terminal or connect via SSH, and run Claude Code against the mounted workspace storage inside the isolated container. For agencies, the white-label dashboard lets you provision instances for clients through the same API without building a control plane.

How does Claude Code cloud pricing compare across options?

The table below compares as-of-October-2026 published pricing across the main options. Anthropic cloud sessions add no VM fee but are bounded by plan token limits. Agent 37 charges for compute (flat monthly) separately from model usage (BYOK to Anthropic). DIY VPS charges for compute but adds ops labor. Ephemeral sandbox APIs charge per minute and cost more than flat hosting for always-on workloads.
Option
Entry price
What you get
Persistence
BYOK
Anthropic cloud sessions (Pro)
~$20/mo
VM per session, GitHub integration, mobile/browser access
Session lifetime only
No (Anthropic bills plan)
Agent 37 (per instance)
$4.76/mo
Always-on container, browser terminal, live desktop, 1000+ integrations
Indefinite
Yes
Agent 37 managed
$3.99/mo
Managed OpenClaw/Hermes/Claude Code, dashboard, task board
Always-on
Yes
E2B
Usage-based
Ephemeral sandbox, API-driven
No
Varies
DIY VPS (Hetzner/GCP)
~$4 to $6/mo
Bare VM
Always-on
Yes, plus self-managed ops
For Agent 37 sandbox pricing details and provider comparison, the compute rate is $0.80 per vCPU, $0.70 per GB of RAM, and $0.09 per GB of disk per 730-hour month, metered by the minute. Compute pauses when a sandbox is stopped, so you only pay for active time.
McKinsey's agentic AI research frames persistent, production-grade runtimes as the infrastructure assumption behind enterprise agent rollouts, not a premium add-on.

Which buyer should use which Claude Code cloud option?

Native Anthropic cloud sessions fit solo developers who initiate tasks manually, work on GitHub-connected repos, and stay within Pro or Team plan token limits. Persistent hosting fits agencies, founders building products on top of Claude Code, and operators who need the agent running when they are asleep.
Buyer
Best fit
Reason
Solo developer, occasional tasks
Anthropic Pro cloud sessions
No extra cost, browser and mobile access, good GitHub integration
Solo developer, always-on scheduling
Agent 37 managed from $3.99/mo
Flat cost, never sleeps, no ops burden
Agency reselling coding agents
Agent 37 Cloud with white-label API
Per-client isolation, provisioning API, white-label dashboard
Platform engineer, custom stack
DIY VPS
Maximum control, existing toolchain
CI migration scripts
E2B or similar ephemeral sandbox
Clean slate per run, API-driven
Forrester notes enterprises accelerating AI agent adoption in software delivery patterns that assume shared infrastructure, not solo machines. Review queues and per-client isolation are requirements in those patterns, not optional features.
Forbes commentary on AI agents in business reinforces that production agent infrastructure needs audit trails and isolation, both of which Agent 37 provides through container boundaries and the task board.

Key facts at a glance

  • Claude Code cloud runs in Anthropic-managed VMs accessible from browser at claude.ai/code, the Claude mobile app, the desktop app, or via claude --cloud in the terminal.
  • Sessions keep running after you close the tab; reconnect from the session history at claude.ai/code.
  • No separate VM fee: cloud sessions count against your Claude Pro, Team, or Enterprise plan usage.
  • Pull cloud sessions back to local with claude --teleport or /teleport.
  • For always-on, multi-client, or agency workflows, Agent 37 persistent hosting starts at $3.99/mo managed or $4.76/mo per instance through the API.

FAQ

What is Claude Code cloud and what exactly runs in the cloud vs on my machine?
Claude Code cloud is Anthropic's feature for running the Claude Code agent inside an isolated, managed Linux VM. The entire agent process, cloned repository, shell commands, and git operations run in the cloud VM. On your machine, only the terminal client runs when you use claude --cloud or /teleport. Your local CLAUDE.md config syncs into the session; no other local files are uploaded unless you push them to the connected GitHub repo first.
How do I start a Claude Code cloud session from the web, phone, or terminal?
From the browser, go to claude.ai/code, pick a connected repository, enter a task, and click Start cloud session. From a phone, use the Code tab in the Claude app. From the desktop app, choose Cloud when starting a session. From a terminal, run claude --cloud "task" inside a GitHub-connected repo. All four entry points reach the same running VM and the same session history.
Can I switch a cloud session back to my local terminal?
Yes. Run claude --teleport from your local terminal or type /teleport inside an active browser or desktop session. Teleporting hands off control of the running session to your local Claude Code process without copying files or restarting the agent. The cloud VM does not shut down; it transfers control. You can teleport back to the browser at any time from the session UI.
Is Claude Code cloud free, and which plans include it?
Claude Code cloud sessions are included in Claude Pro (approximately $20/mo as of October 2026 per Anthropic's pricing page), Team, and Enterprise plans. Free accounts cannot start cloud sessions. There is no separate VM or compute charge; usage counts against the plan's token limits. Running a task in the cloud uses the same tokens as the same task run locally; longer autonomous sessions consume more tokens regardless of where they run.
How do I set up a cloud environment with network access controls and secrets?
Open the Environments section in the Anthropic dashboard before starting a session. Choose a network access level: none, limited, full, or allowed domains. Add environment variables for plain config and network secrets for credentials the security proxy injects at outbound calls. Write a setup script to install dependencies; it is cached after the first run for faster subsequent starts. On Team and Enterprise plans, mark the environment as org-shared so all members use the same baseline without reconfiguring individually.
When should I use persistent hosting instead of native Claude Code cloud sessions?
Use persistent hosting when you need the agent running on a schedule without manual initiation, when you serve multiple clients from isolated containers under a white-label brand, or when you need flat-rate billing you can pass directly to a client contract. Agent 37's always-on AI agent hosting from $3.99/mo covers those cases. Native Anthropic sessions are the better fit for individual developers running tasks they start and monitor themselves within a single account.
What are the session time limits for Claude Code cloud?
Anthropics native cloud sessions keep running after you close the browser tab and continue until the active task completes or the plan's usage limit is reached. There is no published hard wall-clock timeout as of October 2026. Idle sessions with no active task may pause. For workflows that must run continuously around the clock without a user initiating each session, a persistent always-on host is the correct fit because native sessions are task-scoped, not server-scoped.
[Book a 30 minute call with Agent 37](https://cal.com/vishnukool/30min)
Vishnu

Written by

Vishnu

Founder at Agent37, which runs managed hosting for OpenClaw and Hermes agents for 1,000+ users. Writes about what actually breaks when you leave an AI agent running.