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.
- 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
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:
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
/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
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.To send a local session from the Code tab of the Desktop app to the cloud, select Continue in cloud in the session menu.Start a cloud session from your terminal
Start a cloud session from the command line with the--cloud flag:
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.
--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.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:--cloud command creates its own cloud session that runs independently. You can start multiple tasks and theyâll all run simultaneously in separate sessions:
Send local repositories without GitHub
When you runclaude --cloud from a repository that has no git remote, or from a github.com repository that the Claude GitHub App isnât installed on, Claude Code bundles your local repository and uploads it directly to the cloud session. This applies even if you connected GitHub with /web-setup.
For a full clone, the bundle includes your repository history across all branches, plus uncommitted changes to tracked files.
What happens to uncommitted changes in sensitive files depends on your platform:
- macOS, Linux, and WSL: Claude Code leaves uncommitted changes to files named like credentials or keys out of the upload. This includes
.envfiles, Terraform*.tfvarsfiles, and key files such asid_rsaand*.pem. It also leaves out uncommitted changes to files that a git filter such as Git LFS manages. ALeft on this machine:notice names the files left out, and the session starts with the committed version of each, or without the file if none is committed. - Native Windows: uncommitted changes to tracked files upload as they are, whatever the fileâs name. Stash or revert an edit you donât want in the cloud session before you start it.
CCR_FORCE_BUNDLE=1:
- The directory must be a git repository with at least one commit
- The bundled repository must be under 100 MB. Larger repositories fall back to bundling only the current branch, then to a single squashed snapshot of the working tree, and fail if the snapshot is still too large
- Untracked files are not included; run
git addon files you want the cloud session to see - On macOS, Linux, and WSL, Claude Code refuses the upload when it canât follow a git setting that affects which attribute rules apply to your files, such as
core.attributesFileset in an included config file. The refusal message names the setting and the fix - Sessions created from a bundle can push back to a GitHub remote only when your GitHub connection has push access to that repository
Not uploading this working tree:, names the cause, and says what to change. These are the common causes:
- Older git: the installed git is older than 2.31. Update git, then retry.
- A checkout layout the upload doesnât support: you started inside a submodule, in a clone made with
git clone --separate-git-dir,--shared, or--reference, in a checkout withcore.worktreeset, or in a repository that keeps its refs in the reftable format. Start from the main checkout of a clone made with a plaingit cloneinstead. - A linked worktree with a sparse checkout:
git sparse-checkoutwrites settings to the worktreeâs ownconfig.worktreefile, which the upload doesnât accept, so a worktree that has those settings isnât uploaded, and neither is one Claude Code created withworktree.sparsePaths. Start from the repositoryâs main checkout instead. - Git configuration kept inside the working tree: your git configuration includes a file that sits inside the checkout, for example an
include.pathentry that points into the repository. Move that file outside the working tree or remove the include, then retry.
git clone --filter uploads as a snapshot of its working tree without history, as long as the clone holds every tracked file locally.
For claude --cloud, if the repository is on GitHub, you can avoid the upload and its requirements: push your branch, install the Claude GitHub App on the repository, and start the session again so that it clones from GitHub.
Send follow-ups from the CLI
Once a cloud session is running, wherever it executes, send it a follow-up message from theclaude CLI on any machine where youâre logged in with claude auth login. The CLI authenticates with your Anthropic account credentials and sends no local session state, so the command doesnât need to run from the machine that started the session.
The command posts one message and exits:
echo "your message" | claude -p --cloud <session-id>.
For <session-id>, pass the bare ID, such as session_... or cse_..., or the sessionâs claude.ai/code/<id> URL, with or without the scheme or query string. Find the ID in your session list at claude.ai/code.
--cloud requires an Anthropic account. Itâs not available when Claude Code is configured for Amazon Bedrock, Google Cloudâs Agent Platform, or another third-party provider. An LLM gateway configured only through ANTHROPIC_BASE_URL doesnât count as a third-party provider for this check, but you still need to sign in with claude auth login. Your organizationâs allow_remote_sessions policy must also be enabled. An Owner can turn it on in the Claude Code admin settings at claude.ai/admin-settings/claude-code.Output
On success, the command prints the session ID and a link to view the session:--output-format json for a machine-readable result: {ok, session_id, url} on success, or {ok: false, session_id, error} when the send fails, for example when the session is missing or archived. Configuration errors, such as an unsupported provider or a disabled organization policy, print to stderr without JSON. --output-format stream-json isnât supported with --cloud <session-id>.
If the send fails, see Errors when sending to a cloud session.
Continue a cloud session in your terminal
Pull a cloud session into your terminal using any of these:- Using
--teleport: from the command line, runclaude --teleportfor an interactive session picker, orclaude --teleport <session-id>to resume a specific session directly.--resumereopens a conversation from this machineâs local history and doesnât list cloud sessions. - Using
/teleport: inside an existing CLI session, run/teleportor/tpto open the same session picker without restarting Claude Code. - From
/tasks: run/tasksto see your background sessions, then presstto teleport into one. - From claude.ai/code: select Open in > Terminal (copy command) from the session menu, then paste the command into your terminal.
- From inside the cloud session: type
/teleportand Claude Code replies with the exactclaude --teleport <session-id>command for that session, ready to run from a checkout of the repository.
claude --teleport.
If Claude Code has compacted the cloud session, which it does automatically in a long session, the earlier messages it summarized arenât copied to your terminal. Claude continues from the summary. To read the original messages, scroll up in the cloud session on claude.ai or in the Claude mobile app.
/remote-control in the local session.
Teleport requirements
Check these requirements before you teleport a session.
When teleport fetches the sessionâs branch, the fetch never waits for input in your terminal. If git or ssh would ask for a password, a key passphrase, or confirmation of a new SSH host, the fetch fails, and the checkout then works only if your local clone already has the branch. For the two SSH cases, load your key into
ssh-agent and run git fetch once by hand first to record the host.
--teleport is unavailable
Teleport requires claude.ai subscription authentication. Find the case that matches yours:
- Youâre signed in with an API key or Console account: run
claude auth loginin your shell, then sign in with claude.ai - The error names your provider: cloud sessions arenât available through third-party providers. See the error table
- You sign in to claude.ai through an organization: ask an Owner whether cloud sessions are turned on
Work with sessions
Sessions appear in the sidebar at claude.ai/code. From there you can review changes, share with teammates, archive finished work, or delete sessions permanently.Permission modes in cloud sessions
You pick a cloud sessionâs permission mode from the mode dropdown, both when you create the task and while the session runs. Claude Code resumes a session in the permission mode it was in when you do either of these:- Reopen a session whose Anthropic-hosted environment expired
- Send a message to a session that a self-hosted runner released while it was idle
Use a folder on your computer from a cloud session
Connect your Mac or Linux computer to a cloud session so Claude can use tools and files that are only on that computer. For example, the cloud machine doesnât have Xcode, but Claude can run an Xcode build on your Mac, read the result, and keep working in the cloud. The session runs in the cloud but reaches your computer through Claude Desktop. Keep the app open on your computer, or the cloud session canât access your tools and files.You can connect a computer on Pro, Max, and Ultra plans, in sessions you start yourself outside a project. Requires Claude Desktop v5.11492.5 or later.To run sessions on your computer and access them from other devices, use Remote Control instead.
Set up Claude Desktop
To let cloud sessions connect to your computer, open Settings > Code or Settings > Claude Code in Claude Desktop, scroll to the Remote Control group, and make these changes:- Turn on the Let your phone and claude.ai start sessions here toggle.
- Turn on the Let cloud sessions run commands here in auto mode toggle, then select the Allow button. You need this toggle even outside auto mode.
- If the folder you want Claude to work in, such as your Xcode project, isnât in the Folders list, select the Add folder button.


