克劳德代码远程控制
Claude Code Remote Control

原始链接: https://code.claude.com/docs/en/remote-control

## Claude 远程控制:摘要 Claude 的远程控制功能(Pro 和 Max 计划可用,Team/Enterprise 计划不可用)让您可以在不同设备之间无缝继续编码会话——从桌面到手机或另一台电脑。与在云端运行的 Claude Code Web 版本不同,远程控制*完全*在您的机器上运行,访问您的本地文件、工具和环境。 要使用它,请通过命令行启动会话 (`claude remote-control` 或在现有会话中使用 `/remote-control`)。这将生成一个 URL 或二维码,以便使用 claude.ai/code 或 Claude 移动应用程序从其他设备连接。如果会话中断,会自动重新连接。 **主要优势:**完全访问您的本地环境,在不同设备之间同步对话,即使网络出现问题也能继续工作。 远程控制非常适合进行中的本地项目,而 Claude Code Web 版本更适合快速任务或处理尚未克隆的仓库。请记住,运行会话的终端必须保持打开状态,并且长时间的网络中断将终止会话。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Claude 代码远程控制 (claude.com) 18 分,由 empressplay 发表于 3 小时前 | 隐藏 | 过去 | 收藏 | 2 条评论 帮助 weikju 发表于 3 分钟前 | 下一个 [–] 更多将其沙盒化到容器或虚拟机中的理由 回复 pshirshov 发表于 9 分钟前 | 上一个 [–] 我一直用 termux、mosh 和 tmux 这样做。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Remote Control is available as a research preview on Pro and Max plans. It is not available on Team or Enterprise plans.

Remote Control connects claude.ai/code or the Claude app for iOS and Android to a Claude Code session running on your machine. Start a task at your desk, then pick it up from your phone on the couch or a browser on another computer. When you start a Remote Control session on your machine, Claude keeps running locally the entire time, so nothing moves to the cloud. With Remote Control you can:
  • Use your full local environment remotely: your filesystem, MCP servers, tools, and project configuration all stay available
  • Work from both surfaces at once: the conversation stays in sync across all connected devices, so you can send messages from your terminal, browser, and phone interchangeably
  • Survive interruptions: if your laptop sleeps or your network drops, the session reconnects automatically when your machine comes back online
Unlike Claude Code on the web, which runs on cloud infrastructure, Remote Control sessions run directly on your machine and interact with your local filesystem. The web and mobile interfaces are just a window into that local session. This page covers setup, how to start and connect to sessions, and how Remote Control compares to Claude Code on the web.

Requirements

Before using Remote Control, confirm that your environment meets these conditions:
  • Subscription: requires a Pro or Max plan. API keys are not supported.
  • Authentication: run claude and use /login to sign in through claude.ai if you haven’t already.
  • Workspace trust: run claude in your project directory at least once to accept the workspace trust dialog.

Start a Remote Control session

You can start a new session directly in Remote Control, or connect a session that’s already running.
Navigate to your project directory and run:The process stays running in your terminal, waiting for remote connections. It displays a session URL you can use to connect from another device, and you can press spacebar to show a QR code for quick access from your phone. While a remote session is active, the terminal shows connection status and tool activity.This command supports the following flags:
  • --verbose: show detailed connection and session logs
  • --sandbox / --no-sandbox: enable or disable sandboxing for filesystem and network isolation during the session. Sandboxing is off by default.

Connect from another device

Once a Remote Control session is active, you have a few ways to connect from another device:
  • Open the session URL in any browser to go directly to the session on claude.ai/code. Both claude remote-control and /remote-control display this URL in the terminal.
  • Scan the QR code shown alongside the session URL to open it directly in the Claude app. With claude remote-control, press spacebar to toggle the QR code display.
  • Open claude.ai/code or the Claude app and find the session by name in the session list. Remote Control sessions show a computer icon with a green status dot when online.
The remote session takes its name from your last message, your /rename value, or “Remote Control session” if there’s no conversation history. If the environment already has an active session, you’ll be asked whether to continue it or start a new one. If you don’t have the Claude app yet, use the /mobile command inside Claude Code to display a download QR code for iOS or Android.

Enable Remote Control for all sessions

By default, Remote Control only activates when you explicitly run claude remote-control or /remote-control. To enable it automatically for every session, run /config inside Claude Code and set Enable Remote Control for all sessions to true. Set it back to false to disable. Each Claude Code instance supports one remote session at a time. If you run multiple instances, each one gets its own environment and session.

Connection and security

Your local Claude Code session makes outbound HTTPS requests only and never opens inbound ports on your machine. When you start Remote Control, it registers with the Anthropic API and polls for work. When you connect from another device, the server routes messages between the web or mobile client and your local session over a streaming connection. All traffic travels through the Anthropic API over TLS, the same transport security as any Claude Code session. The connection uses multiple short-lived credentials, each scoped to a single purpose and expiring independently.

Remote Control vs Claude Code on the web

Remote Control and Claude Code on the web both use the claude.ai/code interface. The key difference is where the session runs: Remote Control executes on your machine, so your local MCP servers, tools, and project configuration stay available. Claude Code on the web executes in Anthropic-managed cloud infrastructure. Use Remote Control when you’re in the middle of local work and want to keep going from another device. Use Claude Code on the web when you want to kick off a task without any local setup, work on a repo you don’t have cloned, or run multiple tasks in parallel.

Limitations

  • One remote session at a time: each Claude Code session supports one remote connection.
  • Terminal must stay open: Remote Control runs as a local process. If you close the terminal or stop the claude process, the session ends. Run claude remote-control again to start a new one.
  • Extended network outage: if your machine is awake but unable to reach the network for more than roughly 10 minutes, the session times out and the process exits. Run claude remote-control again to start a new session.
  • Claude Code on the web: run sessions in Anthropic-managed cloud environments instead of on your machine
  • Authentication: set up /login and manage credentials for claude.ai
  • CLI reference: full list of flags and commands including claude remote-control
  • Security: how Remote Control sessions fit into the Claude Code security model
  • Data usage: what data flows through the Anthropic API during local and remote sessions
联系我们 contact @ memedata.com