# Claude Code Web、远程控制与移动端

> Claude Code on the web、Remote Control、/teleport、/remote-control、/web-setup、云端环境、PR autofix、移动端和 Passion8 网关限制。

URL: https://docs.passion8.cc/docs/claude-code/remote-web
Language: zh-CN
Publisher: Passion8

Claude Code 不只在本地终端里运行。官方现在有三类远程形态:

CLI、IDE、Desktop、Web、Slack、CI/CD 和云端 review 的横向选择见 [平台与集成](https://docs.passion8.cc/docs/claude-code/platforms-integrations)。Desktop、Web、Remote Control、VS Code、JetBrains 和 Slack 的入口工作流对照见 [Desktop、Web 与 IDE 工作流](https://docs.passion8.cc/docs/claude-code/desktop-web-ide)。

| 形态 | 运行位置 | 适合 |
| --- | --- | --- |
| Remote Control | 本地会话仍在你的电脑上,Claude app/claude.ai 远程输入 | 出门后继续盯本机任务 |
| Claude Code on the web | Anthropic 托管云端 sandbox | 从浏览器或手机派发 GitHub 任务 |
| `/teleport` | 把 web session 拉回本地终端 | 云端开始,本地接手调试或收尾 |

## Remote Control

Remote Control 让本地 Claude Code session 被 claude.ai/code 或 Claude mobile app 继续控制。核心特点:

| 项目 | 说明 |
| --- | --- |
| 代码和命令运行位置 | 仍然是本地机器 |
| 远程端作用 | 发送 prompt、查看状态、接收通知 |
| 启动方式 | 会话内 `/remote-control` 或命令 `claude remote-control` |
| 适合 | 本机环境复杂、服务跑在本地、但人不在电脑前 |

启动当前会话:

```text
/remote-control
```

server mode:

```bash
claude remote-control --name "my-project"
```

## Passion8 使用限制

官方 Remote Control 依赖 claude.ai 身份和 first-party API 路由。使用 Passion8 这类自定义 `ANTHROPIC_BASE_URL` 时要注意:

| 配置 | 影响 |
| --- | --- |
| `ANTHROPIC_AUTH_TOKEN` / `ANTHROPIC_API_KEY` / `apiKeyHelper` | 可能禁用 Remote Control 和 voice dictation |
| `ANTHROPIC_BASE_URL` 指向非 Anthropic host | 新版本中 Remote Control 可能被禁用 |
| Claude subscription 登录 | Remote Control 通常需要它来配对设备 |

所以 Passion8 文档站里应该把 Remote Control 当作“官方 Claude 账号能力”,不是 Passion8 provider 的主要接入方式。要用 Passion8 跑模型请求,优先本地终端或 IDE。

## Claude Code on the web

Web 版本在 Anthropic 托管环境里运行,适合:

- 从浏览器/手机派发 GitHub issue 或 PR 修复
- 让 Claude 在云端开 branch、跑测试、提交 PR
- 自动修复 CI 失败和 reviewer comments
- 不想占用本地电脑时做并行任务

典型入口:

```text
/web-setup
/autofix-pr
/ultraplan
/ultrareview
/schedule
```

Web session 的环境不是你的本机。它有独立的 sandbox、网络规则、setup scripts、GitHub 连接和缓存。你本地 `~/.claude/settings.json`、本机环境变量和本机 Passion8 token 不会自动进入云端。

## 云端环境与 setup scripts

云端 session 会先准备环境,再执行任务。可以配置 setup script 安装依赖、启动服务或写入必要配置。

| 内容 | 说明 |
| --- | --- |
| 系统工具 | 官方 sandbox 内置常用语言和包管理器 |
| GitHub | 通过官方连接访问仓库、issues、PR |
| 网络 | 默认有安全代理和 domain 允许规则 |
| 环境缓存 | setup 结果可缓存,减少后续启动耗时 |
| SessionStart hook | 更适合项目内每次启动都要跑的小动作 |

如果要访问私有包源、内部 API 或自定义网关,需要确认 web sandbox 的网络访问和 secret 注入方式。不要假设本地 shell 里的 `ANTHROPIC_AUTH_TOKEN` 会过去。

## `/teleport`

`/teleport` 把 Claude Code on the web 的会话拉回本地终端。适合:

| 场景 | 为什么 |
| --- | --- |
| 云端已经有分支和计划 | 本地继续更方便调试 |
| 需要本机数据库、设备或局域网服务 | 云端 sandbox 访问不到 |
| 想用 Passion8 本地 provider 接着跑 | 本地配置才会生效 |

命令:

```text
/teleport
```

或:

```bash
claude --teleport
```

拉回后要重新理解 provider 边界:会话历史可以继续,但实际模型请求走本地当前配置。模型、effort、system prompt、工具集合或 provider 变化都可能让下一轮重新建缓存。

## PR Autofix

`/autofix-pr` 会派发 web session 监听当前 branch 对应的 PR,在 CI 失败或 reviewer 留评论时尝试修复。

```text
/autofix-pr only fix lint and type errors
```

注意:

| 项目 | 说明 |
| --- | --- |
| PR 识别 | 通常依赖 `gh pr view` 和当前 branch |
| 运行位置 | Claude Code on the web |
| 缓存 | 云端 session 自己的 cache,不共享本地 Passion8 会话 |
| 安全 | 适合 CI/PR 任务,不适合需要本机 secret 的任务 |

## Schedule 与 Loop

| 命令 | 运行模型 | 缓存影响 |
| --- | --- | --- |
| `/loop` | 当前 session 周期性触发 | 间隔短于 TTL 更容易命中 |
| `/schedule` | 可能需要 web/GitHub 支持 | 计划任务每次触发按自己的间隔命中 |
| Desktop scheduled tasks | Desktop/官方托管能力 | 取决于任务运行位置和账号 |
| Routines | Anthropic 托管自动化 | 云端独立执行 |

如果循环间隔经常超过 5 分钟,API/provider 默认 5m TTL 的下一轮可能变冷。Claude subscription 的 1h TTL 更适合周期性检查。更完整的对比见 [Routines 与 /loop 调度](https://docs.passion8.cc/docs/claude-code/routines-scheduling)。

## 选择建议

| 需求 | 建议 |
| --- | --- |
| 用 Passion8 跑 Claude Code | 本地 CLI、IDE 或 Desktop local session |
| 手机上看本机任务 | Remote Control,但要确认没有自定义 gateway 变量冲突 |
| 云端自动修 PR | Claude Code on the web、`/autofix-pr` |
| 云端计划本地执行 | `/ultraplan` 或 web session 后 `/teleport` |
| 定期巡查 | 短间隔用 `/loop`,跨天/云端任务看 routines/scheduled tasks |
| 需要本地数据库/局域网 | 本地会话,不要放 web sandbox |

## 官方参考

- [Remote Control](https://code.claude.com/docs/en/remote-control.md)
- [Claude Code on the web](https://code.claude.com/docs/en/claude-code-on-the-web.md)
- [Web quickstart](https://code.claude.com/docs/en/web-quickstart.md)
- [Scheduled tasks](https://code.claude.com/docs/en/scheduled-tasks.md)
- [Routines](https://code.claude.com/docs/en/routines.md)
- [LLM gateway connect](https://code.claude.com/docs/en/llm-gateway-connect.md)
