🌱 Welcome to Factnetize — honest, well-researched articles on tech, health and AI. Get the weekly →
Agentic AI

Claude Code cloud sessions: set up GitHub and run your first task

Claude Code cloud sessions run Claude on an Anthropic-managed VM that keeps working when your laptop is closed. Here's how to connect GitHub, set up a private repo and start your first session.

Closed laptop on a dark wooden desk at night beside a glowing smartphone, with blurred server lights behind: Claude Code cloud sessions keep working

⚡ Key takeaways

  • Claude Code cloud sessions run Claude on an Anthropic-managed VM, so the work continues when your laptop is closed.
  • Cloud sessions count toward your normal plan limits, with no separate charge for the VM. The one-time launch credit ($100 on Pro, $250 on Max) had to be claimed by October 7 and expired on November 4, 2026 at 11:59 PM PT.
  • You need GitHub connected, and the Claude GitHub App installed on any private repository you want Claude to work in.

Claude Code cloud sessions are out of research preview, and they run on your normal Pro or Max plan. This guide shows how to connect GitHub, set up a private repository and run your first cloud session. It also explains how cloud session usage is counted, so you know what a session costs you.

What Claude Code cloud sessions are

Normally, Claude Code runs in a terminal on your own computer. A cloud session runs the same agent on a virtual machine that Anthropic manages. Claude clones your GitHub repository into that VM, makes changes, runs tests and pushes a branch for you to review.

The practical difference is that the session keeps going after you close your laptop. You can start a task in the browser at claude.ai/code, check on it from the Claude mobile app and review the result later on your desktop. Each task gets its own session and its own branch, so you can run several at once without juggling local copies of your code.

Cloud sessions are available on Pro, Max, Ultra and Team plans, and for Enterprise users with a premium seat or a Chat + Claude Code seat. According to Anthropic’s documentation, there is no separate charge for the VM itself. Instead, usage counts toward your plan limits, just like local Claude Code.

Wondering what running code in someone else’s cloud means for privacy? We covered the trade-offs in local vs cloud AI: what actually stays private.

How cloud session usage is counted

Cloud sessions count toward your plan’s usage limits, the same as local Claude Code, whether you start them from the browser, the desktop app, the CLI or the mobile app. You only pay extra if you have turned on usage credits and go past your plan’s limits.

When cloud sessions launched on September 23, 2026, existing Pro and Max subscribers got a one-time credit of $100 or $250. According to the Claude Help Center, it expired on November 4 at 11:59 PM PT. One exception remains on Pro: the Fable model needs usage credits turned on with a balance.

You can see what you have used in the usage section of your Claude settings.

What you need before you start

Run cloud sessions from the browser at claude.ai/code, or from your terminal with the Claude Code CLI. Pick one and stay on it.

  • Browser. A Claude Pro or Max account signed in at claude.ai, and a GitHub account. Nothing to install.
  • Terminal. Everything from the browser path, plus the Claude Code CLI and the GitHub CLI (gh) installed and signed in.

You don’t need a powerful computer. Everything heavy happens on the cloud VM, so a phone or a basic laptop with a browser is enough to start and review tasks.

Step 1: connect GitHub

Cloud sessions need access to your repositories. If you don’t already use the GitHub CLI, follow the browser path.

From the browser

  1. Go to claude.ai/code and sign in with your Claude account.
  2. Right after you sign in, click the Sign in with GitHub button — it’s on the page, not in the chat box.
  3. On the GitHub page that opens, click Approve. GitHub sends you back to claude.ai/code.
  4. Install the Claude GitHub App on your personal account, or on the organization that owns your code. Choose All repositories, or Only select repositories.

Step 4 matters more than it looks. Without the GitHub App, a session can clone public repositories but not your private ones. The app also enables Auto-fix, which lets Claude respond to failing CI checks and review comments on a pull request. On a GitHub organization, an owner may need to approve the installation.

On a Team or Enterprise plan, the Sign in with GitHub button only appears after an Owner of your Claude organization turns on the GitHub connector under Organization settings → Connectors. Until then, the page shows “GitHub access is required for Claude Code cloud sessions” instead of the button.

No button? You’re already connected — check the repository selector under the input box.

From the terminal

Already use the GitHub CLI? Reuse your gh login instead. Authenticate it first:

gh auth login

Then start claude, make sure you’re signed in with your claude.ai account (run /login if not), and type:

/web-setup

Claude Code sends your gh token to your Claude account, where it is stored encrypted. Cloud sessions you start can then reach every repository that token can reach, private ones included. If it warns about a missing workflow scope, run gh auth refresh -s workflow and try again. Otherwise, GitHub may reject pushes that change GitHub Actions workflow files.

Either way, you end up with a cloud environment called “Default”. /web-setup creates it for you, and on Pro, Max and Ultra the browser onboarding sets it up automatically. On Team and Enterprise, the browser shows a Create your first cloud environment form instead, unless an Owner has turned on Quick setup: keep the defaults and click Create & finish. Default uses Trusted network access: sessions can reach common package registries and other allowlisted domains, but not the open internet. That is enough for a first project, and you can change it later.

Step 2: create a private repository

Cloud sessions work on existing GitHub repositories. To try them on something new, create a small private repository first.

  1. On GitHub, go to github.com/new.
  2. Give the repository a name and set it to Private.
  3. Tick Add a README file, so the repository starts with one commit.
  4. Click Create repository.
  5. If you chose Only select repositories when you installed the GitHub App in step 1, give the app access to this new repository. On GitHub, go to Settings → Applications → Installed GitHub Apps → Claude → Configure, select the repository in the list and click Save.

