2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt
3> Use this file to discover all available pages before exploring further.3> Use this file to discover all available pages before exploring further.
4 4
5# Claude Code on the web5# Use Claude Code on the web
6 6
7> Run Claude Code tasks asynchronously on secure cloud infrastructure7> Configure cloud environments, setup scripts, network access, and Docker in Anthropic's sandbox. Move sessions between web and terminal with `--remote` and `--teleport`.
8 8
9<Note>9<Note>
10 Claude Code on the web is currently in research preview.10 Claude Code on the web is in research preview for Pro, Max, and Team users, and for Enterprise users with premium seats or Chat + Claude Code seats.
11</Note>11</Note>
12 12
13## What is Claude Code on the web?13Claude Code on the web runs tasks on Anthropic-managed cloud infrastructure at [claude.ai/code](https://claude.ai/code). Sessions persist even if you close your browser, and you can monitor them from the Claude mobile app.
14 14
15Claude Code on the web lets developers kick off Claude Code from the Claude app. This is perfect for:15<Tip>
16 16 New to Claude Code on the web? Start with [Get started](/en/web-quickstart) to connect your GitHub account and submit your first task.
17* **Answering questions**: Ask about code architecture and how features are implemented17</Tip>
18* **Bug fixes and routine tasks**: Well-defined tasks that don't require frequent steering
19* **Parallel work**: Tackle multiple bug fixes in parallel
20* **Repositories not on your local machine**: Work on code you don't have checked out locally
21* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests
22
23Claude Code is also available on the Claude app for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) and [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude) for kicking off tasks on the go and monitoring work in progress.
24
25You can [kick off new tasks on the web from your terminal](#from-terminal-to-web) with `--remote`, or [teleport web sessions back to your terminal](#from-web-to-terminal) to continue locally. To use the web interface while running Claude Code on your own machine instead of cloud infrastructure, see [Remote Control](/en/remote-control).
26
27## Who can use Claude Code on the web?
28
29Claude Code on the web is available in research preview to:
30
31* **Pro users**
32* **Max users**
33* **Team users**
34* **Enterprise users** with premium seats or Chat + Claude Code seats
35 18
36## Getting started19This page covers:
37 20
38Set up Claude Code on the web from the browser or from your terminal.21* [GitHub authentication options](#github-authentication-options): two ways to connect GitHub
22* [The cloud environment](#the-cloud-environment): what config carries over, what tools are installed, and how to configure environments
23* [Setup scripts](#setup-scripts) and dependency management
24* [Network access](#network-access): levels, proxies, and the default allowlist
25* [Move tasks between web and terminal](#move-tasks-between-web-and-terminal) with `--remote` and `--teleport`
26* [Work with sessions](#work-with-sessions): reviewing, sharing, archiving, deleting
27* [Auto-fix pull requests](#auto-fix-pull-requests): respond automatically to CI failures and review comments
28* [Security and isolation](#security-and-isolation): how sessions are isolated
29* [Limitations](#limitations): rate limits and platform restrictions
39 30
40### From the browser31## GitHub authentication options
41 32
421. Visit [claude.ai/code](https://claude.ai/code)33Cloud sessions need access to your GitHub repositories to clone code and push branches. You can grant access in two ways:
432. Connect your GitHub account
443. Install the Claude GitHub App in your repositories
454. Select your default environment
465. Submit your coding task
476. Review changes in diff view, iterate with comments, then create a pull request
48 34
49### From the terminal35| Method | How it works | Best for |
36| :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------- |
37| **GitHub App** | Install the Claude GitHub App on specific repositories during [web onboarding](/en/web-quickstart). Access is scoped per repository. | Teams that want explicit per-repo authorization |
38| **`/web-setup`** | Run `/web-setup` in your terminal to sync your local `gh` CLI token to your Claude account. Access matches whatever your `gh` token can see. | Individual developers who already use `gh` |
50 39
51Run `/web-setup` inside Claude Code to connect GitHub using your local `gh` CLI credentials. The command syncs your `gh auth token` to Claude Code on the web, creates a default cloud environment, and opens claude.ai/code in your browser when it finishes.40Either method works. [`/schedule`](/en/web-scheduled-tasks) checks for either form of access and prompts you to run `/web-setup` if neither is configured. See [Connect from your terminal](/en/web-quickstart#connect-from-your-terminal) for the `/web-setup` walkthrough.
52 41
53This path requires the `gh` CLI to be installed and authenticated with `gh auth login`. If `gh` is not available, `/web-setup` opens claude.ai/code so you can connect GitHub from the browser instead.42The GitHub App is required for [Auto-fix](#auto-fix-pull-requests), which uses the App to receive PR webhooks. If you connect with `/web-setup` and later want Auto-fix, install the App on those repositories.
54 43
55Your `gh` credentials give Claude access to clone and push, so you can skip the GitHub App for basic sessions. Install the App later if you want [Auto-fix](#auto-fix-pull-requests), which uses the App to receive PR webhooks.44Team and Enterprise admins can disable `/web-setup` with the Quick web setup toggle at [claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code).
56 45
57<Note>46<Note>
58 Team and Enterprise admins can disable terminal setup with the Quick web setup toggle at [claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code).47 Organizations with [Zero Data Retention](/en/zero-data-retention) enabled cannot use `/web-setup` or other cloud session features.
59</Note>48</Note>
60 49
61## How it works50## The cloud environment
62
63When you start a task on Claude Code on the web:
64 51
651. **Repository cloning**: Your repository is cloned to an Anthropic-managed virtual machine52Each session runs in a fresh Anthropic-managed VM with your repository cloned. This section covers what's available when a session starts and how to customize it.
662. **Environment setup**: Claude prepares a secure cloud environment with your code, then runs your [setup script](#setup-scripts) if configured
673. **Network configuration**: Internet access is configured based on your settings
684. **Task execution**: Claude analyzes code, makes changes, runs tests, and checks its work
695. **Completion**: You're notified when finished and can create a PR with the changes
706. **Results**: Changes are pushed to a branch, ready for pull request creation
71 53
72## Review changes with diff view54### What's available in cloud sessions
73 55
74Diff view lets you see exactly what Claude changed before creating a pull request. Instead of clicking "Create PR" to review changes in GitHub, view the diff directly in the app and iterate with Claude until the changes are ready.56Cloud sessions start from a fresh clone of your repository. Anything committed to the repo is available. Anything you've installed or configured only on your own machine is not.
75 57
76When Claude makes changes to files, a diff stats indicator appears showing the number of lines added and removed (for example, `+12 -1`). Select this indicator to open the diff viewer, which displays a file list on the left and the changes for each file on the right.58| | Available in cloud sessions | Why |
59| :-------------------------------------------------------------------- | :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
60| Your repo's `CLAUDE.md` | Yes | Part of the clone |
61| Your repo's `.claude/settings.json` hooks | Yes | Part of the clone |
62| Your repo's `.mcp.json` MCP servers | Yes | Part of the clone |
63| Your repo's `.claude/rules/` | Yes | Part of the clone |
64| Your repo's `.claude/skills/`, `.claude/agents/`, `.claude/commands/` | Yes | Part of the clone |
65| Plugins declared in `.claude/settings.json` | Yes | Installed at session start from the [marketplace](/en/plugin-marketplaces) you declared. Requires network access to reach the marketplace source |
66| Your user `~/.claude/CLAUDE.md` | No | Lives on your machine, not in the repo |
67| Plugins enabled only in your user settings | No | User-scoped `enabledPlugins` lives in `~/.claude/settings.json`. Declare them in the repo's `.claude/settings.json` instead |
68| MCP servers you added with `claude mcp add` | No | Those write to your local user config, not the repo. Declare the server in [`.mcp.json`](/en/mcp#project-scope) instead |
69| Static API tokens and credentials | No | No dedicated secrets store exists yet. See below |
70| Interactive auth like AWS SSO | No | Not supported. SSO requires browser-based login that can't run in a cloud session |
77 71
78From the diff view, you can:72To make configuration available in cloud sessions, commit it to the repo. A dedicated secrets store is not yet available. Both environment variables and setup scripts are stored in the environment configuration, visible to anyone who can edit that environment. If you need secrets in a cloud session, add them as environment variables with that visibility in mind.
79 73
80* Review changes file by file74### Installed tools
81* Comment on specific changes to request modifications
82* Continue iterating with Claude based on what you see
83 75
84This lets you refine changes through multiple rounds of feedback without creating draft PRs or switching to GitHub.76Cloud sessions come with common language runtimes, build tools, and databases pre-installed. The table below summarizes what's included by category.
85 77
86## Auto-fix pull requests78| Category | Included |
79| :------------ | :--------------------------------------------------------------------------------- |
80| **Python** | Python 3.x with pip, poetry, uv, black, mypy, pytest, ruff |
81| **Node.js** | 20, 21, and 22 via nvm, with npm, yarn, pnpm, bun¹, eslint, prettier, chromedriver |
82| **Ruby** | 3.1, 3.2, 3.3 with gem, bundler, rbenv |
83| **PHP** | 8.4 with Composer |
84| **Java** | OpenJDK 21 with Maven and Gradle |
85| **Go** | latest stable with module support |
86| **Rust** | rustc and cargo |
87| **C/C++** | GCC, Clang, cmake, ninja, conan |
88| **Docker** | docker, dockerd, docker compose |
89| **Databases** | PostgreSQL 16, Redis 7.0 |
90| **Utilities** | git, jq, yq, ripgrep, tmux, vim, nano |
87 91
88Claude can watch a pull request and automatically respond to CI failures and review comments. Claude subscribes to GitHub activity on the PR, and when a check fails or a reviewer leaves a comment, Claude investigates and pushes a fix if one is clear.92¹ Bun is installed but has known [proxy compatibility issues](#install-dependencies-with-a-sessionstart-hook) for package fetching.
89
90<Note>
91 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](https://github.com/apps/claude) or when prompted during [setup](#getting-started).
92</Note>
93 93
94There are a few ways to turn on auto-fix depending on where the PR came from and what device you're using:94For exact versions, ask Claude to run `check-tools` in a cloud session. This command only exists in cloud sessions.
95 95
96* **PRs created in Claude Code on the web**: open the CI status bar and select **Auto-fix**96### Work with GitHub issues and pull requests
97* **From the mobile app**: tell Claude to auto-fix the PR, for example "watch this PR and fix any CI failures or review comments"
98* **Any existing PR**: paste the PR URL into a session and tell Claude to auto-fix it
99 97
100### How Claude responds to PR activity98Cloud sessions include built-in GitHub tools that let Claude read issues, list pull requests, fetch diffs, and post comments without any setup. These tools authenticate through the [GitHub proxy](#github-proxy) using whichever method you configured under [GitHub authentication options](#github-authentication-options), so your token never enters the container.
101 99
102When 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:100The `gh` CLI is not pre-installed. If you need a `gh` command the built-in tools don't cover, like `gh release` or `gh workflow run`, install and authenticate it yourself:
103 101
104* **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 session102<Steps>
105* **Ambiguous requests**: if a reviewer's comment could be interpreted multiple ways or involves something architecturally significant, Claude asks you before acting103 <Step title="Install gh in your setup script">
106* **Duplicate or no-action events**: if an event is a duplicate or requires no change, Claude notes it in the session and moves on104 Add `apt update && apt install -y gh` to your [setup script](#setup-scripts).
105 </Step>
107 106
108Claude may reply to review comment threads on GitHub as part of resolving them. These replies are posted using your GitHub account, so they appear under your username, but each reply is labeled as coming from Claude Code so reviewers know it was written by the agent and not by you directly.107 <Step title="Provide a token">
108 Add a `GH_TOKEN` environment variable to your [environment settings](#configure-your-environment) with a GitHub personal access token. `gh` reads `GH_TOKEN` automatically, so no `gh auth login` step is needed.
109 </Step>
110</Steps>
109 111
110<Warning>112### Run tests, start services, and add packages
111 If your repository uses comment-triggered automation such as Atlantis, Terraform Cloud, or custom GitHub Actions that run on `issue_comment` events, be aware that Claude can reply on your behalf, which can trigger those workflows. Review your repository's automation before enabling auto-fix, and consider disabling auto-fix for repositories where a PR comment can deploy infrastructure or run privileged operations.
112</Warning>
113 113
114## Moving tasks between web and terminal114Claude runs tests as part of working on a task. Ask for it in your prompt, like "fix the failing tests in `tests/`" or "run pytest after each change." Test runners like pytest, jest, and cargo test work out of the box since they're pre-installed.
115 115
116You can start new tasks on the web from your terminal, or pull web sessions into your terminal to continue locally. Web sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude mobile app.116PostgreSQL and Redis are pre-installed but not running by default. Start each one in a [setup script](#setup-scripts) or ask Claude to start it during the session:
117 117
118<Note>118```bash theme={null}
119 Session handoff is one-way: you can pull web sessions into your terminal, but you can't push an existing terminal session to the web. The `--remote` flag creates a *new* web session for your current repository.119service postgresql start
120</Note>120```
121
122### From terminal to web
123
124Start a web session from the command line with the `--remote` flag:
125 121
126```bash theme={null}122```bash theme={null}
127claude --remote "Fix the authentication bug in src/auth/login.ts"123service redis-server start
128```124```
129 125
130This creates a new web session on claude.ai. The task runs in the cloud while you continue working locally. Use `/tasks` to check progress, or open the session on claude.ai or the Claude mobile app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation.126Docker is available for running containerized services. Network access to pull images follows your environment's [access level](#access-levels).
131 127
132#### Tips for remote tasks128To add packages that aren't pre-installed, use a [setup script](#setup-scripts) so they're available at session start. You can also ask Claude to install packages during the session, but those installs don't persist across sessions.
133 129
134**Plan locally, execute remotely**: For complex tasks, start Claude in plan mode to collaborate on the approach, then send work to the web:130### Resource limits
135 131
136```bash theme={null}132Cloud sessions run with approximate resource ceilings that may change over time:
137claude --permission-mode plan
138```
139 133
140In plan mode, Claude can only read files and explore the codebase. Once you're satisfied with the plan, start a remote session for autonomous execution:134* 4 vCPUs
135* 16 GB of RAM
136* 30 GB of disk
141 137
142```bash theme={null}138Tasks requiring significantly more memory, such as large build jobs or memory-intensive tests, may fail or be terminated. For workloads beyond these limits, use [Remote Control](/en/remote-control) to run Claude Code on your own hardware.
143claude --remote "Execute the migration plan in docs/migration-plan.md"
144```
145 139
146This pattern gives you control over the strategy while letting Claude execute autonomously in the cloud.140### Configure your environment
147 141
148**Plan in the cloud with ultraplan**: To draft and review the plan itself in a web session, use [ultraplan](/en/ultraplan). Claude generates the plan on Claude Code on the web while you keep working, then you comment on sections in your browser and choose to execute remotely or send the plan back to your terminal.142Environments control [network access](#network-access), environment variables, and the [setup script](#setup-scripts) that runs before a session starts. See [Installed tools](#installed-tools) for what's available without any configuration. You can manage environments from the web interface or the terminal:
149 143
150**Run tasks in parallel**: Each `--remote` command creates its own web session that runs independently. You can kick off multiple tasks and they'll all run simultaneously in separate sessions:144| Action | How |
145| :----------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
146| Add an environment | Select the current environment to open the selector, then select **Add environment**. The dialog includes name, network access level, environment variables, and setup script. |
147| Edit an environment | Select the settings icon to the right of the environment name. |
148| Archive an environment | Open the environment for editing and select **Archive**. Archived environments are hidden from the selector but existing sessions keep running. |
149| Set the default for `--remote` | Run `/remote-env` in your terminal. If you have a single environment, this command shows your current configuration. `/remote-env` only selects the default; add, edit, and archive environments from the web interface. |
151 150
152```bash theme={null}151Environment variables use `.env` format with one `KEY=value` pair per line. Don't wrap values in quotes, since quotes are stored as part of the value.
153claude --remote "Fix the flaky test in auth.spec.ts"152
154claude --remote "Update the API documentation"153```text theme={null}
155claude --remote "Refactor the logger to use structured output"154NODE_ENV=development
155LOG_LEVEL=debug
156DATABASE_URL=postgres://localhost:5432/myapp
156```157```
157 158
158Monitor all sessions with `/tasks`. When a session completes, you can create a PR from the web interface or [teleport](#from-web-to-terminal) the session to your terminal to continue working.159## Setup scripts
159 160
160### From web to terminal161A setup script is a Bash script that runs when a new cloud session starts, before Claude Code launches. Use setup scripts to install dependencies, configure tools, or fetch anything the session needs that isn't pre-installed.
161 162
162There are several ways to pull a web session into your terminal:163Scripts run as root on Ubuntu 24.04, so `apt install` and most language package managers work.
163 164
164* **Using `/teleport`**: From within Claude Code, run `/teleport` (or `/tp`) to see an interactive picker of your web sessions. If you have uncommitted changes, you'll be prompted to stash them first.165To add a setup script, open the environment settings dialog and enter your script in the **Setup script** field.
165* **Using `--teleport`**: From the command line, run `claude --teleport` for an interactive session picker, or `claude --teleport <session-id>` to resume a specific session directly.
166* **From `/tasks`**: Run `/tasks` to see your background sessions, then press `t` to teleport into one
167* **From the web interface**: Click "Open in CLI" to copy a command you can paste into your terminal
168 166
169When you teleport a session, Claude verifies you're in the correct repository, fetches and checks out the branch from the remote session, and loads the full conversation history into your terminal.167This example installs the `gh` CLI, which isn't pre-installed:
170 168
171#### Requirements for teleporting169```bash theme={null}
170#!/bin/bash
171apt update && apt install -y gh
172```
172 173
173Teleport checks these requirements before resuming a session. If any requirement isn't met, you'll see an error or be prompted to resolve the issue.174Setup scripts run only when creating a new session. They are skipped when resuming an existing session.
174 175
175| Requirement | Details |176If the script exits non-zero, the session fails to start. Append `|| true` to non-critical commands to avoid blocking the session on an intermittent install failure.
176| ------------------ | ---------------------------------------------------------------------------------------------------------------------- |
177| Clean git state | Your working directory must have no uncommitted changes. Teleport prompts you to stash changes if needed. |
178| Correct repository | You must run `--teleport` from a checkout of the same repository, not a fork. |
179| Branch available | The branch from the web session must have been pushed to the remote. Teleport automatically fetches and checks it out. |
180| Same account | You must be authenticated to the same Claude.ai account used in the web session. |
181 177
182### Sharing sessions178<Note>
179 Setup scripts that install packages need network access to reach registries. The default **Trusted** network access allows connections to [common package registries](#default-allowed-domains) including npm, PyPI, RubyGems, and crates.io. Scripts will fail to install packages if your environment uses **None** network access.
180</Note>
183 181
184To share a session, toggle its visibility according to the account182### Setup scripts vs. SessionStart hooks
185types below. After that, share the session link as-is. Recipients who open your
186shared session will see the latest state of the session upon load, but the
187recipient's page will not update in real time.
188 183
189#### Sharing from an Enterprise or Team account184Use a setup script to install things the cloud needs but your laptop already has, like a language runtime or CLI tool. Use a [SessionStart hook](/en/hooks#sessionstart) for project setup that should run everywhere, cloud and local, like `npm install`.
190 185
191For Enterprise and Team accounts, the two visibility options are **Private**186Both run at the start of a session, but they belong to different places:
192and **Team**. Team visibility makes the session visible to other members of your
193Claude.ai organization. Repository access verification is enabled by default,
194based on the GitHub account connected to the recipient's account. Your account's
195display name is visible to all recipients with access. [Claude in Slack](/en/slack)
196sessions are automatically shared with Team visibility.
197 187
198#### Sharing from a Max or Pro account188| | Setup scripts | SessionStart hooks |
189| ------------- | ------------------------------------------------- | -------------------------------------------------------------- |
190| Attached to | The cloud environment | Your repository |
191| Configured in | Cloud environment UI | `.claude/settings.json` in your repo |
192| Runs | Before Claude Code launches, on new sessions only | After Claude Code launches, on every session including resumed |
193| Scope | Cloud environments only | Both local and cloud |
199 194
200For Max and Pro accounts, the two visibility options are **Private**195SessionStart hooks can also be defined in your user-level `~/.claude/settings.json` locally, but user-level settings don't carry over to cloud sessions. In the cloud, only hooks committed to the repo run.
201and **Public**. Public visibility makes the session visible to any user logged
202into claude.ai.
203 196
204Check your session for sensitive content before sharing. Sessions may contain197### Install dependencies with a SessionStart hook
205code and credentials from private GitHub repositories. Repository access
206verification is not enabled by default.
207 198
208Enable repository access verification and/or withhold your name from your shared199To install dependencies only in cloud sessions, add a SessionStart hook to your repo's `.claude/settings.json`:
209sessions by going to Settings > Claude Code > Sharing settings.
210 200
211## Schedule recurring tasks201```json theme={null}
202{
203 "hooks": {
204 "SessionStart": [
205 {
206 "matcher": "startup|resume",
207 "hooks": [
208 {
209 "type": "command",
210 "command": "\"$CLAUDE_PROJECT_DIR\"/scripts/install_pkgs.sh"
211 }
212 ]
213 }
214 ]
215 }
216}
217```
212 218
213Run Claude on a recurring schedule to automate work like daily PR reviews, dependency audits, and CI failure analysis. See [Schedule tasks on the web](/en/web-scheduled-tasks) for the full guide.219Create the script at `scripts/install_pkgs.sh` and make it executable with `chmod +x`. The `CLAUDE_CODE_REMOTE` environment variable is set to `true` in cloud sessions, so you can use it to skip local execution:
214 220
215## Managing sessions221```bash theme={null}
222#!/bin/bash
216 223
217### Archiving sessions224if [ "$CLAUDE_CODE_REMOTE" != "true" ]; then
225 exit 0
226fi
218 227
219You can archive sessions to keep your session list organized. Archived sessions are hidden from the default session list but can be viewed by filtering for archived sessions.228npm install
229pip install -r requirements.txt
230exit 0
231```
220 232
221To archive a session, hover over the session in the sidebar and click the archive icon.233SessionStart hooks have some limitations in cloud sessions:
222 234
223### Deleting sessions235* **No cloud-only scoping**: hooks run in both local and cloud sessions. To skip local execution, check the `CLAUDE_CODE_REMOTE` environment variable as shown above.
236* **Requires network access**: install commands need to reach package registries. If your environment uses **None** network access, these hooks fail. The [default allowlist](#default-allowed-domains) under **Trusted** covers npm, PyPI, RubyGems, and crates.io.
237* **Proxy compatibility**: all outbound traffic passes through a [security proxy](#security-proxy). Some package managers don't work correctly with this proxy. Bun is a known example.
238* **Adds startup latency**: hooks run each time a session starts or resumes. Keep install scripts fast by checking whether dependencies are already present before reinstalling.
224 239
225Deleting a session permanently removes the session and its data. This action cannot be undone. You can delete a session in two ways:240To persist environment variables for subsequent Bash commands, write to the file at `$CLAUDE_ENV_FILE`. See [SessionStart hooks](/en/hooks#sessionstart) for details.
226 241
227* **From the sidebar**: Filter for archived sessions, then hover over the session you want to delete and click the delete icon242Custom environment images and snapshots are not yet supported.
228* **From the session menu**: Open a session, click the dropdown next to the session title, and select **Delete**
229 243
230You will be asked to confirm before a session is deleted.244## Network access
245
246Network access controls outbound connections from the cloud environment. Each environment specifies one access level, and you can extend it with custom allowed domains. The default is **Trusted**, which allows package registries and other [allowlisted domains](#default-allowed-domains).
231 247
232## Cloud environment248### Access levels
233 249
234### Default image250Choose an access level when you create or edit an environment:
235 251
236We build and maintain a universal image with common toolchains and language ecosystems pre-installed. This image includes:252| Level | Outbound connections |
253| :---------- | :------------------------------------------------------------------------------------------- |
254| **None** | No outbound network access |
255| **Trusted** | [Allowlisted domains](#default-allowed-domains) only: package registries, GitHub, cloud SDKs |
256| **Full** | Any domain |
257| **Custom** | Your own allowlist, optionally including the defaults |
237 258
238* Popular programming languages and runtimes259GitHub operations use a [separate proxy](#github-proxy) that is independent of this setting.
239* Common build tools and package managers
240* Testing frameworks and linters
241 260
242#### Checking available tools261### Allow specific domains
243 262
244To see what's pre-installed in your environment, ask Claude Code to run:263To allow domains that aren't in the Trusted list, select **Custom** in the environment's network access settings. An **Allowed domains** field appears. Enter one domain per line:
245 264
246```bash theme={null}265```text theme={null}
247check-tools266api.example.com
267*.internal.example.com
268registry.example.com
248```269```
249 270
250This command displays:271Use `*.` for wildcard subdomain matching. Check **Also include default list of common package managers** to keep the [Trusted domains](#default-allowed-domains) alongside your custom entries, or leave it unchecked to allow only what you list.
251 272
252* Programming languages and their versions273### GitHub proxy
253* Available package managers
254* Installed development tools
255 274
256#### Language-specific setups275For security, all GitHub operations go through a dedicated proxy service that transparently handles all git interactions. Inside the sandbox, the git client authenticates using a custom-built scoped credential. This proxy:
257 276
258The universal image includes pre-configured environments for:277* Manages GitHub authentication securely: the git client uses a scoped credential inside the sandbox, which the proxy verifies and translates to your actual GitHub authentication token
278* Restricts git push operations to the current working branch for safety
279* Enables cloning, fetching, and PR operations while maintaining security boundaries
259 280
260* **Python**: Python 3.x with pip, poetry, and common scientific libraries281### Security proxy
261* **Node.js**: Latest LTS versions with npm, yarn, pnpm, and bun
262* **Ruby**: Versions 3.1.6, 3.2.6, 3.3.6 (default: 3.3.6) with gem, bundler, and rbenv for version management
263* **PHP**: Version 8.4.14
264* **Java**: OpenJDK with Maven and Gradle
265* **Go**: Latest stable version with module support
266* **Rust**: Rust toolchain with cargo
267* **C++**: GCC and Clang compilers
268 282
269#### Databases283Environments run behind an HTTP/HTTPS network proxy for security and abuse prevention purposes. All outbound internet traffic passes through this proxy, which provides:
270 284
271The universal image includes the following databases:285* Protection against malicious requests
286* Rate limiting and abuse prevention
287* Content filtering for enhanced security
272 288
273* **PostgreSQL**: Version 16289### Default allowed domains
274* **Redis**: Version 7.0
275 290
276### Environment configuration291When using **Trusted** network access, the following domains are allowed by default. Domains marked with `*` indicate wildcard subdomain matching, so `*.gcr.io` allows any subdomain of `gcr.io`.
292
293<AccordionGroup>
294 <Accordion title="Anthropic services">
295 * api.anthropic.com
296 * statsig.anthropic.com
297 * docs.claude.com
298 * platform.claude.com
299 * code.claude.com
300 * claude.ai
301 </Accordion>
302
303 <Accordion title="Version control">
304 * github.com
305 * [www.github.com](http://www.github.com)
306 * api.github.com
307 * npm.pkg.github.com
308 * raw\.githubusercontent.com
309 * pkg-npm.githubusercontent.com
310 * objects.githubusercontent.com
311 * release-assets.githubusercontent.com
312 * codeload.github.com
313 * avatars.githubusercontent.com
314 * camo.githubusercontent.com
315 * gist.github.com
316 * gitlab.com
317 * [www.gitlab.com](http://www.gitlab.com)
318 * registry.gitlab.com
319 * bitbucket.org
320 * [www.bitbucket.org](http://www.bitbucket.org)
321 * api.bitbucket.org
322 </Accordion>
323
324 <Accordion title="Container registries">
325 * registry-1.docker.io
326 * auth.docker.io
327 * index.docker.io
328 * hub.docker.com
329 * [www.docker.com](http://www.docker.com)
330 * production.cloudflare.docker.com
331 * download.docker.com
332 * gcr.io
333 * \*.gcr.io
334 * ghcr.io
335 * mcr.microsoft.com
336 * \*.data.mcr.microsoft.com
337 * public.ecr.aws
338 </Accordion>
339
340 <Accordion title="Cloud platforms">
341 * cloud.google.com
342 * accounts.google.com
343 * gcloud.google.com
344 * \*.googleapis.com
345 * storage.googleapis.com
346 * compute.googleapis.com
347 * container.googleapis.com
348 * azure.com
349 * portal.azure.com
350 * microsoft.com
351 * [www.microsoft.com](http://www.microsoft.com)
352 * \*.microsoftonline.com
353 * packages.microsoft.com
354 * dotnet.microsoft.com
355 * dot.net
356 * visualstudio.com
357 * dev.azure.com
358 * \*.amazonaws.com
359 * \*.api.aws
360 * oracle.com
361 * [www.oracle.com](http://www.oracle.com)
362 * java.com
363 * [www.java.com](http://www.java.com)
364 * java.net
365 * [www.java.net](http://www.java.net)
366 * download.oracle.com
367 * yum.oracle.com
368 </Accordion>
369
370 <Accordion title="JavaScript and Node package managers">
371 * registry.npmjs.org
372 * [www.npmjs.com](http://www.npmjs.com)
373 * [www.npmjs.org](http://www.npmjs.org)
374 * npmjs.com
375 * npmjs.org
376 * yarnpkg.com
377 * registry.yarnpkg.com
378 </Accordion>
379
380 <Accordion title="Python package managers">
381 * pypi.org
382 * [www.pypi.org](http://www.pypi.org)
383 * files.pythonhosted.org
384 * pythonhosted.org
385 * test.pypi.org
386 * pypi.python.org
387 * pypa.io
388 * [www.pypa.io](http://www.pypa.io)
389 </Accordion>
390
391 <Accordion title="Ruby package managers">
392 * rubygems.org
393 * [www.rubygems.org](http://www.rubygems.org)
394 * api.rubygems.org
395 * index.rubygems.org
396 * ruby-lang.org
397 * [www.ruby-lang.org](http://www.ruby-lang.org)
398 * rubyforge.org
399 * [www.rubyforge.org](http://www.rubyforge.org)
400 * rubyonrails.org
401 * [www.rubyonrails.org](http://www.rubyonrails.org)
402 * rvm.io
403 * get.rvm.io
404 </Accordion>
405
406 <Accordion title="Rust package managers">
407 * crates.io
408 * [www.crates.io](http://www.crates.io)
409 * index.crates.io
410 * static.crates.io
411 * rustup.rs
412 * static.rust-lang.org
413 * [www.rust-lang.org](http://www.rust-lang.org)
414 </Accordion>
415
416 <Accordion title="Go package managers">
417 * proxy.golang.org
418 * sum.golang.org
419 * index.golang.org
420 * golang.org
421 * [www.golang.org](http://www.golang.org)
422 * goproxy.io
423 * pkg.go.dev
424 </Accordion>
425
426 <Accordion title="JVM package managers">
427 * maven.org
428 * repo.maven.org
429 * central.maven.org
430 * repo1.maven.org
431 * repo.maven.apache.org
432 * jcenter.bintray.com
433 * gradle.org
434 * [www.gradle.org](http://www.gradle.org)
435 * services.gradle.org
436 * plugins.gradle.org
437 * kotlinlang.org
438 * [www.kotlinlang.org](http://www.kotlinlang.org)
439 * spring.io
440 * repo.spring.io
441 </Accordion>
442
443 <Accordion title="Other package managers">
444 * packagist.org (PHP Composer)
445 * [www.packagist.org](http://www.packagist.org)
446 * repo.packagist.org
447 * nuget.org (.NET NuGet)
448 * [www.nuget.org](http://www.nuget.org)
449 * api.nuget.org
450 * pub.dev (Dart/Flutter)
451 * api.pub.dev
452 * hex.pm (Elixir/Erlang)
453 * [www.hex.pm](http://www.hex.pm)
454 * cpan.org (Perl CPAN)
455 * [www.cpan.org](http://www.cpan.org)
456 * metacpan.org
457 * [www.metacpan.org](http://www.metacpan.org)
458 * api.metacpan.org
459 * cocoapods.org (iOS/macOS)
460 * [www.cocoapods.org](http://www.cocoapods.org)
461 * cdn.cocoapods.org
462 * haskell.org
463 * [www.haskell.org](http://www.haskell.org)
464 * hackage.haskell.org
465 * swift.org
466 * [www.swift.org](http://www.swift.org)
467 </Accordion>
468
469 <Accordion title="Linux distributions">
470 * archive.ubuntu.com
471 * security.ubuntu.com
472 * ubuntu.com
473 * [www.ubuntu.com](http://www.ubuntu.com)
474 * \*.ubuntu.com
475 * ppa.launchpad.net
476 * launchpad.net
477 * [www.launchpad.net](http://www.launchpad.net)
478 * \*.nixos.org
479 </Accordion>
480
481 <Accordion title="Development tools and platforms">
482 * dl.k8s.io (Kubernetes)
483 * pkgs.k8s.io
484 * k8s.io
485 * [www.k8s.io](http://www.k8s.io)
486 * releases.hashicorp.com (HashiCorp)
487 * apt.releases.hashicorp.com
488 * rpm.releases.hashicorp.com
489 * archive.releases.hashicorp.com
490 * hashicorp.com
491 * [www.hashicorp.com](http://www.hashicorp.com)
492 * repo.anaconda.com (Anaconda/Conda)
493 * conda.anaconda.org
494 * anaconda.org
495 * [www.anaconda.com](http://www.anaconda.com)
496 * anaconda.com
497 * continuum.io
498 * apache.org (Apache)
499 * [www.apache.org](http://www.apache.org)
500 * archive.apache.org
501 * downloads.apache.org
502 * eclipse.org (Eclipse)
503 * [www.eclipse.org](http://www.eclipse.org)
504 * download.eclipse.org
505 * nodejs.org (Node.js)
506 * [www.nodejs.org](http://www.nodejs.org)
507 * developer.apple.com
508 * developer.android.com
509 * pkg.stainless.com
510 * binaries.prisma.sh
511 </Accordion>
512
513 <Accordion title="Cloud services and monitoring">
514 * statsig.com
515 * [www.statsig.com](http://www.statsig.com)
516 * api.statsig.com
517 * sentry.io
518 * \*.sentry.io
519 * downloads.sentry-cdn.com
520 * http-intake.logs.datadoghq.com
521 * \*.datadoghq.com
522 * \*.datadoghq.eu
523 * api.honeycomb.io
524 </Accordion>
525
526 <Accordion title="Content delivery and mirrors">
527 * sourceforge.net
528 * \*.sourceforge.net
529 * packagecloud.io
530 * \*.packagecloud.io
531 * fonts.googleapis.com
532 * fonts.gstatic.com
533 </Accordion>
534
535 <Accordion title="Schema and configuration">
536 * json-schema.org
537 * [www.json-schema.org](http://www.json-schema.org)
538 * json.schemastore.org
539 * [www.schemastore.org](http://www.schemastore.org)
540 </Accordion>
541
542 <Accordion title="Model Context Protocol">
543 * \*.modelcontextprotocol.io
544 </Accordion>
545</AccordionGroup>
546
547## Move tasks between web and terminal
548
549These workflows require the [Claude Code CLI](/en/quickstart) 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.
277 550
278When you start a session in Claude Code on the web, here's what happens under the hood:551<Note>
552 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 web. The `--remote` flag creates a new cloud session for your current repository. The [Desktop app](/en/desktop#continue-in-another-surface) provides a Continue in menu that can send a local session to the web.
553</Note>
279 554
2801. **Environment preparation**: We clone your repository and run any configured [setup script](#setup-scripts). The repo will be cloned with the default branch on your GitHub repo. If you would like to check out a specific branch, you can specify that in the prompt.555### From terminal to web
281 556
2822. **Network configuration**: We configure internet access for the agent. Internet access is limited by default, but you can configure the environment to have no internet or full internet access based on your needs.557Start a cloud session from the command line with the `--remote` flag:
283 558
2843. **Claude Code execution**: Claude Code runs to complete your task, writing code, running tests, and checking its work. You can guide and steer Claude throughout the session via the web interface. Claude respects context you've defined in your `CLAUDE.md`.559```bash theme={null}
560claude --remote "Fix the authentication bug in src/auth/login.ts"
561```
285 562
2864. **Outcome**: When Claude completes its work, it will push the branch to remote. You will be able to create a PR for the branch.563This creates a new cloud session on claude.ai. The session clones your current directory's GitHub remote at your current branch, so push first if you have local commits, since the VM clones from GitHub rather than your machine. `--remote` works with a single repository at a time. The task runs in the cloud while you continue working locally.
287 564
288<Note>565<Note>
289 Claude operates entirely through the terminal and CLI tools available in the environment. It uses the pre-installed tools in the universal image and any additional tools you install through hooks or dependency management.566 `--remote` creates cloud sessions. `--remote-control` is unrelated: it exposes a local CLI session for monitoring from the web. See [Remote Control](/en/remote-control).
290</Note>567</Note>
291 568
292**To add a new environment:** Select the current environment to open the environment selector, and then select "Add environment". This will open a dialog where you can specify the environment name, network access level, environment variables, and a [setup script](#setup-scripts).569Use `/tasks` in the Claude Code CLI to check progress, or open the session on claude.ai or the Claude mobile app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation.
293 570
294**To update an existing environment:** Select the current environment, to the right of the environment name, and select the settings button. This will open a dialog where you can update the environment name, network access, environment variables, and setup script.571#### Tips for cloud tasks
295 572
296**To select your default environment from the terminal:** If you have multiple environments configured, run `/remote-env` to choose which one to use when starting web sessions from your terminal with `--remote`. With a single environment, this command shows your current configuration.573**Plan locally, execute remotely**: for complex tasks, start Claude in plan mode to collaborate on the approach, then send work to the cloud:
297 574
298<Note>575```bash theme={null}
299 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:576claude --permission-mode plan
577```
300 578
301 ```text theme={null}579In 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 it. Then start a cloud session for autonomous execution:
302 API_KEY=your_api_key
303 DEBUG=true
304 ```
305</Note>
306 580
307### Setup scripts581```bash theme={null}
582claude --remote "Execute the migration plan in docs/migration-plan.md"
583```
308 584
309A setup script is a Bash script that runs when a new cloud session starts, before Claude Code launches. Use setup scripts to install dependencies, configure tools, or prepare anything the cloud environment needs that isn't in the [default image](#default-image).585This pattern gives you control over the strategy while letting Claude execute autonomously in the cloud.
310 586
311Scripts run as root on Ubuntu 24.04, so `apt install` and most language package managers work.587**Plan in the cloud with ultraplan**: to draft and review the plan itself in a web session, use [ultraplan](/en/ultraplan). Claude generates the plan on Claude Code on the web while you keep working, then you comment on sections in your browser and choose to execute remotely or send the plan back to your terminal.
312 588
313<Tip>589**Run tasks in parallel**: each `--remote` command creates its own cloud session that runs independently. You can start multiple tasks and they'll all run simultaneously in separate sessions:
314 To check what's already installed before adding it to your script, ask Claude to run `check-tools` in a cloud session.
315</Tip>
316 590
317To add a setup script, open the environment settings dialog and enter your script in the **Setup script** field.591```bash theme={null}
592claude --remote "Fix the flaky test in auth.spec.ts"
593claude --remote "Update the API documentation"
594claude --remote "Refactor the logger to use structured output"
595```
596
597Monitor all sessions with `/tasks` in the Claude Code CLI. When a session completes, you can create a PR from the web interface or [teleport](#from-web-to-terminal) the session to your terminal to continue working.
598
599#### Send local repositories without GitHub
600
601When you run `claude --remote` from a repository that isn't connected to GitHub, Claude Code bundles your local repository and uploads it directly to the cloud session. The bundle includes your full repository history across all branches, plus any uncommitted changes to tracked files.
318 602
319This example installs the `gh` CLI, which isn't in the default image:603This fallback activates automatically when GitHub access isn't available. To force it even when GitHub is connected, set `CCR_FORCE_BUNDLE=1`:
320 604
321```bash theme={null}605```bash theme={null}
322#!/bin/bash606CCR_FORCE_BUNDLE=1 claude --remote "Run the test suite and fix any failures"
323apt update && apt install -y gh
324```607```
325 608
326Setup scripts run only when creating a new session. They are skipped when resuming an existing session.609Bundled repositories must meet these limits:
327 610
328If the script exits non-zero, the session fails to start. Append `|| true` to non-critical commands to avoid blocking the session on a flaky install.611* The directory must be a git repository with at least one commit
612* 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 only if the snapshot is still too large
613* Untracked files are not included; run `git add` on files you want the cloud session to see
614* Sessions created from a bundle can't push back to a remote unless you also have [GitHub authentication](#github-authentication-options) configured
329 615
330<Note>616### From web to terminal
331 Setup scripts that install packages need network access to reach registries. The default network access allows connections to [common package registries](#default-allowed-domains) including npm, PyPI, RubyGems, and crates.io. Scripts will fail to install packages if your environment has network access disabled.
332</Note>
333 617
334#### Setup scripts vs. SessionStart hooks618Pull a cloud session into your terminal using any of these:
335 619
336Use a setup script to install things the cloud needs but your laptop already has, like a language runtime or CLI tool. Use a [SessionStart hook](/en/hooks#sessionstart) for project setup that should run everywhere, cloud and local, like `npm install`.620* **Using `--teleport`**: from the command line, run `claude --teleport` for an interactive session picker, or `claude --teleport <session-id>` to resume a specific session directly. If you have uncommitted changes, you'll be prompted to stash them first.
621* **Using `/teleport`**: inside an existing CLI session, run `/teleport` (or `/tp`) to open the same session picker without restarting Claude Code.
622* **From `/tasks`**: run `/tasks` to see your background sessions, then press `t` to teleport into one
623* **From the web interface**: select **Open in CLI** to copy a command you can paste into your terminal
337 624
338Both run at the start of a session, but they belong to different places:625When you teleport a session, Claude verifies you're in the correct repository, fetches and checks out the branch from the cloud session, and loads the full conversation history into your terminal.
339 626
340| | Setup scripts | SessionStart hooks |627`--teleport` is distinct from `--resume`. `--resume` reopens a conversation from this machine's local history and doesn't list cloud sessions; `--teleport` pulls a cloud session and its branch.
341| ------------- | ------------------------------------------------- | -------------------------------------------------------------- |
342| Attached to | The cloud environment | Your repository |
343| Configured in | Cloud environment UI | `.claude/settings.json` in your repo |
344| Runs | Before Claude Code launches, on new sessions only | After Claude Code launches, on every session including resumed |
345| Scope | Cloud environments only | Both local and cloud |
346 628
347SessionStart hooks can also be defined in your user-level `~/.claude/settings.json` locally, but user-level settings don't carry over to cloud sessions. In the cloud, only hooks committed to the repo run.629#### Teleport requirements
348 630
349### Dependency management631Teleport checks these requirements before resuming a session. If any requirement isn't met, you'll see an error or be prompted to resolve the issue.
350 632
351Custom environment images and snapshots are not yet supported. Use [setup scripts](#setup-scripts) to install packages when a session starts, or [SessionStart hooks](/en/hooks#sessionstart) for dependency installation that should also run in local environments. SessionStart hooks have [known limitations](#dependency-management-limitations).633| Requirement | Details |
634| ------------------ | ------------------------------------------------------------------------------------------------------------------------ |
635| Clean git state | Your working directory must have no uncommitted changes. Teleport prompts you to stash changes if needed. |
636| Correct repository | You must run `--teleport` from a checkout of the same repository, not a fork. |
637| Branch available | The branch from the cloud session must have been pushed to the remote. Teleport automatically fetches and checks it out. |
638| Same account | You must be authenticated to the same claude.ai account used in the cloud session. |
352 639
353To configure automatic dependency installation with a setup script, open your environment settings and add a script:640#### `--teleport` is unavailable
354 641
355```bash theme={null}642Teleport requires claude.ai subscription authentication. If you're authenticated via API key, Bedrock, Vertex AI, or Microsoft Foundry, run `/login` to sign in with your claude.ai account instead. If you're already signed in via claude.ai and `--teleport` is still unavailable, your organization may have disabled cloud sessions.
356#!/bin/bash
357npm install
358pip install -r requirements.txt
359```
360 643
361Alternatively, you can use SessionStart hooks in your repository's `.claude/settings.json` file for dependency installation that should also run in local environments:644## Work with sessions
362 645
363```json theme={null}646Sessions appear in the sidebar at claude.ai/code. From there you can review changes, share with teammates, archive finished work, or delete sessions permanently.
364{
365 "hooks": {
366 "SessionStart": [
367 {
368 "matcher": "startup",
369 "hooks": [
370 {
371 "type": "command",
372 "command": "\"$CLAUDE_PROJECT_DIR\"/scripts/install_pkgs.sh"
373 }
374 ]
375 }
376 ]
377 }
378}
379```
380 647
381Create the corresponding script at `scripts/install_pkgs.sh`:648### Manage context
382 649
383```bash theme={null}650Cloud sessions support [built-in commands](/en/commands) that produce text output. Commands that open an interactive terminal picker, like `/model` or `/config`, are not available.
384#!/bin/bash
385 651
386# Only run in remote environments652For context management specifically:
387if [ "$CLAUDE_CODE_REMOTE" != "true" ]; then
388 exit 0
389fi
390 653
391npm install654| Command | Works in cloud sessions | Notes |
392pip install -r requirements.txt655| :--------- | :---------------------- | :----------------------------------------------------------------------------------------------------------------------- |
393exit 0656| `/compact` | Yes | Summarizes the conversation to free up context. Accepts optional focus instructions like `/compact keep the test output` |
394```657| `/context` | Yes | Shows what's currently in the context window |
658| `/clear` | No | Start a new session from the sidebar instead |
395 659
396Make it executable: `chmod +x scripts/install_pkgs.sh`660Auto-compaction runs automatically when the context window approaches capacity, the same as in the CLI. To trigger it earlier, set [`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`](/en/env-vars) in your [environment variables](#configure-your-environment). For example, `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=70` compacts at 70% capacity instead of the default \~95%. To change the effective window size for compaction calculations, use [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](/en/env-vars).
397 661
398#### Persist environment variables662[Subagents](/en/sub-agents) work the same way they do locally. Claude can spawn them with the Task 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/` are picked up automatically. [Agent teams](/en/agent-teams) are off by default but can be enabled by adding `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` to your [environment variables](#configure-your-environment).
399 663
400SessionStart hooks can persist environment variables for subsequent Bash commands by writing to the file specified in the `CLAUDE_ENV_FILE` environment variable. For details, see [SessionStart hooks](/en/hooks#sessionstart) in the hooks reference.664### Review changes
401 665
402#### Dependency management limitations666Each session shows a diff indicator with lines added and removed, like `+42 -18`. Select it to open the diff view, leave inline comments on specific lines, and send them to Claude with your next message. See [Review and iterate](/en/web-quickstart#review-and-iterate) for the full walkthrough including PR creation. To have Claude monitor the PR for CI failures and review comments automatically, see [Auto-fix pull requests](#auto-fix-pull-requests).
403 667
404* **Hooks fire for all sessions**: SessionStart hooks run in both local and remote environments. There is no hook configuration to scope a hook to remote sessions only. To skip local execution, check the `CLAUDE_CODE_REMOTE` environment variable in your script as shown above.668### Share sessions
405* **Requires network access**: Install commands need network access to reach package registries. If your environment is configured with "No internet" access, these hooks will fail. Use "Limited" (the default) or "Full" network access. The [default allowlist](#default-allowed-domains) includes common registries like npm, PyPI, RubyGems, and crates.io.
406* **Proxy compatibility**: All outbound traffic in remote environments passes through a [security proxy](#security-proxy). Some package managers do not work correctly with this proxy. Bun is a known example.
407* **Runs on every session start**: Hooks run each time a session starts or resumes, adding startup latency. Keep install scripts fast by checking whether dependencies are already present before reinstalling.
408 669
409## Network access and security670To share a session, toggle its visibility according to the account types below. After that, share the session link as-is. Recipients see the latest state when they open the link, but their view doesn't update in real time.
410 671
411### Network policy672#### Share from an Enterprise or Team account
412 673
413#### GitHub proxy674For Enterprise and Team accounts, the two visibility options are **Private** and **Team**. Team visibility makes the session visible to other members of your claude.ai organization. Repository access verification is enabled by default, based on the GitHub account connected to the recipient's account. Your account's display name is visible to all recipients with access. [Claude in Slack](/en/slack) sessions are automatically shared with Team visibility.
414 675
415For security, all GitHub operations go through a dedicated proxy service that transparently handles all git interactions. Inside the sandbox, the git client authenticates using a custom-built scoped credential. This proxy:676#### Share from a Max or Pro account
416 677
417* Manages GitHub authentication securely - the git client uses a scoped credential inside the sandbox, which the proxy verifies and translates to your actual GitHub authentication token678For Max and Pro accounts, the two visibility options are **Private** and **Public**. Public visibility makes the session visible to any user logged into claude.ai.
418* Restricts git push operations to the current working branch for safety
419* Enables seamless cloning, fetching, and PR operations while maintaining security boundaries
420 679
421#### Security proxy680Check your session for sensitive content before sharing. Sessions may contain code and credentials from private GitHub repositories. Repository access verification is not enabled by default.
422 681
423Environments run behind an HTTP/HTTPS network proxy for security and abuse prevention purposes. All outbound internet traffic passes through this proxy, which provides:682To require recipients to have repository access, or to hide your name from shared sessions, go to Settings > Claude Code > Sharing settings.
424 683
425* Protection against malicious requests684### Archive sessions
426* Rate limiting and abuse prevention
427* Content filtering for enhanced security
428 685
429### Access levels686You can archive sessions to keep your session list organized. Archived sessions are hidden from the default session list but can be viewed by filtering for archived sessions.
430 687
431By default, network access is limited to [allowlisted domains](#default-allowed-domains).688To archive a session, hover over the session in the sidebar and select the archive icon.
432 689
433You can configure custom network access, including disabling network access.690### Delete sessions
434 691
435### Default allowed domains692Deleting a session permanently removes the session and its data. This action cannot be undone. You can delete a session in two ways:
693
694* **From the sidebar**: filter for archived sessions, then hover over the session you want to delete and select the delete icon
695* **From the session menu**: open a session, select the dropdown next to the session title, and select **Delete**
696
697You will be asked to confirm before a session is deleted.
698
699## Auto-fix pull requests
436 700
437When using "Limited" network access, the following domains are allowed by default:701Claude can watch a pull request and automatically respond to CI failures and review comments. Claude subscribes to GitHub activity on the PR, and when a check fails or a reviewer leaves a comment, Claude investigates and pushes a fix if one is clear.
438
439#### Anthropic Services
440
441* api.anthropic.com
442* statsig.anthropic.com
443* platform.claude.com
444* code.claude.com
445* claude.ai
446
447#### Version Control
448
449* github.com
450* [www.github.com](http://www.github.com)
451* api.github.com
452* npm.pkg.github.com
453* raw\.githubusercontent.com
454* pkg-npm.githubusercontent.com
455* objects.githubusercontent.com
456* codeload.github.com
457* avatars.githubusercontent.com
458* camo.githubusercontent.com
459* gist.github.com
460* gitlab.com
461* [www.gitlab.com](http://www.gitlab.com)
462* registry.gitlab.com
463* bitbucket.org
464* [www.bitbucket.org](http://www.bitbucket.org)
465* api.bitbucket.org
466
467#### Container Registries
468
469* registry-1.docker.io
470* auth.docker.io
471* index.docker.io
472* hub.docker.com
473* [www.docker.com](http://www.docker.com)
474* production.cloudflare.docker.com
475* download.docker.com
476* gcr.io
477* \*.gcr.io
478* ghcr.io
479* mcr.microsoft.com
480* \*.data.mcr.microsoft.com
481* public.ecr.aws
482
483#### Cloud Platforms
484
485* cloud.google.com
486* accounts.google.com
487* gcloud.google.com
488* \*.googleapis.com
489* storage.googleapis.com
490* compute.googleapis.com
491* container.googleapis.com
492* azure.com
493* portal.azure.com
494* microsoft.com
495* [www.microsoft.com](http://www.microsoft.com)
496* \*.microsoftonline.com
497* packages.microsoft.com
498* dotnet.microsoft.com
499* dot.net
500* visualstudio.com
501* dev.azure.com
502* \*.amazonaws.com
503* \*.api.aws
504* oracle.com
505* [www.oracle.com](http://www.oracle.com)
506* java.com
507* [www.java.com](http://www.java.com)
508* java.net
509* [www.java.net](http://www.java.net)
510* download.oracle.com
511* yum.oracle.com
512
513#### Package Managers - JavaScript/Node
514
515* registry.npmjs.org
516* [www.npmjs.com](http://www.npmjs.com)
517* [www.npmjs.org](http://www.npmjs.org)
518* npmjs.com
519* npmjs.org
520* yarnpkg.com
521* registry.yarnpkg.com
522
523#### Package Managers - Python
524
525* pypi.org
526* [www.pypi.org](http://www.pypi.org)
527* files.pythonhosted.org
528* pythonhosted.org
529* test.pypi.org
530* pypi.python.org
531* pypa.io
532* [www.pypa.io](http://www.pypa.io)
533
534#### Package Managers - Ruby
535
536* rubygems.org
537* [www.rubygems.org](http://www.rubygems.org)
538* api.rubygems.org
539* index.rubygems.org
540* ruby-lang.org
541* [www.ruby-lang.org](http://www.ruby-lang.org)
542* rubyforge.org
543* [www.rubyforge.org](http://www.rubyforge.org)
544* rubyonrails.org
545* [www.rubyonrails.org](http://www.rubyonrails.org)
546* rvm.io
547* get.rvm.io
548
549#### Package Managers - Rust
550
551* crates.io
552* [www.crates.io](http://www.crates.io)
553* index.crates.io
554* static.crates.io
555* rustup.rs
556* static.rust-lang.org
557* [www.rust-lang.org](http://www.rust-lang.org)
558
559#### Package Managers - Go
560
561* proxy.golang.org
562* sum.golang.org
563* index.golang.org
564* golang.org
565* [www.golang.org](http://www.golang.org)
566* goproxy.io
567* pkg.go.dev
568
569#### Package Managers - JVM
570
571* maven.org
572* repo.maven.org
573* central.maven.org
574* repo1.maven.org
575* jcenter.bintray.com
576* gradle.org
577* [www.gradle.org](http://www.gradle.org)
578* services.gradle.org
579* plugins.gradle.org
580* kotlin.org
581* [www.kotlin.org](http://www.kotlin.org)
582* spring.io
583* repo.spring.io
584
585#### Package Managers - Other Languages
586
587* packagist.org (PHP Composer)
588* [www.packagist.org](http://www.packagist.org)
589* repo.packagist.org
590* nuget.org (.NET NuGet)
591* [www.nuget.org](http://www.nuget.org)
592* api.nuget.org
593* pub.dev (Dart/Flutter)
594* api.pub.dev
595* hex.pm (Elixir/Erlang)
596* [www.hex.pm](http://www.hex.pm)
597* cpan.org (Perl CPAN)
598* [www.cpan.org](http://www.cpan.org)
599* metacpan.org
600* [www.metacpan.org](http://www.metacpan.org)
601* api.metacpan.org
602* cocoapods.org (iOS/macOS)
603* [www.cocoapods.org](http://www.cocoapods.org)
604* cdn.cocoapods.org
605* haskell.org
606* [www.haskell.org](http://www.haskell.org)
607* hackage.haskell.org
608* swift.org
609* [www.swift.org](http://www.swift.org)
610
611#### Linux Distributions
612
613* archive.ubuntu.com
614* security.ubuntu.com
615* ubuntu.com
616* [www.ubuntu.com](http://www.ubuntu.com)
617* \*.ubuntu.com
618* ppa.launchpad.net
619* launchpad.net
620* [www.launchpad.net](http://www.launchpad.net)
621
622#### Development Tools & Platforms
623
624* dl.k8s.io (Kubernetes)
625* pkgs.k8s.io
626* k8s.io
627* [www.k8s.io](http://www.k8s.io)
628* releases.hashicorp.com (HashiCorp)
629* apt.releases.hashicorp.com
630* rpm.releases.hashicorp.com
631* archive.releases.hashicorp.com
632* hashicorp.com
633* [www.hashicorp.com](http://www.hashicorp.com)
634* repo.anaconda.com (Anaconda/Conda)
635* conda.anaconda.org
636* anaconda.org
637* [www.anaconda.com](http://www.anaconda.com)
638* anaconda.com
639* continuum.io
640* apache.org (Apache)
641* [www.apache.org](http://www.apache.org)
642* archive.apache.org
643* downloads.apache.org
644* eclipse.org (Eclipse)
645* [www.eclipse.org](http://www.eclipse.org)
646* download.eclipse.org
647* nodejs.org (Node.js)
648* [www.nodejs.org](http://www.nodejs.org)
649
650#### Cloud Services & Monitoring
651
652* statsig.com
653* [www.statsig.com](http://www.statsig.com)
654* api.statsig.com
655* sentry.io
656* \*.sentry.io
657* http-intake.logs.datadoghq.com
658* \*.datadoghq.com
659* \*.datadoghq.eu
660
661#### Content Delivery & Mirrors
662
663* sourceforge.net
664* \*.sourceforge.net
665* packagecloud.io
666* \*.packagecloud.io
667
668#### Schema & Configuration
669
670* json-schema.org
671* [www.json-schema.org](http://www.json-schema.org)
672* json.schemastore.org
673* [www.schemastore.org](http://www.schemastore.org)
674
675#### Model Context Protocol
676
677* \*.modelcontextprotocol.io
678 702
679<Note>703<Note>
680 Domains marked with `*` indicate wildcard subdomain matching. For example, `*.gcr.io` allows access to any subdomain of `gcr.io`.704 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](https://github.com/apps/claude) or when prompted during [setup](/en/web-quickstart#connect-github-and-create-an-environment).
681</Note>705</Note>
682 706
683### Security best practices for customized network access707There are a few ways to turn on auto-fix depending on where the PR came from and what device you're using:
684 708
6851. **Principle of least privilege**: Only enable the minimum network access required709* **PRs created in Claude Code on the web**: open the CI status bar and select **Auto-fix**
6862. **Audit regularly**: Review allowed domains periodically710* **From the mobile app**: tell Claude to auto-fix the PR, for example "watch this PR and fix any CI failures or review comments"
6873. **Use HTTPS**: Always prefer HTTPS endpoints over HTTP711* **Any existing PR**: paste the PR URL into a session and tell Claude to auto-fix it
688 712
689## Security and isolation713### How Claude responds to PR activity
690 714
691Claude Code on the web provides strong security guarantees:715When 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:
692 716
693* **Isolated virtual machines**: Each session runs in an isolated, Anthropic-managed VM717* **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
694* **Network access controls**: Network access is limited by default, and can be disabled718* **Ambiguous requests**: if a reviewer's comment could be interpreted multiple ways or involves something architecturally significant, Claude asks you before acting
719* **Duplicate or no-action events**: if an event is a duplicate or requires no change, Claude notes it in the session and moves on
695 720
696<Note>721Claude may reply to review comment threads on GitHub as part of resolving them. These replies are posted using your GitHub account, so they appear under your username, but each reply is labeled as coming from Claude Code so reviewers know it was written by the agent and not by you directly.
697 When running with network access disabled, Claude Code is allowed to communicate with the Anthropic API which may still allow data to exit the isolated Claude Code VM.
698</Note>
699 722
700* **Credential protection**: Sensitive credentials (such as git credentials or signing keys) are never inside the sandbox with Claude Code. Authentication is handled through a secure proxy using scoped credentials723<Warning>
701* **Secure analysis**: Code is analyzed and modified within isolated VMs before creating PRs724 If your repository uses comment-triggered automation such as Atlantis, Terraform Cloud, or custom GitHub Actions that run on `issue_comment` events, be aware that Claude can reply on your behalf, which can trigger those workflows. Review your repository's automation before enabling auto-fix, and consider disabling auto-fix for repositories where a PR comment can deploy infrastructure or run privileged operations.
725</Warning>
702 726
703## Pricing and rate limits727## Security and isolation
704 728
705Claude Code on the web shares rate limits with all other Claude and Claude Code usage within your account. Running multiple tasks in parallel will consume more rate limits proportionately.729Each cloud session is separated from your machine and from other sessions through several layers:
706 730
707## Limitations731* **Isolated virtual machines**: each session runs in an isolated, Anthropic-managed VM
732* **Network access controls**: network access is limited by default, and can be disabled. When running with network access disabled, Claude Code can still communicate with the Anthropic API, which may allow data to exit the VM.
733* **Credential protection**: sensitive credentials such as git credentials or signing keys are never inside the sandbox with Claude Code. Authentication is handled through a secure proxy using scoped credentials.
734* **Secure analysis**: code is analyzed and modified within isolated VMs before creating PRs
708 735
709* **Repository authentication**: You can only move sessions from web to local when you are authenticated to the same account736## Limitations
710* **Platform restrictions**: Claude Code on the web only works with code hosted in GitHub. Self-hosted [GitHub Enterprise Server](/en/github-enterprise-server) instances are supported for Team and Enterprise plans. GitLab and other non-GitHub repositories cannot be used with cloud sessions
711 737
712## Best practices738Before relying on cloud sessions for a workflow, account for these constraints:
713 739
7141. **Automate environment setup**: Use [setup scripts](#setup-scripts) to install dependencies and configure tools before Claude Code launches. For more advanced scenarios, configure [SessionStart hooks](/en/hooks#sessionstart).740* **Rate limits**: Claude Code on the web shares rate limits with all other Claude and Claude Code usage within your account. Running multiple tasks in parallel consumes more rate limits proportionately. There is no separate compute charge for the cloud VM.
7152. **Document requirements**: Clearly specify dependencies and commands in your `CLAUDE.md` file. If you have an `AGENTS.md` file, you can source it in your `CLAUDE.md` using `@AGENTS.md` to maintain a single source of truth.741* **Repository authentication**: you can only move sessions from web to local when you are authenticated to the same account
742* **Platform restrictions**: repository cloning and pull request creation require GitHub. Self-hosted [GitHub Enterprise Server](/en/github-enterprise-server) instances are supported for Team and Enterprise plans. GitLab, Bitbucket, and other non-GitHub repositories can be sent to cloud sessions as a [local bundle](#send-local-repositories-without-github), but the session can't push results back to the remote
716 743
717## Related resources744## Related resources
718 745
719* [Hooks configuration](/en/hooks)746* [Schedule tasks on the web](/en/web-scheduled-tasks): automate recurring work like daily PR reviews and dependency audits
720* [Settings reference](/en/settings)747* [Hooks configuration](/en/hooks): run scripts at session lifecycle events
721* [Security](/en/security)748* [Settings reference](/en/settings): all configuration options
722* [Data usage](/en/data-usage)749* [Security](/en/security): isolation guarantees and data handling
750* [Data usage](/en/data-usage): what Anthropic retains from cloud sessions