官方更新 Claude Blog 2026-08-07T12:00 正文 ok 324 words

可在自有算力上运行 Claude Code 会话

英文标题:Run Claude Code sessions on your own compute

Anthropic 推出 Claude Code 自托管环境,允许企业在自行配置的基础设施上运行 Claude Code 会话。代码仓库检出、构建产物、密钥以及会话创建或修改的文件均保留在企业基础设施中,但对话提示、模型回复和工具结果仍会发送至 Anthropic 进行推理,并保存会话记录以支持跨端续接。该功能现以公开测试版形式向 Claude Team 和 Enterprise 组织开放,支持固定容量与按需弹性两种 Runner 运行模式。对于有平台工程或开发者体验团队的企业,这意味着可在保持本地开发环境隔离和管控的同时,将 Claude Code 接入共享计算基础设施。
打开原文相关 3.6 · 机会 1
media11.7 KB media12.1 KB media12.1 KB media403 B media13.0 KB media10.5 KB media13.7 KB media18.4 KB

中文

数据保留在你的基础设施中

仓库检出文件、构建产物、密钥,以及会话创建或修改的任何文件,都会保留在你自行配置的基础设施上。

对话本身——包括提示、回复和工具结果(其中可能包含 Claude 读取的代码)——会被发送至 Anthropic 进行推理;同时,会话记录将被保存,以便能够从任意入口继续该会话。

工作原理

使用自托管环境时,你需要部署一组 Runner。这些长期运行的进程会接收会话任务,并为每个会话启动一个 Claude Code 进程。Runner 提供两种模式。

  1. 固定模式(Fixed): 保持固定数量的 Runner 运行,并将会话分配给它们。
  2. 按需模式(On-demand): 编排器会监测排队中的会话,在会话到达时启动 Runner,并在工作完成后停止它们,使容量随需求变化。

Runner 可以服务不止一个会话,但每个会话都在各自独立的检出目录中运行,因此开发者和账户之间的工作保持隔离。所有受支持入口发起的会话都会路由至同一环境,因此只需完成一次设置,团队无论从何处启动会话都可以使用。

注意:自托管环境不同于 Remote Control。Remote Control 允许开发者通过手机或浏览器继续在自己机器上运行的会话。当该机器停止运行会话时,使用 Remote Control 的会话也会结束,并且会话绑定于运行 claude 的用户;而自托管环境会在由平台团队运营的共享基础设施上运行会话,任何用户都可以使用。

快速开始

自托管环境目前以公开测试版形式向 Claude Team 和 Enterprise 套餐的组织开放。该功能默认关闭,且不适用于使用 ZDR 的组织。

建议由平台、开发者体验或开发者生产力团队负责部署和持续运营,包括构建并维护 Runner 镜像、更新 Runner,以及在使用按需模式时运行编排器。

请参阅文档了解更多信息。你可以通过 GitHub 或 Anthropic 客户团队分享反馈。

English / 原文

Data stays on your infrastructure

Repository checkouts, build artifacts, secrets, and any files a session creates or modifies all stay on infrastructure you provision.

The conversation itself, including prompts, responses, and tool results (which can include code that Claude reads), is sent to Anthropic for inference, and the session transcript is stored so a session can be picked up from any surface.

How it works

When using self-hosted environments, you deploy a set of runners. These long-lived processes pick up sessions and start a Claude Code process for each session. Runners come in two modes.

  1. Fixed: you keep a set number running and sessions are distributed across them.
  2. On-demand: an orchestrator watches for queued sessions, starts a runner as sessions arrive, and stops them when work finishes so capacity tracks demand.

Runners can serve more than one session, but each session runs in its own checkout, so work stays isolated between developers and accounts. Sessions from every supported surface route to the same environment, so you set it up once and it works wherever your team starts a session.

Note : Self-hosted environments differ from Remote Control, which lets developers continue sessions running on their own machines from a phone or browser. Sessions using Remote Control end when that machine stops running the session and are tied to the user who ran claude, whereas self-hosted environments run sessions on shared infrastructure your platform team operates and can be used by any user.

Getting started

Self-hosted environments are available in public beta to organizations on Claude Team and Enterprise plans. They are off by default and not available for organizations using ZDR.

Plan on a platform, developer experience, or developer productivity team owning setup and ongoing operation, including building and maintaining the runner image, updating runners, and running the orchestrator if you use on-demand mode.

See the documentation to learn more. Share feedback via GitHub or through your Anthropic account team.