派上云 · 云端沙箱、并行与 PR 流Send It Up · Cloud Sandboxes, Parallel Runs, and the PR Flow.
云端的价值不是独占「并行」—— 本地 subagents 和 worktrees 也能并行 —— 而是把活搬进 OpenAI 的可复现隔离容器:检出仓库、带网跑 setup、然后默认断网进入 agent 阶段,secrets 在动手前撤走,收尾交回一个 diff 或 PR。你可以同时派一批,离开自己的机器去干别的。这一章讲环境怎么配、联网白名单怎么开,以及什么时候该用单任务内的 subagents,什么时候该开多项云端任务。Cloud's value isn't a monopoly on parallelism — local subagents and worktrees run in parallel too — but moving work into reproducible, isolated OpenAI containers: check out the repo, run setup online, enter the agent phase offline by default with secrets removed, and return a diff or PR. You can dispatch a batch, leave your own machine, and do something else. This chapter covers environments, internet allowlists, and when to use subagents inside one task versus several cloud tasks.
前七章讲的配置和本地工作,不管在终端、编辑器还是 worktree,都还依赖你这台机器。云端不一样:活进 OpenAI 的隔离容器,跑完回来是一份 diff、一个 PR。它的价值不是独占「并行」—— 第 6 章的 subagents 和本地 worktrees 也能并行 —— 而是<strong>离机、可复现、彼此隔离地跑一批独立任务</strong>。The configuration and local work in the first seven chapters — terminal, editor, or worktree — still depend on your machine. Cloud is different: work enters an isolated OpenAI container and returns as a diff or PR. Its value is not a monopoly on parallelism — chapter 6's subagents and local worktrees also run in parallel — but <strong>running a batch of independent jobs off-machine, reproducibly, and in isolation</strong>.
— I
一个云端任务怎么跑How a Cloud Task Runs.
云端的一句话定位是「把活委派给隔离的云端环境里的 Codex」。1注 1Note 1OpenAI Codex 文档 · Codex cloud —— 一句话定位「把活委派给隔离的云端环境里的 Codex」。云端在 OpenAI 托管的隔离容器里跑,防止碰到你的主机或无关数据;采用两阶段:setup 阶段在 agent 之前跑、可联网装依赖,然后 agent 阶段默认离线(除非你为该环境开联网)。为云端环境配置的 secrets 只在 setup 期间可用、在 agent 阶段开始前被移除。截至 2026-08-05。OpenAI Codex Docs · Codex cloud — the one-liner is 'delegate work to Codex in isolated cloud environments.' The cloud runs in isolated OpenAI-managed containers, preventing access to your host or unrelated data; it uses two phases: a setup phase runs before the agent phase and can reach the network to install dependencies, then the agent phase runs offline by default (unless you enable internet access for that environment). Secrets configured for cloud environments are available only during setup and are removed before the agent phase starts. As of 2026-08-05.你提交一个任务后,大致这样走:创建一个容器、按你选的分支或 SHA 检出仓库、跑你的 setup 脚本,然后进 agent 循环 —— 跑命令、改代码、验证(仓库里有 AGENTS.md 就用它找 lint / test 命令),完成后给出答案和一份改动 diff,你可以一键开 PR,或追问再改。2注 2Note 2OpenAI Codex 文档 · Cloud environments —— 每个云端对话:创建容器、按选定分支 / SHA 检出仓库,跑 setup 脚本(+ 缓存容器复用时可选的 maintenance 脚本),应用联网设置,agent 循环里跑命令、改代码、验证,若仓库有 AGENTS.md 就用它找 lint / test 命令;完成后给出答案和一份改动 diff,你可开 PR 或追问。默认镜像 universal(预装常见语言 / 工具,可 pin 版本);env vars 全程可用,secrets 只在 setup 可用;容器缓存至多 12 小时。截至 2026-08-05。OpenAI Codex Docs · Cloud environments — each cloud chat: creates a container, checks out the repo at the chosen branch / SHA, runs the setup script (plus an optional maintenance script when a cached container is resumed), applies internet settings, then in the agent loop runs commands, edits code, validates, and if the repo has AGENTS.md uses it to find lint / test commands; when done it shows an answer and a diff of changes, and you can open a PR or ask follow-ups. Default image universal (common languages / tools pre-installed, versions pinnable); env vars available throughout, secrets only during setup; containers cached up to 12 hours. As of 2026-08-05.The cloud's one-liner is 'delegate work to Codex in isolated cloud environments.'1注 1Note 1OpenAI Codex 文档 · Codex cloud —— 一句话定位「把活委派给隔离的云端环境里的 Codex」。云端在 OpenAI 托管的隔离容器里跑,防止碰到你的主机或无关数据;采用两阶段:setup 阶段在 agent 之前跑、可联网装依赖,然后 agent 阶段默认离线(除非你为该环境开联网)。为云端环境配置的 secrets 只在 setup 期间可用、在 agent 阶段开始前被移除。截至 2026-08-05。OpenAI Codex Docs · Codex cloud — the one-liner is 'delegate work to Codex in isolated cloud environments.' The cloud runs in isolated OpenAI-managed containers, preventing access to your host or unrelated data; it uses two phases: a setup phase runs before the agent phase and can reach the network to install dependencies, then the agent phase runs offline by default (unless you enable internet access for that environment). Secrets configured for cloud environments are available only during setup and are removed before the agent phase starts. As of 2026-08-05. After you submit a task it goes roughly: create a container, check out the repo at your chosen branch or SHA, run your setup script, then enter the agent loop — run commands, edit code, validate (if the repo has AGENTS.md it uses it to find lint / test commands), and when done present an answer and a diff, from which you open a PR in one click or ask for another pass.2注 2Note 2OpenAI Codex 文档 · Cloud environments —— 每个云端对话:创建容器、按选定分支 / SHA 检出仓库,跑 setup 脚本(+ 缓存容器复用时可选的 maintenance 脚本),应用联网设置,agent 循环里跑命令、改代码、验证,若仓库有 AGENTS.md 就用它找 lint / test 命令;完成后给出答案和一份改动 diff,你可开 PR 或追问。默认镜像 universal(预装常见语言 / 工具,可 pin 版本);env vars 全程可用,secrets 只在 setup 可用;容器缓存至多 12 小时。截至 2026-08-05。OpenAI Codex Docs · Cloud environments — each cloud chat: creates a container, checks out the repo at the chosen branch / SHA, runs the setup script (plus an optional maintenance script when a cached container is resumed), applies internet settings, then in the agent loop runs commands, edits code, validates, and if the repo has AGENTS.md uses it to find lint / test commands; when done it shows an answer and a diff of changes, and you can open a PR or ask follow-ups. Default image universal (common languages / tools pre-installed, versions pinnable); env vars available throughout, secrets only during setup; containers cached up to 12 hours. As of 2026-08-05.安全模型是这一步的关键,分两阶段:setup 阶段跑在 agent 之前、可以联网装依赖;然后agent 阶段默认断网。1注 1Note 1OpenAI Codex 文档 · Codex cloud —— 一句话定位「把活委派给隔离的云端环境里的 Codex」。云端在 OpenAI 托管的隔离容器里跑,防止碰到你的主机或无关数据;采用两阶段:setup 阶段在 agent 之前跑、可联网装依赖,然后 agent 阶段默认离线(除非你为该环境开联网)。为云端环境配置的 secrets 只在 setup 期间可用、在 agent 阶段开始前被移除。截至 2026-08-05。OpenAI Codex Docs · Codex cloud — the one-liner is 'delegate work to Codex in isolated cloud environments.' The cloud runs in isolated OpenAI-managed containers, preventing access to your host or unrelated data; it uses two phases: a setup phase runs before the agent phase and can reach the network to install dependencies, then the agent phase runs offline by default (unless you enable internet access for that environment). Secrets configured for cloud environments are available only during setup and are removed before the agent phase starts. As of 2026-08-05.更要紧的一条:你为云端环境配的 secrets 只在 setup 期间可用,在 agent 阶段开始前就被移除 —— 也就是说,真正干活、可能被 prompt injection 诱导的那个阶段,手里已经没有你的密钥了。1注 1Note 1OpenAI Codex 文档 · Codex cloud —— 一句话定位「把活委派给隔离的云端环境里的 Codex」。云端在 OpenAI 托管的隔离容器里跑,防止碰到你的主机或无关数据;采用两阶段:setup 阶段在 agent 之前跑、可联网装依赖,然后 agent 阶段默认离线(除非你为该环境开联网)。为云端环境配置的 secrets 只在 setup 期间可用、在 agent 阶段开始前被移除。截至 2026-08-05。OpenAI Codex Docs · Codex cloud — the one-liner is 'delegate work to Codex in isolated cloud environments.' The cloud runs in isolated OpenAI-managed containers, preventing access to your host or unrelated data; it uses two phases: a setup phase runs before the agent phase and can reach the network to install dependencies, then the agent phase runs offline by default (unless you enable internet access for that environment). Secrets configured for cloud environments are available only during setup and are removed before the agent phase starts. As of 2026-08-05.这是「把活交出去」敢成立的底层:容器隔离你的主机,断网隔离外传,撤密钥隔离最坏情况。The security model is the crux of this step, in two phases: the setup phase runs before the agent and can reach the network to install dependencies; then the agent phase runs offline by default.1注 1Note 1OpenAI Codex 文档 · Codex cloud —— 一句话定位「把活委派给隔离的云端环境里的 Codex」。云端在 OpenAI 托管的隔离容器里跑,防止碰到你的主机或无关数据;采用两阶段:setup 阶段在 agent 之前跑、可联网装依赖,然后 agent 阶段默认离线(除非你为该环境开联网)。为云端环境配置的 secrets 只在 setup 期间可用、在 agent 阶段开始前被移除。截至 2026-08-05。OpenAI Codex Docs · Codex cloud — the one-liner is 'delegate work to Codex in isolated cloud environments.' The cloud runs in isolated OpenAI-managed containers, preventing access to your host or unrelated data; it uses two phases: a setup phase runs before the agent phase and can reach the network to install dependencies, then the agent phase runs offline by default (unless you enable internet access for that environment). Secrets configured for cloud environments are available only during setup and are removed before the agent phase starts. As of 2026-08-05. And the sharper point: secrets you configure for the cloud environment are available only during setup and removed before the agent phase begins — meaning the phase that actually works, and could be lured by prompt injection, no longer holds your keys.1注 1Note 1OpenAI Codex 文档 · Codex cloud —— 一句话定位「把活委派给隔离的云端环境里的 Codex」。云端在 OpenAI 托管的隔离容器里跑,防止碰到你的主机或无关数据;采用两阶段:setup 阶段在 agent 之前跑、可联网装依赖,然后 agent 阶段默认离线(除非你为该环境开联网)。为云端环境配置的 secrets 只在 setup 期间可用、在 agent 阶段开始前被移除。截至 2026-08-05。OpenAI Codex Docs · Codex cloud — the one-liner is 'delegate work to Codex in isolated cloud environments.' The cloud runs in isolated OpenAI-managed containers, preventing access to your host or unrelated data; it uses two phases: a setup phase runs before the agent phase and can reach the network to install dependencies, then the agent phase runs offline by default (unless you enable internet access for that environment). Secrets configured for cloud environments are available only during setup and are removed before the agent phase starts. As of 2026-08-05. This is the foundation that lets 'handing work out' stand: the container isolates your host, no-network isolates exfiltration, and pulling the keys isolates the worst case.
— II
环境:装什么,连什么Environments: What to Install, What to Connect.
云端跑得对不对,一半看环境配得对不对。默认镜像叫 universal,预装了常见语言和工具,你可以 pin 具体版本、加 setup 脚本装额外依赖。2注 2Note 2OpenAI Codex 文档 · Cloud environments —— 每个云端对话:创建容器、按选定分支 / SHA 检出仓库,跑 setup 脚本(+ 缓存容器复用时可选的 maintenance 脚本),应用联网设置,agent 循环里跑命令、改代码、验证,若仓库有 AGENTS.md 就用它找 lint / test 命令;完成后给出答案和一份改动 diff,你可开 PR 或追问。默认镜像 universal(预装常见语言 / 工具,可 pin 版本);env vars 全程可用,secrets 只在 setup 可用;容器缓存至多 12 小时。截至 2026-08-05。OpenAI Codex Docs · Cloud environments — each cloud chat: creates a container, checks out the repo at the chosen branch / SHA, runs the setup script (plus an optional maintenance script when a cached container is resumed), applies internet settings, then in the agent loop runs commands, edits code, validates, and if the repo has AGENTS.md uses it to find lint / test commands; when done it shows an answer and a diff of changes, and you can open a PR or ask follow-ups. Default image universal (common languages / tools pre-installed, versions pinnable); env vars available throughout, secrets only during setup; containers cached up to 12 hours. As of 2026-08-05.两类值得分清:env vars 全程可用,secrets 只在 setup 可用(前面说过,agent 阶段前撤走)。容器还会缓存至多 12 小时,新任务和追问都快 —— 改了 setup 脚本或 secrets 会自动失效重建。2注 2Note 2OpenAI Codex 文档 · Cloud environments —— 每个云端对话:创建容器、按选定分支 / SHA 检出仓库,跑 setup 脚本(+ 缓存容器复用时可选的 maintenance 脚本),应用联网设置,agent 循环里跑命令、改代码、验证,若仓库有 AGENTS.md 就用它找 lint / test 命令;完成后给出答案和一份改动 diff,你可开 PR 或追问。默认镜像 universal(预装常见语言 / 工具,可 pin 版本);env vars 全程可用,secrets 只在 setup 可用;容器缓存至多 12 小时。截至 2026-08-05。OpenAI Codex Docs · Cloud environments — each cloud chat: creates a container, checks out the repo at the chosen branch / SHA, runs the setup script (plus an optional maintenance script when a cached container is resumed), applies internet settings, then in the agent loop runs commands, edits code, validates, and if the repo has AGENTS.md uses it to find lint / test commands; when done it shows an answer and a diff of changes, and you can open a PR or ask follow-ups. Default image universal (common languages / tools pre-installed, versions pinnable); env vars available throughout, secrets only during setup; containers cached up to 12 hours. As of 2026-08-05.Whether the cloud runs right depends half on whether the environment is configured right. The default image is universal, with common languages and tools pre-installed; you can pin specific versions and add a setup script for extra dependencies.2注 2Note 2OpenAI Codex 文档 · Cloud environments —— 每个云端对话:创建容器、按选定分支 / SHA 检出仓库,跑 setup 脚本(+ 缓存容器复用时可选的 maintenance 脚本),应用联网设置,agent 循环里跑命令、改代码、验证,若仓库有 AGENTS.md 就用它找 lint / test 命令;完成后给出答案和一份改动 diff,你可开 PR 或追问。默认镜像 universal(预装常见语言 / 工具,可 pin 版本);env vars 全程可用,secrets 只在 setup 可用;容器缓存至多 12 小时。截至 2026-08-05。OpenAI Codex Docs · Cloud environments — each cloud chat: creates a container, checks out the repo at the chosen branch / SHA, runs the setup script (plus an optional maintenance script when a cached container is resumed), applies internet settings, then in the agent loop runs commands, edits code, validates, and if the repo has AGENTS.md uses it to find lint / test commands; when done it shows an answer and a diff of changes, and you can open a PR or ask follow-ups. Default image universal (common languages / tools pre-installed, versions pinnable); env vars available throughout, secrets only during setup; containers cached up to 12 hours. As of 2026-08-05. Two things worth separating: env vars are available throughout, secrets only during setup (removed before the agent phase, as above). The container also caches up to 12 hours, so new tasks and follow-ups are fast — changing the setup script or secrets invalidates and rebuilds it.2注 2Note 2OpenAI Codex 文档 · Cloud environments —— 每个云端对话:创建容器、按选定分支 / SHA 检出仓库,跑 setup 脚本(+ 缓存容器复用时可选的 maintenance 脚本),应用联网设置,agent 循环里跑命令、改代码、验证,若仓库有 AGENTS.md 就用它找 lint / test 命令;完成后给出答案和一份改动 diff,你可开 PR 或追问。默认镜像 universal(预装常见语言 / 工具,可 pin 版本);env vars 全程可用,secrets 只在 setup 可用;容器缓存至多 12 小时。截至 2026-08-05。OpenAI Codex Docs · Cloud environments — each cloud chat: creates a container, checks out the repo at the chosen branch / SHA, runs the setup script (plus an optional maintenance script when a cached container is resumed), applies internet settings, then in the agent loop runs commands, edits code, validates, and if the repo has AGENTS.md uses it to find lint / test commands; when done it shows an answer and a diff of changes, and you can open a PR or ask follow-ups. Default image universal (common languages / tools pre-installed, versions pinnable); env vars available throughout, secrets only during setup; containers cached up to 12 hours. As of 2026-08-05.联网是最该谨慎的一格。agent 阶段默认断网;要开,按环境选 On,再用域名白名单收窄 —— 预设有 None(从零加)、Common dependencies(一份常见包管理与源码域名)、All(无限制),还能限定只放 GET / HEAD / OPTIONS 这类只读方法。3注 3Note 3OpenAI Codex 文档 · Agent internet access —— agent 阶段默认断网;setup 脚本仍可联网装依赖。按环境开启,可选择 Off / On,On 时用域名白名单(None / Common dependencies 预设 / All 无限制)加允许的 HTTP 方法(为多一层保护,可只放 GET / HEAD / OPTIONS)。风险:prompt injection、代码 / secrets 外泄、拉进恶意或受限依赖。文档给的注入例子:issue 文本里藏 curl 外传命令,诱 agent 执行。截至 2026-08-05。OpenAI Codex Docs · Agent internet access — the agent phase blocks the network by default; setup scripts can still reach it to install dependencies. Enabled per environment, choose Off / On; On uses a domain allowlist (None / a Common dependencies preset / All unrestricted) plus allowed HTTP methods (for extra protection, restrict to GET / HEAD / OPTIONS). Risks: prompt injection, exfiltration of code / secrets, pulling in malicious or restricted dependencies. The docs' injection example: an issue's text hides a curl exfil command to lure the agent into running it. As of 2026-08-05.为什么这么小心?文档给的注入例子很直白:你让它去修一个 GitHub issue,issue 文本里藏了一条 curl 外传命令,联网又不设防的 agent 可能就把你的数据发去了攻击者的服务器。3注 3Note 3OpenAI Codex 文档 · Agent internet access —— agent 阶段默认断网;setup 脚本仍可联网装依赖。按环境开启,可选择 Off / On,On 时用域名白名单(None / Common dependencies 预设 / All 无限制)加允许的 HTTP 方法(为多一层保护,可只放 GET / HEAD / OPTIONS)。风险:prompt injection、代码 / secrets 外泄、拉进恶意或受限依赖。文档给的注入例子:issue 文本里藏 curl 外传命令,诱 agent 执行。截至 2026-08-05。OpenAI Codex Docs · Agent internet access — the agent phase blocks the network by default; setup scripts can still reach it to install dependencies. Enabled per environment, choose Off / On; On uses a domain allowlist (None / a Common dependencies preset / All unrestricted) plus allowed HTTP methods (for extra protection, restrict to GET / HEAD / OPTIONS). Risks: prompt injection, exfiltration of code / secrets, pulling in malicious or restricted dependencies. The docs' injection example: an issue's text hides a curl exfil command to lure the agent into running it. As of 2026-08-05.默认断网不是麻烦,是护栏 —— 只在真需要装依赖、真信任目标域名时才开一条缝。The network is the cell to be most careful in. The agent phase blocks it by default; to open it, choose On per environment and narrow with a domain allowlist — presets are None (add from scratch), Common dependencies (a set of common package-manager and source domains), and All (unrestricted), and you can restrict to read-only methods like GET / HEAD / OPTIONS.3注 3Note 3OpenAI Codex 文档 · Agent internet access —— agent 阶段默认断网;setup 脚本仍可联网装依赖。按环境开启,可选择 Off / On,On 时用域名白名单(None / Common dependencies 预设 / All 无限制)加允许的 HTTP 方法(为多一层保护,可只放 GET / HEAD / OPTIONS)。风险:prompt injection、代码 / secrets 外泄、拉进恶意或受限依赖。文档给的注入例子:issue 文本里藏 curl 外传命令,诱 agent 执行。截至 2026-08-05。OpenAI Codex Docs · Agent internet access — the agent phase blocks the network by default; setup scripts can still reach it to install dependencies. Enabled per environment, choose Off / On; On uses a domain allowlist (None / a Common dependencies preset / All unrestricted) plus allowed HTTP methods (for extra protection, restrict to GET / HEAD / OPTIONS). Risks: prompt injection, exfiltration of code / secrets, pulling in malicious or restricted dependencies. The docs' injection example: an issue's text hides a curl exfil command to lure the agent into running it. As of 2026-08-05. Why so careful? The docs' injection example is blunt: you ask it to fix a GitHub issue, the issue text hides a curl exfil command, and a networked, unguarded agent might send your data to an attacker's server.3注 3Note 3OpenAI Codex 文档 · Agent internet access —— agent 阶段默认断网;setup 脚本仍可联网装依赖。按环境开启,可选择 Off / On,On 时用域名白名单(None / Common dependencies 预设 / All 无限制)加允许的 HTTP 方法(为多一层保护,可只放 GET / HEAD / OPTIONS)。风险:prompt injection、代码 / secrets 外泄、拉进恶意或受限依赖。文档给的注入例子:issue 文本里藏 curl 外传命令,诱 agent 执行。截至 2026-08-05。OpenAI Codex Docs · Agent internet access — the agent phase blocks the network by default; setup scripts can still reach it to install dependencies. Enabled per environment, choose Off / On; On uses a domain allowlist (None / a Common dependencies preset / All unrestricted) plus allowed HTTP methods (for extra protection, restrict to GET / HEAD / OPTIONS). Risks: prompt injection, exfiltration of code / secrets, pulling in malicious or restricted dependencies. The docs' injection example: an issue's text hides a curl exfil command to lure the agent into running it. As of 2026-08-05. No-network-by-default isn't a nuisance, it's a guardrail — open a crack only when you truly need dependencies and truly trust the domains.
— III
两种并行,别混在一起Two Kinds of Parallelism — Don't Mix Them.
第 6 章已经把选择钉住:subagents 在一项任务里面分角色,最好多路读、单路写;多个 cloud tasks 在多项任务之间隔离执行,每项各自产生 diff 或 PR。6注 6Note 6OpenAI Codex 文档 · Subagents —— 本地 ChatGPT 桌面应用、CLI、IDE 扩展默认支持 subagents,可在一项任务内并行委派独立的调查 / 审阅分块,再由主 agent 汇总;CLI 用 /agent 查看线程。它和多项 cloud tasks 不同:前者拆一件复杂活,后者让几件独立活各跑在自己的环境里。截至 2026-08-05。OpenAI Codex Docs · Subagents — the local ChatGPT desktop app, CLI, and IDE extension support subagents by default, delegating independent investigation / review slices inside one task in parallel, then consolidating through the main agent; the CLI uses /agent to inspect threads. This differs from multiple cloud tasks: the former splits one complex job, while the latter runs separate jobs in separate environments. As of 2026-08-05.这里再加一条云端专属判断:只有任务能独立验收、环境能复现、完成后可单独合并,才值得另开容器。把一个紧耦合问题拆成五个云端 PR,会把共享上下文和集成成本推给你。Chapter 6 fixed the choice: subagents divide roles inside one task, ideally many readers and one writer; several cloud tasks isolate execution across tasks, each producing its own diff or PR.6注 6Note 6OpenAI Codex 文档 · Subagents —— 本地 ChatGPT 桌面应用、CLI、IDE 扩展默认支持 subagents,可在一项任务内并行委派独立的调查 / 审阅分块,再由主 agent 汇总;CLI 用 /agent 查看线程。它和多项 cloud tasks 不同:前者拆一件复杂活,后者让几件独立活各跑在自己的环境里。截至 2026-08-05。OpenAI Codex Docs · Subagents — the local ChatGPT desktop app, CLI, and IDE extension support subagents by default, delegating independent investigation / review slices inside one task in parallel, then consolidating through the main agent; the CLI uses /agent to inspect threads. This differs from multiple cloud tasks: the former splits one complex job, while the latter runs separate jobs in separate environments. As of 2026-08-05. Add one cloud-specific test: open another container only when the task can be verified independently, its environment reproduced, and its result merged on its own. Splitting one tightly coupled problem into five cloud PRs merely hands you the lost context and integration cost.云端批量的真正变化,不是「一个 agent 跑快点」,是「一个人同时监工几件彼此独立的活」—— 而验收成了你唯一还需要亲手做的动作(第 10 章)。The real change in a cloud batch isn't 'one agent runs faster'; it's 'one person supervises several independent jobs at once' — and review becomes the one action you still do by hand (chapter 10).Hosted Codex surface 在 chatgpt.com/codex 管云端任务;它不是 ChatGPT web 里可选择的普通 Codex 体验。GitHub 则在 PR 评论里用 @codex 派活,以 PR 为上下文起云端对话,权限允许时把修复推回分支:The hosted Codex surface at chatgpt.com/codex manages cloud tasks; it is not an ordinary selectable Codex experience inside ChatGPT web. GitHub dispatches from a PR comment with @codex, starting a cloud chat from the PR context and pushing a fix back when permissions allow:
# 在一个 PR 评论里(GitHub)@codex fix the CI failures# 在终端:把某个云端对话最新的 diff 应用到本地工作树(别名 codex a)codex apply <TASK_ID>
GitHub 上派活,或把云端 diff 拉回本地Dispatch from GitHub, or pull a cloud diff back local
账号开放时还有手机:ChatGPT 应用的 Remote 连回仍在运行的桌面 host,在路上也能派、也能收;它受 eligible account / rollout 影响,不是手机本地执行。7注 7Note 7OpenAI Codex 文档 · Remote connections —— ChatGPT 应用可在功能对账号开放时远程连接桌面 host,从其它设备继续查看 / 控制 Codex 工作;本地 host 必须仍在运行。Remote 与相关 CLI 控制仍可能受 eligible account / rollout 与 experimental 状态影响。截至 2026-08-05。OpenAI Codex Docs · Remote connections — where enabled for the account, the ChatGPT app can connect back to a desktop host so another device can inspect / steer Codex work; the local host must remain running. Remote and related CLI controls can still depend on eligible-account / rollout and experimental status. As of 2026-08-05.收回来的路径同样多:网页直接开 PR,或在终端用 codex apply(别名 codex a)把某个云端对话最新的 diff 拉到本地工作树、在熟悉的环境里验;codex cloud 是 experimental 命令组,codex cloud exec 派任务、codex cloud list 列最近对话。5注 5Note 5OpenAI Codex 文档 · Command line options(CLI reference)—— 顶层命令 codex apply <TASK_ID>(别名 codex a)把某个云端对话最新的 diff 应用到你的本地工作树。codex cloud 是 experimental 命令组:默认开交互选择器,codex cloud exec 直接派任务、codex cloud list 列最近对话,不必打开 TUI。截至 2026-08-05。OpenAI Codex Docs · Command line options (CLI reference) — the top-level codex apply <TASK_ID> (alias codex a) applies a cloud chat's latest diff to your local working tree. codex cloud is an experimental command group: the default opens an interactive picker, codex cloud exec submits a task, and codex cloud list returns recent chats, without opening the TUI. As of 2026-08-05.入口可以散开,交付标准只留一句:回来必须是可审的 diff。Where enabled for the account, there are also phones: the ChatGPT app's Remote connects back to a desktop host that remains running, so you dispatch and collect on the go; availability depends on eligible-account / rollout, and execution isn't local to the phone.7注 7Note 7OpenAI Codex 文档 · Remote connections —— ChatGPT 应用可在功能对账号开放时远程连接桌面 host,从其它设备继续查看 / 控制 Codex 工作;本地 host 必须仍在运行。Remote 与相关 CLI 控制仍可能受 eligible account / rollout 与 experimental 状态影响。截至 2026-08-05。OpenAI Codex Docs · Remote connections — where enabled for the account, the ChatGPT app can connect back to a desktop host so another device can inspect / steer Codex work; the local host must remain running. Remote and related CLI controls can still depend on eligible-account / rollout and experimental status. As of 2026-08-05. Collection has as many paths: open the PR from the web, or in the terminal codex apply (alias codex a) pulls a cloud chat's latest diff into your local working tree to verify in familiar surroundings; codex cloud is an experimental command group, with codex cloud exec submitting and codex cloud list listing recent chats.5注 5Note 5OpenAI Codex 文档 · Command line options(CLI reference)—— 顶层命令 codex apply <TASK_ID>(别名 codex a)把某个云端对话最新的 diff 应用到你的本地工作树。codex cloud 是 experimental 命令组:默认开交互选择器,codex cloud exec 直接派任务、codex cloud list 列最近对话,不必打开 TUI。截至 2026-08-05。OpenAI Codex Docs · Command line options (CLI reference) — the top-level codex apply <TASK_ID> (alias codex a) applies a cloud chat's latest diff to your local working tree. codex cloud is an experimental command group: the default opens an interactive picker, codex cloud exec submits a task, and codex cloud list returns recent chats, without opening the TUI. As of 2026-08-05. Entrances may spread out; the delivery standard stays one line: it must return as a reviewable diff.
— IV
哪类活值得上云Which Work Belongs in the Cloud.
不是所有活都该上云。云端的甜点位有三个特征:可验证 —— 有测试、有构建、有能对比的产出,你才敢让它在你看不见时跑完;可并行 —— 一批彼此独立的活,并行才划算,一件串行的活上云只是多绕一圈;不需要你陪跑 —— 要你逐字盯着改的活,留在编辑器更快。反过来,一件需要你反复口头拉扯、边看边改的探索型任务,上云是把沟通成本翻倍,那种活属于第 2、3 章的本地面。Not all work belongs in the cloud. The cloud's sweet spot has three traits: verifiable — with tests, a build, or a comparable output, so you dare let it finish out of sight; parallelizable — a batch of mutually independent jobs pays off in parallel, whereas one serial job in the cloud is just a detour; and not needing you alongside — work you'd watch character by character is faster in the editor. Conversely, an exploratory task that needs you steering out loud and editing as you go doubles the handoff cost in the cloud — that kind belongs on the local fronts of chapters 2 and 3.动手 · 派第一批云端任务:Hands-on · dispatch your first batch of cloud tasks:
配一个云端环境:选默认 universal 镜像,加一段最小 setup 脚本,联网先设 Off。Configure one cloud environment: choose the default universal image, add a minimal setup script, and set network to Off first.
挑三件彼此独立、可验证的小活,各派一个云端任务,并行跑 —— 感受「同时监工三件」。Pick three independent, verifiable small jobs, dispatch one cloud task each, run them in parallel — feel supervising three at once.
回来后用 codex apply 把其中一份 diff 拉到本地,在你熟悉的环境里跑一遍它交回的检查,再决定合不合。When they return, codex apply one diff locally, run the checks it hands back in your familiar environment, then decide whether to merge.
活离开你的机器,
回来是一份可审的 diff.
Work leaves your machine,
and comes back a reviewable diff.
Aklman Library
— 讨论Discussion
讨论Discussion.
评论区初始化中…Initializing comments…
01 / 01
没有匹配结果No matches.
换个关键词,或按 Esc 回到页面Try another keyword, or press Esc to return