claude-code-on-the-web.md +441 −0 created
1# Claude Code on the web
2
3> Run Claude Code tasks asynchronously on secure cloud infrastructure
4
5<Note>
6 Claude Code on the web is currently in research preview.
7</Note>
8
9## What is Claude Code on the web?
10
11Claude Code on the web lets developers kick off Claude Code from the Claude app. This is perfect for:
12
13* **Answering questions**: Ask about code architecture and how features are implemented
14* **Bugfixes and routine tasks**: Well-defined tasks that don't require frequent steering
15* **Parallel work**: Tackle multiple bug fixes in parallel
16* **Repositories not on your local machine**: Work on code you don't have checked out locally
17* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests
18
19Claude Code is also available on the Claude iOS app. This is perfect for:
20
21* **On the go**: Kick off tasks while commuting or away from laptop
22* **Monitoring**: Watch the trajectory and steer the agent's work
23
24Developers can also move Claude Code sessions from the Claude app to their terminal to continue tasks locally.
25
26## Who can use Claude Code on the web?
27
28Claude Code on the web is available in research preview to:
29
30* **Pro users**
31* **Max users**
32
33Coming soon to Team and Enterprise premium seat users.
34
35## Getting started
36
371. Visit [claude.ai/code](https://claude.ai/code)
382. Connect your GitHub account
393. Install the Claude GitHub app in your repositories
404. Select your default environment
415. Submit your coding task
426. Review changes and create a pull request in GitHub
43
44## How it works
45
46When you start a task on Claude Code on the web:
47
481. **Repository cloning**: Your repository is cloned to an Anthropic-managed virtual machine
492. **Environment setup**: Claude prepares a secure cloud environment with your code
503. **Network configuration**: Internet access is configured based on your settings
514. **Task execution**: Claude analyzes code, makes changes, runs tests, and checks its work
525. **Completion**: You're notified when finished and can create a PR with the changes
536. **Results**: Changes are pushed to a branch, ready for pull request creation
54
55## Moving tasks between web and terminal
56
57### From web to terminal
58
59After starting a task on the web:
60
611. Click the "Open in CLI" button
622. Paste and run the command in your terminal in a checkout of the repo
633. Any existing local changes will be stashed, and the remote session will be loaded
644. Continue working locally
65
66## Cloud environment
67
68### Default image
69
70We build and maintain a universal image with common toolchains and language ecosystems pre-installed. This image includes:
71
72* Popular programming languages and runtimes
73* Common build tools and package managers
74* Testing frameworks and linters
75
76#### Checking available tools
77
78To see what's pre-installed in your environment, ask Claude Code to run:
79
80```bash theme={null}
81check-tools
82```
83
84This command displays:
85
86* Programming languages and their versions
87* Available package managers
88* Installed development tools
89
90#### Language-specific setups
91
92The universal image includes pre-configured environments for:
93
94* **Python**: Python 3.x with pip, poetry, and common scientific libraries
95* **Node.js**: Latest LTS versions with npm, yarn, and pnpm
96* **Java**: OpenJDK with Maven and Gradle
97* **Go**: Latest stable version with module support
98* **Rust**: Rust toolchain with cargo
99* **C++**: GCC and Clang compilers
100
101### Environment configuration
102
103When you start a session in Claude Code on the web, here's what happens under the hood:
104
1051. **Environment preparation**: We clone your repository and run any configured Claude hooks for initialization. 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.
106
1072. **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.
108
1093. **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`.
110
1114. **Outcome**: When Claude completes its work, it will push the branch to remote. You will be able to create a PR for the branch.
112
113<Note>
114 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.
115</Note>
116
117**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, and any environment variables you want to set.
118
119**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, and environment variables.
120
121<Note>
122 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:
123
124 ```
125 API_KEY=your_api_key
126 DEBUG=true
127 ```
128</Note>
129
130### Dependency management
131
132Configure automatic dependency installation using the `sessionStart` hook:
133
134```json theme={null}
135{
136 "hooks": {
137 "sessionStart": [
138 {
139 "matcher": "",
140 "hooks": [
141 {
142 "type": "command",
143 "command": "./scripts/install_pkgs.sh"
144 }
145 ]
146 }
147 ]
148 }
149}
150```
151
152This ensures dependencies are installed automatically when a new session starts with proper network access.
153
154## Network access and security
155
156### Network policy
157
158#### GitHub proxy
159
160For 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:
161
162* 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
163* Restricts git push operations to the current working branch for safety
164* Enables seamless cloning, fetching, and PR operations while maintaining security boundaries
165
166#### Security proxy
167
168Environments run behind an HTTP/HTTPS network proxy for security and abuse prevention purposes. All outbound internet traffic passes through this proxy, which provides:
169
170* Protection against malicious requests
171* Rate limiting and abuse prevention
172* Content filtering for enhanced security
173
174### Access levels
175
176By default, network access is limited to [allowlisted domains](#default-allowed-domains).
177
178You can configure custom network access, including disabling network access.
179
180### Default allowed domains
181
182When using "Limited" network access, the following domains are allowed by default:
183
184#### Anthropic Services
185
186* api.anthropic.com
187* statsig.anthropic.com
188* claude.ai
189
190#### Version Control
191
192* github.com
193* [www.github.com](http://www.github.com)
194* api.github.com
195* raw\.githubusercontent.com
196* objects.githubusercontent.com
197* codeload.github.com
198* avatars.githubusercontent.com
199* camo.githubusercontent.com
200* gist.github.com
201* gitlab.com
202* [www.gitlab.com](http://www.gitlab.com)
203* registry.gitlab.com
204* bitbucket.org
205* [www.bitbucket.org](http://www.bitbucket.org)
206* api.bitbucket.org
207
208#### Container Registries
209
210* registry-1.docker.io
211* auth.docker.io
212* index.docker.io
213* hub.docker.com
214* [www.docker.com](http://www.docker.com)
215* production.cloudflare.docker.com
216* download.docker.com
217* \*.gcr.io
218* ghcr.io
219* mcr.microsoft.com
220* \*.data.mcr.microsoft.com
221
222#### Cloud Platforms
223
224* cloud.google.com
225* accounts.google.com
226* gcloud.google.com
227* \*.googleapis.com
228* storage.googleapis.com
229* compute.googleapis.com
230* container.googleapis.com
231* azure.com
232* portal.azure.com
233* microsoft.com
234* [www.microsoft.com](http://www.microsoft.com)
235* \*.microsoftonline.com
236* packages.microsoft.com
237* dotnet.microsoft.com
238* dot.net
239* visualstudio.com
240* dev.azure.com
241* oracle.com
242* [www.oracle.com](http://www.oracle.com)
243* java.com
244* [www.java.com](http://www.java.com)
245* java.net
246* [www.java.net](http://www.java.net)
247* download.oracle.com
248* yum.oracle.com
249
250#### Package Managers - JavaScript/Node
251
252* registry.npmjs.org
253* [www.npmjs.com](http://www.npmjs.com)
254* [www.npmjs.org](http://www.npmjs.org)
255* npmjs.com
256* npmjs.org
257* yarnpkg.com
258* registry.yarnpkg.com
259
260#### Package Managers - Python
261
262* pypi.org
263* [www.pypi.org](http://www.pypi.org)
264* files.pythonhosted.org
265* pythonhosted.org
266* test.pypi.org
267* pypi.python.org
268* pypa.io
269* [www.pypa.io](http://www.pypa.io)
270
271#### Package Managers - Ruby
272
273* rubygems.org
274* [www.rubygems.org](http://www.rubygems.org)
275* api.rubygems.org
276* index.rubygems.org
277* ruby-lang.org
278* [www.ruby-lang.org](http://www.ruby-lang.org)
279* rubyforge.org
280* [www.rubyforge.org](http://www.rubyforge.org)
281* rubyonrails.org
282* [www.rubyonrails.org](http://www.rubyonrails.org)
283* rvm.io
284* get.rvm.io
285
286#### Package Managers - Rust
287
288* crates.io
289* [www.crates.io](http://www.crates.io)
290* static.crates.io
291* rustup.rs
292* static.rust-lang.org
293* [www.rust-lang.org](http://www.rust-lang.org)
294
295#### Package Managers - Go
296
297* proxy.golang.org
298* sum.golang.org
299* index.golang.org
300* golang.org
301* [www.golang.org](http://www.golang.org)
302* goproxy.io
303* pkg.go.dev
304
305#### Package Managers - JVM
306
307* maven.org
308* repo.maven.org
309* central.maven.org
310* repo1.maven.org
311* jcenter.bintray.com
312* gradle.org
313* [www.gradle.org](http://www.gradle.org)
314* services.gradle.org
315* spring.io
316* repo.spring.io
317
318#### Package Managers - Other Languages
319
320* packagist.org (PHP Composer)
321* [www.packagist.org](http://www.packagist.org)
322* repo.packagist.org
323* nuget.org (.NET NuGet)
324* [www.nuget.org](http://www.nuget.org)
325* api.nuget.org
326* pub.dev (Dart/Flutter)
327* api.pub.dev
328* hex.pm (Elixir/Erlang)
329* [www.hex.pm](http://www.hex.pm)
330* cpan.org (Perl CPAN)
331* [www.cpan.org](http://www.cpan.org)
332* metacpan.org
333* [www.metacpan.org](http://www.metacpan.org)
334* api.metacpan.org
335* cocoapods.org (iOS/macOS)
336* [www.cocoapods.org](http://www.cocoapods.org)
337* cdn.cocoapods.org
338* haskell.org
339* [www.haskell.org](http://www.haskell.org)
340* hackage.haskell.org
341* swift.org
342* [www.swift.org](http://www.swift.org)
343
344#### Linux Distributions
345
346* archive.ubuntu.com
347* security.ubuntu.com
348* ubuntu.com
349* [www.ubuntu.com](http://www.ubuntu.com)
350* \*.ubuntu.com
351* ppa.launchpad.net
352* launchpad.net
353* [www.launchpad.net](http://www.launchpad.net)
354
355#### Development Tools & Platforms
356
357* dl.k8s.io (Kubernetes)
358* pkgs.k8s.io
359* k8s.io
360* [www.k8s.io](http://www.k8s.io)
361* releases.hashicorp.com (HashiCorp)
362* apt.releases.hashicorp.com
363* rpm.releases.hashicorp.com
364* archive.releases.hashicorp.com
365* hashicorp.com
366* [www.hashicorp.com](http://www.hashicorp.com)
367* repo.anaconda.com (Anaconda/Conda)
368* conda.anaconda.org
369* anaconda.org
370* [www.anaconda.com](http://www.anaconda.com)
371* anaconda.com
372* continuum.io
373* apache.org (Apache)
374* [www.apache.org](http://www.apache.org)
375* archive.apache.org
376* downloads.apache.org
377* eclipse.org (Eclipse)
378* [www.eclipse.org](http://www.eclipse.org)
379* download.eclipse.org
380* nodejs.org (Node.js)
381* [www.nodejs.org](http://www.nodejs.org)
382
383#### Cloud Services & Monitoring
384
385* statsig.com
386* [www.statsig.com](http://www.statsig.com)
387* api.statsig.com
388* \*.sentry.io
389
390#### Content Delivery & Mirrors
391
392* \*.sourceforge.net
393* packagecloud.io
394* \*.packagecloud.io
395
396#### Schema & Configuration
397
398* json-schema.org
399* [www.json-schema.org](http://www.json-schema.org)
400* json.schemastore.org
401* [www.schemastore.org](http://www.schemastore.org)
402
403<Note>
404 Domains marked with `*` indicate wildcard subdomain matching. For example, `*.gcr.io` allows access to any subdomain of `gcr.io`.
405</Note>
406
407### Security best practices for customized network access
408
4091. **Principle of least privilege**: Only enable the minimum network access required
4102. **Audit regularly**: Review allowed domains periodically
4113. **Use HTTPS**: Always prefer HTTPS endpoints over HTTP
412
413## Security and isolation
414
415Claude Code on the web provides strong security guarantees:
416
417* **Isolated virtual machines**: Each session runs in an isolated, Anthropic-managed VM
418* **Network access controls**: Network access is limited by default, and can be disabled
419* **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
420* **Secure analysis**: Code is analyzed and modified within isolated VMs before creating PRs
421
422## Pricing and rate limits
423
424Claude 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.
425
426## Limitations
427
428* **Repository authentication**: You can only move sessions from web to local when you are authenticated to the same account
429* **Platform restrictions**: Claude Code on the web only works with code hosted in GitHub. GitLab and other non-GitHub repositories cannot be used with cloud sessions
430
431## Best practices
432
4331. **Use Claude Code hooks**: Configure [sessionStart hooks](/en/docs/claude-code/hooks#sessionstart) to automate environment setup, dependency installation, and network configuration
4342. **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.
435
436## Related resources
437
438* [Hooks configuration](/en/docs/claude-code/hooks)
439* [Settings reference](/en/docs/claude-code/settings)
440* [Security](/en/docs/claude-code/security)
441* [Data usage](/en/docs/claude-code/data-usage)