claude-code-on-the-web.md +80 −12
11Claude Code on the web lets developers kick off Claude Code from the Claude app. This is perfect for:11Claude Code on the web lets developers kick off Claude Code from the Claude app. This is perfect for:
12 12
13* **Answering questions**: Ask about code architecture and how features are implemented13* **Answering questions**: Ask about code architecture and how features are implemented
1414* **Bugfixes and routine tasks**: Well-defined tasks that don't require frequent steering* **Bug fixes and routine tasks**: Well-defined tasks that don't require frequent steering
15* **Parallel work**: Tackle multiple bug fixes in parallel15* **Parallel work**: Tackle multiple bug fixes in parallel
16* **Repositories not on your local machine**: Work on code you don't have checked out locally16* **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 tests17* **Backend changes**: Where Claude Code can write tests and then write code to pass those tests
18 18
1919Claude Code is also available on the Claude iOS app. This is perfect for:Claude Code is also available on the Claude iOS app for kicking off tasks on the go and monitoring work in progress.
20 20
2121* **On the go**: Kick off tasks while commuting or away from laptopYou can move between local and remote development: [send tasks from your terminal to run on the web](#from-terminal-to-web) with the `&` prefix, or [teleport web sessions back to your terminal](#from-web-to-terminal) to continue locally.
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 22
26## Who can use Claude Code on the web?23## Who can use Claude Code on the web?
27 24
54 51
55## Moving tasks between web and terminal52## Moving tasks between web and terminal
56 53
54You can start tasks on the web and continue them in your terminal, or send tasks from your terminal to run on the web. Web sessions persist even if you close your laptop, and you can monitor them from anywhere including the Claude iOS app.
55
56<Note>
57 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 [`&` prefix](#from-terminal-to-web) creates a *new* web session with your current conversation context.
58</Note>
59
60### From terminal to web
61
62Start a message with `&` inside Claude Code to send a task to run on the web:
63
64```
65& Fix the authentication bug in src/auth/login.ts
66```
67
68This creates a new web session on claude.ai with your current conversation context. 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 iOS app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation.
69
70You can also start a web session directly from the command line:
71
72```bash theme={null}
73claude --remote "Fix the authentication bug in src/auth/login.ts"
74```
75
76#### Tips for background tasks
77
78**Plan locally, execute remotely**: For complex tasks, start Claude in plan mode to collaborate on the approach before sending work to the web:
79
80```bash theme={null}
81claude --permission-mode plan
82```
83
84In plan mode, Claude can only read files and explore the codebase. Once you're satisfied with the plan, send it to the web for autonomous execution:
85
86```
87& Execute the migration plan we discussed
88```
89
90This pattern gives you control over the strategy while letting Claude execute autonomously in the cloud.
91
92**Run tasks in parallel**: Each `&` command creates its own web session that runs independently. You can kick off multiple tasks and they'll all run simultaneously in separate sessions:
93
94```
95& Fix the flaky test in auth.spec.ts
96& Update the API documentation
97& Refactor the logger to use structured output
98```
99
100Monitor 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.
101
57### From web to terminal102### From web to terminal
58 103
59104After starting a task on the web:There are several ways to pull a web session into your terminal:
105
106* **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.
107* **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.
108* **From `/tasks`**: Run `/tasks` to see your background sessions, then press `t` to teleport into one
109* **From the web interface**: Click "Open in CLI" to copy a command you can paste into your terminal
110
111When 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.
112
113#### Requirements for teleporting
114
115Teleport 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.
60 116
611171. Click the "Open in CLI" button| Requirement | Details |
621182. Paste and run the command in your terminal in a checkout of the repo| ------------------ | ---------------------------------------------------------------------------------------------------------------------- |
631193. Any existing local changes will be stashed, and the remote session will be loaded| Clean git state | Your working directory must have no uncommitted changes. Teleport prompts you to stash changes if needed. |
641204. Continue working locally| Correct repository | You must run `--teleport` from a checkout of the same repository, not a fork. |
121| Branch available | The branch from the web session must have been pushed to the remote. Teleport automatically fetches and checks it out. |
122| Same account | You must be authenticated to the same Claude.ai account used in the web session. |
65 123
66## Cloud environment124## Cloud environment
67 125
127 185
128**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.186**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.
129 187
188**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 `&` or `--remote`. With a single environment, this command shows your current configuration.
189
130<Note>190<Note>
131 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:191 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:
132 192
256* ghcr.io316* ghcr.io
257* mcr.microsoft.com317* mcr.microsoft.com
258* \*.data.mcr.microsoft.com318* \*.data.mcr.microsoft.com
319* public.ecr.aws
259 320
260#### Cloud Platforms321#### Cloud Platforms
261 322
276* dot.net337* dot.net
277* visualstudio.com338* visualstudio.com
278* dev.azure.com339* dev.azure.com
340* \*.amazonaws.com
341* \*.api.aws
279* oracle.com342* oracle.com
280* [www.oracle.com](http://www.oracle.com)343* [www.oracle.com](http://www.oracle.com)
281* java.com344* java.com
473 536
474## Best practices537## Best practices
475 538
4765391. **Use Claude Code hooks**: Configure [sessionStart hooks](/en/hooks#sessionstart) to automate environment setup and dependency installation.1. **Use Claude Code hooks**: Configure [SessionStart hooks](/en/hooks#sessionstart) to automate environment setup and dependency installation.
4772. **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.5402. **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.
478 541
479## Related resources542## Related resources
482* [Settings reference](/en/settings)545* [Settings reference](/en/settings)
483* [Security](/en/security)546* [Security](/en/security)
484* [Data usage](/en/data-usage)547* [Data usage](/en/data-usage)
548
549
550---
551
552> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt