Skip to content
한국어

Claude Code cloud sessions: GitHub integration, environments, routines

In short
  • A cloud session is Claude Code running in the cloud, not on your computer. It keeps running even if you close your laptop, and you can check on it and steer it from any device.
  • It’s available on Pro, Max, Ultra, and Team plans, and on Enterprise Premium or Chat + Claude Code seats.
  • There are five ways to start: the browser (claude.ai/code), the Code tab in the mobile app, choosing Cloud in the desktop app, claude --cloud "task" in the terminal, and routines.
  • There’s no separate charge for the cloud VM; it counts toward your plan usage. The more you run in parallel, the faster your limit shrinks.
  • Environments set the network, environment variables, and setup script, and Routines run automatically on a schedule, an API call, or a GitHub event.
  • Connect a GitHub repository and hand work to a cloud session.
  • Review the result (diff) and create a PR, or bring the session into your terminal and keep working.
  • Configure an environment, including network access level and setup script, to fit your work.
  • Create routines that run automatically at set times or on GitHub events.
Cloud session mapYou give instructions from the browser, app, or terminal on your device. The cloud VM clones the repository from GitHub, does the work, and pushes the results to GitHub as a branch and pull request.My deviceBrowser · app · terminalGive tasks, follow progress, review resultsInstructProgress · resultsCloud VMRepo copy + environmentNetwork level · env vars · setup scriptKeeps running even if my device is offClonepush · PRGitHubRepo · branch · pull requestCredentials stay outside the VM (proxy)
Term Meaning
Cloud session A Claude Code session that runs on cloud infrastructure. It keeps running even if you turn off your device.
Claude GitHub App One way to connect GitHub. You approve it through web onboarding, and private repositories work only where the app is installed.
/web-setup Another way to connect, run from the terminal. It sends the gh token from your computer to your account. It works whether or not the app is installed.
Environment A saved configuration of network access, environment variables, and a setup script. The first time you use it, a Default environment (Limited network access, no variables or script) is created.
Setup script A script that runs before the session starts. Use it for things like installing packages.
teleport A feature that brings a cloud session into your terminal so you can continue the work.
Routines A feature that saves a prompt + repository + connectors and runs them automatically in the cloud. Currently a research preview. As of 2026-10-26, the official docs present this feature as cloud scheduled tasks, formerly called routines. The address (claude.ai/code/routines), the /routines alias, and the screens on some accounts still say “Routines.” This article uses the familiar name, “routines.” Cloud sessions that a routine starts begin in auto mode (a classifier decides on approvals for you), and for intervals not in the presets you set a cron expression under Custom, written in UTC (as of 2026-10-26; intervals more frequent than hourly are rejected).
Auto-fix A feature that responds automatically to CI failures and review comments on a PR.

GitHub credentials are stored encrypted on Anthropic’s servers and are not placed inside the VM. GitHub operations from the VM go through a proxy.

  • Cloning and creating PRs require GitHub. Team and Enterprise also support GitHub Enterprise Server.
  • For GitLab or Bitbucket, you can upload a local repository as a bundle with CCR_FORCE_BUNDLE=1. However, you can’t push the results to the remote.
  • The bundle upload requires the git repository to have at least 1 commit and the bundle to be under 100MB. Untracked files are excluded. Uncommitted changes to files like .env, *.tfvars, id_rsa, and *.pem are left out of the upload (macOS/Linux/WSL).

There’s no separate charge for the cloud VM. Usage counts toward your plan’s limit along with your other Claude and Claude Code usage. For the details of how limits work, see C2. Plans and usage limits.

Depending on your account, you may see a “cloud session credits” item on the Settings > Usage screen. It isn’t explained in the official docs yet, so we’ve written it up in C2 under If you’ve seen an item called “cloud session credits”.

0/8 done
  1. Connect GitHub

    Go to claude.ai/code in your browser. The first time, it guides you through connecting GitHub. Just approve the Claude GitHub App.

    Screen guide: The GitHub connection screen (approving the Claude GitHub App) at claude.ai/codeSee this screen in the official help ↗

    If you’d rather do it in the terminal, run /web-setup. It sends your local gh token to your account, so you don’t need to install the GitHub App.

  2. Start your first session in the browser

    At claude.ai/code, pick a repository and type a task. You can also start from the Code tab in the mobile Claude app or the desktop app (choose Cloud instead of Local). Start with a small task at first.

    Copy and paste this prompt

    Read this repository’s README.md and rewrite the installation and usage sections to be easier for a first-time reader to follow. Don’t touch the code, and summarize what you changed at the end.

    Screen guide: Choosing a repository and typing a task at claude.ai/codeSee this screen in the official help ↗

    How to start your first cloud session
    1. claude.ai/codeFollow the GitHub connection prompt
    2. Claude GitHub App screenApprove
    3. claude.ai/codePick a repository and type a task→ The session runs in the cloud

    This is a simplified flow. See the official help page for the actual screens.

  3. Start from the terminal (optional)

    With the terminal method you have to push first. claude --cloud clones the current directory’s GitHub remote at the current branch, so commits that exist only locally aren’t included.

    Terminal window
    git push
    claude --cloud "Fix the authentication bug in src/auth/login.ts"

    Running --cloud several times runs independent sessions in parallel. To send a follow-up message to an existing session:

    Terminal window
    claude -p "message" --cloud <session-id>

    Session IDs look like session_....

  4. Review the result and create a PR

    When the work finishes, review the changed diff. Click the +/- markers to open the changes, and leave inline comments if needed. If everything looks fine, create the PR at claude.ai/code.

    Screen guide: Viewing the session result's diff and the Create PR buttonSee this screen in the official help ↗

  5. Pick it up locally (teleport)

    You can bring work started in the cloud into your terminal and continue it.

    Terminal window
    claude --teleport # pick a session from the selector
    claude --teleport <id> # specify a session ID

    During a session you can also use /teleport or /tp, and t in /tasks. The conditions are listed in the quick reference. In the other direction, the desktop app’s Open in menu can send a local session to the cloud.

  6. Configure the environment

    In the environment selector, click the settings icon to edit network access, environment variables, and the setup script.

    • Network: The default is Limited with Allow package managers checked. If you need to call an external API, add its domain or adjust the level. The three levels are in the table below.
    • Setup script: Runs before the session starts. If it finishes within about 5 minutes, a filesystem snapshot is cached and later sessions start faster.
    • Environment variables: Stores key-value pairs. But anyone who uses the environment can read them, so don’t store secrets.

    Screen guide: Environment settings: network access level, environment variables, setup scriptSee this screen in the official help ↗

  7. Turn on Auto-fix (optional)

    After you open a PR, you can have Claude respond automatically when CI fails or review comments come in. Turn on Auto-fix from the session’s CI status bar, run /autofix-pr in the terminal, or ask from mobile. It requires the Claude GitHub App to be installed, and it can’t respond automatically to merge conflicts because there’s no webhook for them.

  8. Create a routine (optional)

    Create one with /schedule in the terminal or at claude.ai/code/routines. You can also create one in the desktop app.

    Terminal window
    /schedule daily PR review at 9am

    On the web, click New task (New routine on some accounts), set the name, prompt, repository, environment, and trigger, and click Create.

    Screen guide: The New task / New routine creation screen at claude.ai/code/routinesSee this screen in the official help ↗

    Copy and paste this prompt

    Check the open PRs in this repository. For each PR, summarize the changes in two or three lines and tell me one thing to look at especially closely when reviewing. Don’t modify any code.

    If a routine’s job is “keeping a page up to date,” hand it an editable artifact that you’ve already published. When a run started by a schedule or Run now republishes only that page, it updates an artifact that you can edit, that’s within your organization, and that isn’t publicly shared, without asking for confirmation. Cases like having permissions that reach beyond the page (such as connector calls) or creating a new one are asked about first, according to the official docs (as of 2026-10-11).

Method Command / location
Browser claude.ai/code
Mobile The Code tab in the Claude app
Desktop app Choose Cloud instead of Local (send a local session to the cloud with the Open in menu)
Terminal claude --cloud "task" (push first)
Routines claude.ai/code/routines, the desktop app, CLI /schedule
Level Meaning
None No outside access. Claude Code’s own communication with the Anthropic API still works.
Limited Access to the default allowlist (package registries, GitHub, cloud SDKs) while Allow package managers is checked, plus any domains you add under Allowed domains. A new environment starts here.
Full Access to all domains.

The levels used to be None, Trusted, Full, and Custom. An environment saved as Trusted now opens as Limited with Allow package managers checked, and one saved as Custom opens as Limited with its own domain list (as of 2026-11-16).

This document doesn’t cover the full list of domains in the default allowlist. Check the default allowed domains section of the official docs.

Command Purpose
claude --cloud "task" Start a cloud session with the current repository and branch
claude -p "message" --cloud <session-id> Send a follow-up message to an existing session
claude --teleport / claude --teleport <id> Bring a cloud session into the terminal
/teleport, /tp Teleport during a session
/web-setup Connect GitHub with your local gh token
/autofix-pr Turn on Auto-fix
/schedule ... Create a routine
/compact, /context Available inside cloud sessions
/model sonnet Change the model (use it with an argument like this)
/fast on Turn on fast mode for this session only (v2.1.271 and later; requires extra usage (usage credits))
gh api repos/{owner}/{repo}/... Call the GitHub REST API (gh pr and gh issue, which use GraphQL, are blocked)
/clear Not available in cloud sessions
  • A clean git state
  • The same repository (not a fork)
  • The branch has been pushed
  • The same claude.ai account

Moving through the CLI is one-way (cloud to terminal). If you continue in the terminal, that work stays local and doesn’t show up in the cloud session.

Resource limits (may change, as of 2026-11-02)

Section titled “Resource limits (may change, as of 2026-11-02)”
Item Value
CPU / memory / disk 4 vCPU, 16GB RAM, 30GB
Default command timeout 2 minutes (you can request up to 10 minutes)
On timeout Moves to the background and runs up to 30 more minutes
When idle The VM is paused and may be reclaimed later. The conversation history is restored, but background tasks that were running are not.
Item Details
When it runs Before the session starts
Cache condition Finishes within about 5 minutes
Cache expiry About 7 days. Rebuilt when you change the script or allowed hosts
What persists Installed packages, pulled Docker images
What doesn’t persist Running processes
Item Details
Triggers Schedule (hourly, daily, weekdays, weekly, or one-time), API (HTTP POST + bearer token), GitHub events (pull request, release)
Available plans Pro, Max, Ultra, Team, Enterprise
Minimum schedule interval 1 hour
Hourly limits 100 scheduled runs per account, 30 Run now/API runs per routine, and so on. There’s no overage billing on these limits.
Usage Consumes subscription usage like interactive sessions. When you hit your limit, if extra usage (usage credits) is on, the overage keeps running pay-as-you-go; if it’s off, runs are rejected until the reset.
Ownership Owned by your personal account. Not shared with teammates.
How it runs Acts autonomously without approvals. It pushes branches with a claude/ prefix, and commits and PRs are made under your GitHub user.
Connectors All connectors are included by default. Remove the ones you don’t need.
API trigger (beta) Use the request header anthropic-beta: experimental-cc-routine-2026-04-01

Changes I made locally don’t show up in the cloud session

Section titled “Changes I made locally don’t show up in the cloud session”
  • Cause: claude --cloud clones the current branch of the GitHub remote. Local commits you haven’t pushed aren’t in the cloud.
  • Fix: Run git push first, then start again.
  • Cause: The conditions may not be met.
  • Fix: Check that your git state is clean (commit or stash changes), that it’s the same repository (not a fork), that the branch has been pushed, and that you’re signed in with the same claude.ai account.

Package installs or outside sites are blocked

Section titled “Package installs or outside sites are blocked”
  • Cause: The environment’s network access level may be outside what’s allowed (None means no outside access, Limited means allowlisted domains only).
  • Fix: Raise the network access level in the environment settings, or choose Limited and add the domains you need under Allowed domains. If an install keeps repeating, put it in the setup script to take advantage of the cache.

I can’t push to GitLab/Bitbucket repositories

Section titled “I can’t push to GitLab/Bitbucket repositories”
  • Cause: Cloning and creating PRs require GitHub. The CCR_FORCE_BUNDLE=1 upload method can’t push results to the remote.
  • Fix: If you need to push results to the remote, use a GitHub repository. Keep in mind that the bundle method has limits.

Sessions fail with an authentication error in my organization

Section titled “Sessions fail with an authentication error in my organization”
  • Cause: If your organization’s IP allowlist is on, Anthropic-hosted cloud sessions fail with an authentication error. Organizations configured for Zero Data Retention or HIPAA can’t use cloud sessions.
  • Fix: Ask your organization administrator to check the settings.

Auto-fix doesn’t react to merge conflicts

Section titled “Auto-fix doesn’t react to merge conflicts”
  • Cause: There’s no webhook for merge conflicts, so it can’t respond automatically.
  • Fix: Resolve conflicts yourself, or tell it to resolve them with a new request.
  • Hand off small tasks first. Look at the result diffs to see how it works, then scale up gradually.
  • Running in parallel uses more of your limit. Handing off several tasks at once shrinks your plan limit that much faster. Also see the limit structure in C2.
  • Avoid the top of the hour for routines. Runs at the top of the hour can be a few minutes late, so we recommend staggering the minute, like 9:07.
  • Trim a routine’s connectors. All of them are included by default, so keep only what you need.
  • Don’t put secrets in environment variables. Use network secrets (all paid plans, as of 2026-11-02).
  • Check before sharing. Before sharing a session as Public, make sure it doesn’t contain credentials.
  • You can change models inside a session too. Use it with an argument, like /model sonnet.
  • If you need faster responses, try fast mode. You can turn it on in cloud sessions with /fast on, and in the browser (claude.ai/code) a switch appears in the model menu of the message input box. It applies only to the session where you turn it on and isn’t saved as a default. On the Anthropic API it works with Fable 5.2 and Opus models (Opus 5.5, Opus 5, Opus 4.8), not Sonnet or Haiku (as of 2026-11-28). Opus 5.5 is the default, fast mode on Fable 5.2 needs Claude Code v2.1.321 or later, and fast mode for Opus 4.8 was deprecated on 2026-10-30 and its removal date is 2026-11-30 (after that date the API rejects those requests), so move to Opus 5.5. Also, on subscription plans extra usage (usage credits) must be on and it costs more, and on Team/Enterprise an Owner must allow it first. For the detailed conditions, see the fast mode docs.
  • If GitHub work gets blocked, have it use gh api. In cloud sessions, you can call the GitHub REST API with gh api. The built-in gh api works even if the image has no GitHub CLI (v2.1.288 and later). The proxy attaches the token for you, so you don’t need to sign in separately, but GraphQL-only features (such as Projects v2) and gh pr and gh issue are blocked.

Sources

Last verified: Nov 28, 2026

Prices, limits, and menu names change often. Before making an important decision, check the official pages above for the latest details.