Connect a session to your computer
Start a new cloud session and send a request such as âRun the Xcode build on my Macâ. If Claude asks whether you trust the sessionâs repositories, check the list and confirm. Claude then asks to use a folder on your computer. Before you select the Allow button, know what connecting changes:- Which files Claude uses: Claude uses the files in that folder, which are separate from the sessionâs cloud copy of your repository. If the folder is a clone of a GitHub repository the session can push to, ask Claude to push its cloud changes and pull them into the folder.
- What Claude can reach: commands start in the folder, but Claude can reach files outside it. In auto mode it runs commands and edits files without asking first, and in plan mode it can run commands without asking. To limit Claude, add deny rules to
~/.claude/settings.jsonon your computer and turn on the sandbox for shell commands. - Sharing and sign-in: you canât share the session, and it opens only on trusted devices, so a browser or Desktop app that isnât trusted yet asks you to sign in again. Both limits stay on the session after you disconnect.
Review changes
After Claude pushes its changes to a branch, the Changes card in the panel beside the chat shows the lines added and removed, such as+42 -18. Click the line counts on the Changes card to open the diff view.
- To show the panel when itâs hidden, click Activity panel or Show session rail in the sessionâs title bar, or Show session rail in the barâs âŪ menu.
- You can also open Changes as a pane.
- Comment: leave inline comments on specific lines, then send the comments to Claude with your next message
- Compare: the diff view compares the sessionâs changes against its base branch by default. To compare against any other branch in the repository, select Compare against and pick one
textconv filters configured in the repository donât apply.
These steps are covered elsewhere:
- The full walkthrough, including PR creation: see Review and iterate
- Having Claude monitor the PR for CI failures and review comments automatically: see Auto-fix pull requests
Troubleshoot a missing file in the diff view
A file you expected can be missing from the diff viewâs file list when it compares against the base branch:- No changes pushed yet: the list has Claudeâs own edits, but not changes made by commands Claude ran, such as a formatter
- Changes pushed: the list has pushed commits, but not changes made after the last push
Manage context
Cloud sessions support built-in commands that produce text output. Commands that only run in the terminal interface, such as/resume, arenât available. Commands that open a picker or panel in the terminal behave differently in cloud sessions:
/model,/effort,/color, and/rename: pass the value as an argument, for example/model sonnet, instead of opening the terminal picker or slider. The argument forms follow each commandâs availability notes./fast: toggles fast mode for the session when fast mode is available on your account. Requires Claude Code v2.1.271 or later in the sessionâs environment./config: in your browser at claude.ai/code, opens Settings > Code instead of setting a value. To change a setting for a cloud session, set an environment variable on the environment. In a session with one repository outside a projectâs threads, commit the key to that repositoryâs.claude/settings.jsoninstead. Settings in cloud sessions lists what each session reads.
On these models, a cloud session can reach the context limit before it compacts:
- Claude Haiku 4.5, Claude Sonnet 4.5, Claude Opus 4.5, and earlier models
- Sonnet 4.6 and Opus 4.6 with extended context
150000, with CLAUDE_CODE_AUTO_COMPACT_WINDOW in your environment variables.
Use subagents and agent teams
Claude can spawn subagents with the Agent tool to offload research or parallel work into a separate context window, keeping the main conversation lighter. Subagents defined in your repoâs.claude/agents/ directory load automatically. For a project, check which threads load a repositoryâs subagents.
Agent teams are off by default but can be enabled by adding CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 to your environment variables.
Plugin suggestions in the conversation
A card in the conversation that lists one or more plugins, with an Add button, means Claude is suggesting plugins for your task. Claude can make these suggestions without you asking. You donât have to respond, and Claude carries on with the task either way.Add or remove a suggested plugin
Select Add on a plugin to turn it on for your claude.ai account, where it stays on after the session ends. To undo, open the added plugin from the card, select Manage to reach the pluginâs page on claude.ai, and remove the plugin from that page.Turn off plugin suggestions
To stop Claude from suggesting plugins, deny theSearchPlugins and SuggestPluginInstall tools with permission rules. In a session with one repository outside a project, commit the rules to that repositoryâs .claude/settings.json, listing both tool names under permissions.deny:
.claude/settings.json, including these deny rules, when the managed settings that apply to the session set allowManagedPermissionRulesOnly. In that case, put the rules in those managed settings instead. For other setups, such as a session with several repositories or a cloud thread in a project, see which settings reach a cloud session.
Take back a queued message
If you send a message while Claude is working, the message queues until Claude reads it. To take a queued message back, click the â on it. The text returns to the message box so you can edit it or send something else. If Claude has already read the message, it stays in the conversation.Share sessions
See Share a cloud or Remote Control session for how to share a session by link, what recipients can read, and how to stop sharing.Archive sessions
Archive a session to remove it from the sidebarâs session list. To archive one, hover over it in the sidebar, open its âŊ menu, and select Archive.Find an archived session
To see your archived sessions, go to claude.ai/code/sessions and open the Archived tab. To put one back in the sidebarâs session list, hover over it on that tab, open its âŪ menu, and select Unarchive.Delete sessions
Deleting a session permanently removes the session and its data. This action canât be undone. Delete a session from the sidebar, from the session menu, or from the Archived tab if youâve already archived it:- From the sidebar: hover over the session, open its âŊ menu, and select Delete
- From the session menu: open a session, select the dropdown next to the session title, and select Delete
- From the Archived tab: hover over the session on the Archived tab, open its âŪ menu, and select Delete
Auto-fix pull requests
Claude can watch a pull request and automatically respond to CI failures and review comments.Auto-fix requires the Claude GitHub App to be installed on your repository. If you havenât already, install it from the GitHub App page.
- PRs created in a cloud session: open the session at claude.ai/code and find the pull request in the Changes card. Open the âŪ menu next to the pull requestâs title and turn on Auto-fix
- From your terminal: run
/autofix-prwhile on the PRâs branch. Claude Code detects the open PR withgh, spawns a cloud session, and turns on auto-fix in one step - From the mobile app: tell Claude to auto-fix the PR, for example âwatch this PR and fix any CI failures or review commentsâ
- Any existing PR: paste the PR URL into a session and tell Claude to auto-fix it
How Claude responds to PR activity
When auto-fix is active, Claude receives GitHub events for the PR including new review comments and CI check failures. For each event, Claude investigates and decides how to proceed:- Clear fixes: if Claude is confident in a fix and it doesnât conflict with earlier instructions, Claude makes the change, pushes it, and explains what was done in the session
- Ambiguous requests: if a reviewerâs comment could be interpreted multiple ways or involves something architecturally significant, Claude asks you before acting
- Duplicate or no-action events: if an event is a duplicate or requires no change, Claude notes it in the session and moves on
Security and isolation
By default, a cloud session runs its shell commands and file edits in an isolated, Anthropic-managed VM. Sessions your organization routes to a self-hosted environment run on your own infrastructure instead, where isolation and network egress are your deploymentâs responsibility.- Network access controls: in Anthropic-hosted environments, network access from the sessionâs VM is limited by default and can be disabled. See Network access for the access levels, the default allowed domains, and the traffic that doesnât go through the allowlist. With network access disabled, Claude Code can still communicate with the Anthropic API, which may allow data to exit the VM.
- Credential protection: in Anthropic-hosted environments, git credentials and signing keys stay outside the sandbox, and a proxy authenticates on the sessionâs behalf with scoped credentials. In a self-hosted environment, your deployment supplies git credentials; see Configure git
- Network secrets: in Anthropic-hosted environments, keys you add to a cloud environment stay outside the sandbox the same way, attached to matching requests after they leave the session. A self-hosted environment doesnât have network secrets
Troubleshooting
For runtime API errors that appear in the conversation such asAPI Error: 500, 529 Overloaded, 429, or Prompt is too long, see the Error reference.
Session creation failed
If a new session fails to start withSession creation failed or stalls at provisioning, Claude Code could not allocate a VM for the session.
- Check status.claude.com for cloud session incidents
- Retry after a minute, as capacity is provisioned on demand
- Confirm your GitHub connection can reach the repository by following No repositories appear after connecting GitHub
Your new session couldnât start
Your prompt is back in the box you sent it from.- Connection lost: check your internet connection and any VPN or proxy you use, then send your prompt again
- Server error: wait a moment, then send your prompt again. If the notice reappears, check status.claude.com
Canât rewind to this message
Rewind to here fails with this error on any message except the newest when your session runs on a self-hosted runner with Claude Code before v2.1.246. Ask whoever runs your organizationâs runners to upgrade them.Unable to get organization UUID
claude --cloud and claude --teleport require sign-in with a claude.ai account. If you authenticate with an API key or a Console sign-in instead, or your stored account details are stale, you see a message such as:
Unable to get organization UUIDCloud sessions need a claude.ai sign-in. Run `claude auth login` (or /login in a local session), then try again.Cloud sessions aren't available with this Console sign-in. They need a claude.ai sign-in. Run `claude auth login` (or /login in a local session), then try again.Couldn't load cloud sessionsin the session picker, when you runclaude --teleportwithout a session ID. Before v2.1.328, it readCouldn't load Claude Code sessionsorError loading Claude Code sessions
claude auth login in your shell to sign in with your claude.ai account, then retry the command. Inside a running session, /login does the same. If the error names your provider instead, see the error table: cloud sessions arenât available through third-party providers.
Branch is not on GitHub
Whenclaude --cloud prints a line starting with Branch <name> is not on GitHub, the cloud session still starts, but not from your branch. The line names where the session starts instead: a pushed commit from your branchâs history, or the repositoryâs default branch. Commits that exist only on your machine and uncommitted changes arenât in the session.
You see this line when, for example, you never pushed the branch, or GitHub deleted it after its pull request merged. If the starting point the line names has what your task needs, use the session as it is. Otherwise, push the branch and start a new session so that it clones your branch.
Remote Control session expired or access denied
--teleport connects through the same Remote Control session infrastructure that cloud sessions use, so authentication and session-expiry errors surface with Remote Control wording. You may see Remote Control session expired or Access denied. The connection token is short-lived and scoped to your account.
- Run
/loginlocally to refresh your credentials, then reconnect - Confirm you are signed in to the same account that owns the session
- If you see
Remote Control may not be available for this organization, an Owner has not enabled cloud sessions for your organization
Errors when sending to a cloud session
These errors come from runningclaude with --cloud <session-id>, with or without -p. The CLI prefixes errors with Error: . A failed delivery is wrapped as failed to send message to cloud session <id>: <reason>.
Environment expired
Cloud sessions stop after a period of inactivity and the sessionâs VM is reclaimed. A session counts as inactive while it waits for you to approve an MCP connector tool call or to sign in to an MCP server, and it can expire during that wait. Reopen the session from claude.ai/code to provision a fresh VM:- Restored: your conversation history, and tracking of MCP tasks still running on a connector
- Not restored: other background work that was still running or pending when the VM was reclaimed, including:
- Shell commands: Claude Code tells Claude which commands stopped. Ask Claude to rerun the ones you still need.
- Subagents: Claude Code tells Claude which subagents stopped, and which of those can be resumed instead of started over. Ask Claude to continue their work.
- Session-scoped scheduled tasks: Ask Claude to schedule the tasks again, or rerun your earlier
/loopcommand.
Limitations
Before relying on cloud sessions for a workflow, account for these constraints:- Rate limits: cloud sessions share rate limits with all other Claude and Claude Code usage within your account. Running multiple tasks in parallel consumes more rate limits proportionately.
- Time limits: commands Claude runs and SessionStart hooks have default timeouts you can change, and a setup script is cached only when it finishes in roughly five minutes. See Time limits
- Platform restrictions: repository cloning in Anthropic-hosted environments and pull request creation require GitHub. Self-hosted GitHub Enterprise Server instances are supported for Team and Enterprise plans. You can send a GitLab, Bitbucket, or other non-GitHub repository to a cloud session as a local bundle by setting
CCR_FORCE_BUNDLE=1, but the session canât push results back to that remote- Self-hosted environments: for a repository on another git host, see the requirements for starting a session with
--environment.
- Self-hosted environments: for a repository on another git host, see the requirements for starting a session with
Related resources
- Cloud environments: configure network access, environment variables, and setup scripts for cloud sessions
- Projects: one conversation where Claude coordinates parallel cloud sessions on your repositories and reports back
- Ultrareview: run a deep multi-agent code review in a cloud sandbox
- Cloud scheduled tasks: automate work on a schedule, via API call, or in response to GitHub events
- Hooks configuration: run scripts at session lifecycle events
- All settings: all configuration options
- Security: isolation guarantees and data handling
- Data usage: what Anthropic retains from cloud sessions
- Claude Tag: an organization-managed @Claude in Slack that runs on the same cloud infrastructure