Use Claude Code in the cloud - Claude Code Docs
Documentation Index Fetch the complete documentation index at: /docs/llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. Cloud sessions are available on Pro, Max, Ultra, and Team plans, and for Enterprise users with premium seats or Chat + Claude Code seats. If custom roles govern your access, you also need a role with the cloud sessions permission to start sessions on Anthropic’s infrastructure from the browser, apps, or terminal.
Ask an Owner to add it to one of your roles at Organization settings > Roles . A cloud session is a Claude Code session that runs on cloud infrastructure instead of on your machine. By default it runs on infrastructure Anthropic manages, or on your organization’s self-hosted environment when routed there. The session keeps running after you close your laptop, and you can check on it or steer it from any device. It counts toward your plan’s usage limits alongside the rest of your Claude and Claude Code usage, and there’s no separate charge for the cloud VM.
To let cloud sessions clone your code from GitHub and push branches, connect GitHub with one of the GitHub connection methods . If your repository is on GitLab, Bitbucket, or another host, see Platform restrictions for what works. You can start a cloud session from any of these surfaces: Browser : claude.ai/code , also called Claude Code on the web Mobile : the Code tab in the Claude app Desktop app : select an environment under Cloud in the environment selector when you start a session Terminal : claude --cloud Cloud scheduled tasks : scheduled and triggered runs each run as a cloud session Once you’re set up, use this page to move work between your terminal and the cloud, manage and share sessions, turn on auto-fix for pull requests, and troubleshoot.
These cases are covered on other pages: Starting your first cloud session : Get started with cloud sessions connects GitHub and walks through a task in the browser Many cloud sessions for one body of work : a project has Claude start and keep track of them for you Steering a local session from another device : sessions in your terminal, IDE, or the Desktop app with Local selected run on your machine, and Remote Control lets you reach them from your phone or browser Cloud environments Every cloud session runs in a cloud environment , the saved configuration that controls network access, environment variables, and setup scripts.
Your first environment : if you don’t have one yet, onboarding sets up a Default environment with Limited network access . See The Default environment for how that works on your plan Which environment a session uses : see The Default environment for how sessions choose an environment when you have more than one Change what sessions can reach or run at startup : see Configure cloud environments What’s installed without any configuration : see Installed tools GitHub authentication options Cloud sessions need access to your GitHub repositories to clone code and push branches.
You can grant access in two ways: Method How you connect Repositories sessions can reach Best for GitHub App Authorize the Claude GitHub App during web onboarding Any public repository, and private repositories that the Claude GitHub App is installed on Browser onboarding; teams that want Auto-fix /web-setup Run /web-setup in your terminal to send your local gh CLI token to your Claude account Any repository your gh token can access, whether or not the Claude GitHub App is installed Individual developers who already use gh These features depend on the Claude GitHub App being installed on the repository: Auto-fix : installing the Claude GitHub App on a repository also enables Auto-fix for pull requests in it Projects : threads in a project need the Claude GitHub App installed on each repository they clone, whichever method you connected with.
See Set up GitHub access In Anthropic-hosted environments, your GitHub credentials stay encrypted on Anthropic’s servers and never enter a session’s VM. GitHub operations from the VM go through the GitHub proxy , which attaches the credential on the server side. See Connect from your terminal for the /web-setup walkthrough, including what /web-setup stores and how to remove it. Organizations with Zero Data Retention enabled, or with the HIPAA configuration applied, can’t use /web-setup or other cloud session features.
Organizations that use customer-managed encryption keys (CMEK) can’t start cloud sessions either. Quick setup for Team and Enterprise Quick setup is an organization setting that removes steps from members’ GitHub and environment setup. On Team and Enterprise plans it’s off by default. Here’s what changes for members when it’s on: /web-setup : members can connect GitHub with /web-setup . While the setting is off, the command is hidden GitHub App prompt : browser onboarding skips the Claude GitHub App install prompt First environment : browser onboarding creates the Default environment for members instead of showing the environment form An Owner turns it on with the Quick setup toggle at Organization settings > Claude Code .
Move tasks between terminal and cloud These workflows require the Claude Code CLI signed in to the same claude.ai account. You can start new cloud sessions from your terminal, or pull cloud sessions into your terminal to continue locally. Cloud sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude mobile app. From the CLI, session handoff is one-way: you can pull cloud sessions into your terminal with --teleport , but you can’t push an existing terminal session to the cloud.
The --cloud flag with a task description creates a new cloud session for your current repository; with -p and a session ID or claude.ai/code URL it instead queues a message into that existing session . The Desktop app can send a local session in its Code tab to the cloud from its Open in menu. Start a cloud session from your terminal Start a cloud session from the command line with the --cloud flag: claude --cloud "Fix the authentication bug in src/auth/login.ts" This creates a new cloud session on claude.ai.
The cloud VM clones your current directory’s GitHub remote at your current branch, not your local checkout, so push first if you have local commits. See Send local repositories without GitHub for the cases where Claude Code uploads your local repository instead of cloning. If the terminal prints Branch <name> is not on GitHub , see Branch is not on GitHub . --cloud works with a single repository at a time. The task runs in the cloud while you continue working locally.
The older --remote spelling still works as a deprecated alias for --cloud . While the cloud container starts, the CLI shows a live checklist of setup steps, such as cloning the repository and running your setup script . It queues messages you type during provisioning and sends them once the session is ready. --cloud creates cloud sessions. --remote-control is unrelated: it lets you monitor and steer a local CLI session from claude.ai or the Claude app.
See Remote Control . Open the session on claude.ai or the Claude mobile app to check progress or interact directly. From there you can steer Claude, provide feedback, or answer questions as in any other conversation. If Claude asks a question and the session sits idle, you can still answer when you come back, up to environment expiry , and the session continues from your answer. Tips for cloud tasks Plan locally, execute in the cloud : for complex tasks, start Claude in plan mode to collaborate on the approach, then send work to the cloud: claude --permission-mode plan In plan mode, Claude reads files, runs commands to explore, and proposes a plan without editing source code.
Once you’re satisfied, save the plan to the repo, commit, and push so the cloud VM can clone
The rest of this page is on the live site.