Already have a project on your computer? Push it to GitHub instead. A cloud session clones what is on GitHub, not what is on your disk, so commit and push before you start a session.

Step 3: start your first Claude Code cloud session

From the browser or your phone

  1. Open claude.ai/code, or the Code tab in the Claude app.
  2. Click the repository selector below the input box and pick your repository. Change the branch if you don’t want to start from the default one.
  3. Choose a permission mode. Plan makes Claude propose an approach and wait for your approval. Accept edits lets it change files and push a branch without stopping. Auto, when available, has a classifier review Claude’s actions instead of asking you.
  4. Type your task in the input box and press Enter.

Be specific. “Add a README with setup instructions” or “Fix the failing test in tests/test_auth.py” works far better than “fix tests”. A precise task finishes faster and uses less of your plan. Paste error output if you have it, and describe the behavior you expect.

Need an idea for a first project? Our guide your first coding project: build an AI tools dashboard is a good fit for a cloud session.

From your terminal

With the Claude Code CLI installed, run this from inside a checkout of your repository:

claude --cloud "Add a README with setup instructions"

The VM clones your GitHub remote at your current branch, so push first if you have local commits. You can fire off several tasks in a row, and each one becomes its own session:

claude --cloud "Fix the flaky test in auth.spec.ts"
claude --cloud "Update the API documentation"

You may see the older --remote flag in other guides. It still works, but it is deprecated in favor of --cloud.

Step 4: review the diff and open a pull request

When Claude reaches a stopping point, it pushes its branch to GitHub. A Changes card then appears in the panel next to the chat, with line counts such as +42 -18. Click those counts to see every changed file. Panel hidden? Click Changes in the title bar.

  • Comment inline. Hover over a line in the diff and click the + beside it, then type your feedback. Comments are sent with your next message, so Claude knows exactly which line you mean.
  • Create a PR. Click Create PR at the top of the diff view to open a pull request. For a draft, right-click Create PR and choose Create draft PR.
  • Keep going. The session stays live after the PR exists. Paste CI failures or review comments into the chat, or turn on Auto-fix if the GitHub App is installed.
  • Continue locally. Run claude --teleport in your terminal to pull the session and its branch onto your own machine.

Nothing lands on your main branch until you merge the pull request yourself. That makes cloud sessions safe to experiment with, because the worst case is a branch you delete.

How to get the most out of each session

Because there is no separate charge for the VM, what you spend is Claude’s own work: reading code, reasoning and running tools. A few habits help your plan go further.

  • Pick the backlog work. Tests you never wrote, documentation, small refactors, dependency upgrades and bugs you keep postponing are ideal. They are well defined and easy to review.
  • Plan first for big jobs. Start in Plan mode, agree on the approach, then let Claude execute. A wrong turn caught early costs far less than a full run in the wrong direction.
  • Run independent tasks in parallel. The total usage is about the same, but you get results sooner. Keep in mind that parallel sessions count toward your rate limits together.
  • Keep secrets out of the repository. If a session needs an API key, add it as a network secret on the cloud environment, where it stays outside the session’s sandbox.

Troubleshooting

“GitHub access is required for Claude Code cloud sessions”

On a Team or Enterprise plan, an Owner still has to turn on the GitHub connector. Here is where that setting is and what to send your Owner.

My private repository doesn’t show up

If you connected through the browser, a private repository only appears when the Claude GitHub App is installed on the account or organization that owns it, and the app’s repository access includes it. Install the app or add the repository in its settings. If you used /web-setup, run gh repo view OWNER/REPO to confirm your GitHub CLI login can see it.

/web-setup says “Unknown command”

The command runs inside Claude Code, not in your shell, so launch claude first. If it is still missing, you are probably signed in with an API key instead of a claude.ai subscription. Run /login and try again.

The session works on old code

claude --cloud clones the branch as it exists on GitHub, so push your local commits first. If the repository has no GitHub remote, or the GitHub App isn’t installed on it, Claude Code uploads a bundle of your local repository instead. On native Windows, that upload includes uncommitted changes to tracked files as they are, so stash anything you don’t want in the cloud.

The session expired

After a period of inactivity, the VM is reclaimed. Reopen the session at claude.ai/code to get a fresh VM. Your conversation history comes back, but background work that was still running, such as a long shell command, does not.

Ran out of Claude before the month is over? Some free ChatGPT accounts can now claim a month of Plus at $0. Here’s how to get ChatGPT Plus free and cancel before you pay.

What to do next

Cloud sessions turn Claude Code into something you can hand a task to and walk away from. Connect GitHub, make sure the GitHub App can see your private repositories, and start with one specific, reviewable task. Cloud sessions run on your normal plan, so start with the work you have been putting off.

Want Claude in your other tools too? See how to connect Hermes to Claude Code, or how to connect WordPress to Claude with MCP.

Sources: Claude Help Center: cloud sessions bonus credit promotion · Get started with Claude Code in the cloud · Use Claude Code in the cloud.

John Lock
Written by

John Lock

The Tested Weekly

One email a week with the guides we tested, sources linked. No spam.

Leave a comment

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

Weekly · No spam

The Tested Weekly

One email a week with the guides we tested, sources linked.