← All posts

How Do I Run Claude Code Agents in Parallel in Isolated Environments?

Cloud sessions run Claude Code on a separate virtual machine per task. Start three, close the laptop, and come back to three branches. Here is how it works and where the limits are.

November 17, 2026 8 min read Workflow
Quick answer

Use cloud sessions. Each claude --cloud "task" from your terminal, or each task you start at claude.ai/code, gets its own Anthropic-managed virtual machine that clones your GitHub repository, works on a branch and keeps running after you close your laptop. Start several and they run side by side, isolated from each other and from your machine. Review the diff in the browser, open a pull request, or pull a session into your terminal with claude --teleport. Cloud sessions are on Pro, Max, Ultra and Team plans and on Enterprise premium or Chat + Claude Code seats, and they share your plan's usage limits.

What is a cloud session?

The cloud sessions docs define it as a Claude Code session that runs on cloud infrastructure instead of your computer. By default that is infrastructure Anthropic manages; organizations can route sessions to their own self-hosted environment. There is no separate charge for the VM; usage counts toward your plan like any other Claude Code work.

You can start one from the browser (claude.ai/code, also called Claude Code on the web), the Code tab in the Claude mobile app, the desktop app's Cloud environments, the terminal with claude --cloud, or a cloud scheduled task.

How do I run tasks in parallel?

Each --cloud command creates an independent session:

claude --cloud "Fix the flaky test in auth.spec.ts"
claude --cloud "Update the API documentation"
claude --cloud "Refactor the logger to use structured output"

All three run at the same time in separate VMs. The VM clones your GitHub remote at your current branch, not your local checkout, so push local commits first. The terminal shows a setup checklist while the container starts and queues anything you type until the session is ready.

A pattern the docs recommend for larger work: plan locally, execute in the cloud. Start with claude --permission-mode plan, agree on the approach, save the plan to a file, commit and push, then run claude --cloud "Execute the migration plan in docs/migration-plan.md".

How isolated is each session?

How do results come back?

  1. Review in the browser. After Claude pushes to a branch, the Changes card shows the diff. You can comment on lines and send the comments to Claude.
  2. Open a pull request from claude.ai/code.
  3. Teleport to your terminal. claude --teleport opens a picker; claude --teleport <session-id> resumes one directly. Claude Code checks you are in the same repository with a clean working tree, fetches the branch and loads the conversation.
  4. Steer from anywhere. claude -p "your message" --cloud <session-id> queues a follow-up into a running session from any machine where you are signed in.

Handoff from the CLI is one-way: you can pull cloud sessions into the terminal, but you cannot push an existing terminal session to the cloud.

Can Claude fix CI failures on the pull request by itself?

Yes, with auto-fix. Once the Claude GitHub App is installed on the repository, turn on Auto-fix for a pull request, or run /autofix-pr on the PR's branch. Claude then reacts to failed checks and review comments, pushes clear fixes, and asks you about ambiguous ones. Replies on review threads are posted under your GitHub account and labeled as coming from Claude Code. The docs warn about repositories where a PR comment can trigger deployments or other privileged automation.

What are the limits?

When are local worktrees the better choice?

If the work needs local files, uncommitted changes, local services or tools that only exist on your machine, run parallel sessions locally instead. claude --worktree feature-auth starts Claude in a separate git worktree at .claude/worktrees/feature-auth on its own branch; run the same command with another name in a second terminal. Edits in one worktree cannot collide with the other. In a large repository, the worktree.sparsePaths setting checks out only the folders a task needs.

Cloud sessionsLocal worktrees
Runs onIsolated cloud VMYour machine
Keeps going with laptop closedYesNo
Sees uncommitted local changesNo (except bundles)Yes
NetworkLimited by default, configurableYour network
Best forIndependent, well-scoped tasksTasks tied to your local setup

FAQ

Does a cloud session cost extra?

There is no separate charge for the VM. Usage counts toward your plan's limits alongside your other Claude and Claude Code usage.

Can I start a cloud session from my phone?

Yes. The Code tab in the Claude mobile app starts and monitors cloud sessions.

Do subagents work in cloud sessions?

Yes. They work as they do locally, and subagents defined in the repository's .claude/agents folder load automatically.

Is --remote the same as --cloud?

Yes. --remote is a deprecated alias of --cloud. It is unrelated to --remote-control, which lets you steer a local session from another device.

Sources

Checked against the official docs on November 17, 2026: Use Claude Code in the cloud, Common workflows, CLI reference and Monorepos and large codebases.

See every current command and flag in one reference.

Open the Claude Code Cheatsheet →