入口 · 体验、客户端与执行位置Surfaces · Experiences, Clients, and Execution Locations.
先选体验:Chat 对话,Work 交非代码成品,Codex 进仓库。再选 Codex 的客户端与执行位置:IDE 陪跑、CLI 进终端、桌面视图调度 Local / Worktree / Cloud,GitHub 接团队 PR 流。它们共享工作方式,却不共享所有配置。本章把体验、客户端、运行位置三层拆开,也把手机 Remote、diff 行内编辑、侧栏 PR review、多仓库与 Computer Use 放回真正有用的位置。Choose the experience first: Chat converses, Work produces non-code deliverables, and Codex enters the repository. Then choose the Codex client and execution location: the IDE pairs, the CLI lives in the terminal, the desktop view orchestrates Local / Worktree / Cloud, and GitHub joins team PR flow. They share a way of working, not every configuration. This chapter separates experience, client, and execution location, then puts mobile Remote, inline diff editing, side-panel PR review, multi-repo projects, and Computer Use where they actually help.
别把合并后的现实画成三个并排按钮,也别退回旧的「四个界面」。桌面应用全局切 ChatGPT / Codex,ChatGPT 内再切 Chat / Work;Codex 视图之外,CLI 与 IDE 是本地客户端,cloud 是远程执行环境,GitHub 是派活与 review 的集成层。体验、客户端、运行位置是三套不同问题。本章把它们分开,再决定一件活该留 Local、挪 Worktree、派 Cloud,还是拆给 subagents。Do not draw the merged reality as three identical buttons, and do not fall back to an old list of 'four interfaces.' The desktop app switches globally between ChatGPT and Codex, then between Chat and Work inside ChatGPT; beyond the Codex view, the CLI and IDE are local clients, cloud is a remote execution environment, and GitHub is a dispatch and review integration. Experience, client, and execution location are three different questions. This chapter separates them before deciding whether work stays Local, moves to a Worktree, goes to Cloud, or splits among subagents.
— I
先选体验,再选 Codex 的去处Choose the Experience, Then the Codex Destination.
先问「我要什么结果」:快速回答走 Chat,研究或文档 / 表格 / 演示 / Site 成品走 Work,真正要进入仓库、运行命令与测试、审 diff 才走 Codex。1注 1Note 1OpenAI 帮助中心 · ChatGPT Work and Codex —— 桌面应用全局在 ChatGPT 与 Codex 间切换;ChatGPT 内再选 Chat / Work。Codex 保留独立视图与历史,不能作为普通体验在 web / mobile 直接选择;Remote 可在支持时接入桌面 Codex 对话。Work 与 Codex 的 plan、workspace 权限分别控制。截至 2026-08-05。OpenAI Help · ChatGPT Work and Codex — the desktop app switches globally between ChatGPT and Codex; inside ChatGPT, choose Chat / Work. Codex keeps a separate view and history and is not selectable as an ordinary web / mobile experience; Remote can access supported desktop Codex chats. Plan and workspace controls for Work and Codex are separate. As of 2026-08-05.选了 Codex,第二问才是「我在哪里和它协作、它在哪里跑」:First ask what result you need: quick help goes to Chat; research or a finished document / spreadsheet / presentation / Site goes to Work; repository access, commands, tests, and diffs go to Codex.1注 1Note 1OpenAI 帮助中心 · ChatGPT Work and Codex —— 桌面应用全局在 ChatGPT 与 Codex 间切换;ChatGPT 内再选 Chat / Work。Codex 保留独立视图与历史,不能作为普通体验在 web / mobile 直接选择;Remote 可在支持时接入桌面 Codex 对话。Work 与 Codex 的 plan、workspace 权限分别控制。截至 2026-08-05。OpenAI Help · ChatGPT Work and Codex — the desktop app switches globally between ChatGPT and Codex; inside ChatGPT, choose Chat / Work. Codex keeps a separate view and history and is not selectable as an ordinary web / mobile experience; Remote can access supported desktop Codex chats. Plan and workspace controls for Work and Codex are separate. As of 2026-08-05. Only after choosing Codex do you ask where to collaborate with it and where it should run:
入口 / 层Entrance / layer
它最擅长Best at
代价 / 边界Cost / boundary
IDE 扩展IDE extension
陪你改,盯每一步 diffPairing, watching every diff
你得在场You must be present
CLICLI
进脚本、进管道、进 CIInto scripts, pipes, CI
要自己搭上下游You wire the up/downstream
桌面 Codex 视图Desktop Codex view
调度 Local / Worktree / Cloud,集中看 diff 与 PROrchestrating Local / Worktree / Cloud, diffs, and PRs
和 ChatGPT 历史分开;运行位置仍要选Separate history from ChatGPT; execution still must be chosen
CloudCloud
离机、隔离、批量任务、交回 PROff-machine, isolated, batched jobs returning PRs
先配可复现环境Configure a reproducible environment first
GitHubGitHub
在团队 PR 流里派活、评审、收修复Dispatch, review, and returned fixes in team PR flow
它是集成层,不是本地客户端It's an integration, not a local client
合并后最值得改变习惯的不是图标,是三个动作。第一,发现 diff 里一行不对,可直接行内编辑,不用为一个字再开一整轮。第二,PR review 留在侧栏,从改动到反馈不必跳出控制台。第三,一个项目能放多个仓库,适合前后端或 app / SDK 联动改动。更快的 Computer Use 则留给必须看真实 UI 才能复现或验收的步骤,别让它替代更便宜、更确定的测试和命令。2注 2Note 2OpenAI · What's new / ChatGPT release notes —— 2026 年 7 月 9 日 Codex app 并入 ChatGPT 桌面应用(macOS / Windows),新增 diff 行内编辑、侧栏 PR review、更快 Computer Use 与多仓库项目。后续桌面层级明确为全局 ChatGPT ↔ Codex,ChatGPT 内 Chat ↔ Work;新布局对所有计划开放,具体 Work / Codex 功能仍看 plan 与 workspace。截至 2026-08-05。OpenAI · What's new / ChatGPT release notes — on July 9, 2026 the Codex app merged into the ChatGPT desktop app for macOS / Windows, adding inline diff editing, PR review in the side panel, faster Computer Use, and multi-repository projects. The later hierarchy is a global ChatGPT ↔ Codex switch with Chat ↔ Work inside ChatGPT; the new layout is on all plans, while particular Work / Codex capabilities still depend on plan and workspace. As of 2026-08-05.Codex 不能在 web / mobile 作为普通体验直接选择;手机 Remote 是条件式接回受支持桌面对话,不是在手机本地跑仓库。1注 1Note 1OpenAI 帮助中心 · ChatGPT Work and Codex —— 桌面应用全局在 ChatGPT 与 Codex 间切换;ChatGPT 内再选 Chat / Work。Codex 保留独立视图与历史,不能作为普通体验在 web / mobile 直接选择;Remote 可在支持时接入桌面 Codex 对话。Work 与 Codex 的 plan、workspace 权限分别控制。截至 2026-08-05。OpenAI Help · ChatGPT Work and Codex — the desktop app switches globally between ChatGPT and Codex; inside ChatGPT, choose Chat / Work. Codex keeps a separate view and history and is not selectable as an ordinary web / mobile experience; Remote can access supported desktop Codex chats. Plan and workspace controls for Work and Codex are separate. As of 2026-08-05.The merger matters less as an icon change than as three changed moves. First, edit a wrong line directly inside the diff instead of spending a whole turn on one character. Second, keep PR review in the side panel so changes and feedback stay in the control room. Third, put several repositories in one project for coordinated frontend / backend or app / SDK work. Reserve faster Computer Use for steps that must reproduce or verify the real UI; it should not replace cheaper, more deterministic tests and commands.2注 2Note 2OpenAI · What's new / ChatGPT release notes —— 2026 年 7 月 9 日 Codex app 并入 ChatGPT 桌面应用(macOS / Windows),新增 diff 行内编辑、侧栏 PR review、更快 Computer Use 与多仓库项目。后续桌面层级明确为全局 ChatGPT ↔ Codex,ChatGPT 内 Chat ↔ Work;新布局对所有计划开放,具体 Work / Codex 功能仍看 plan 与 workspace。截至 2026-08-05。OpenAI · What's new / ChatGPT release notes — on July 9, 2026 the Codex app merged into the ChatGPT desktop app for macOS / Windows, adding inline diff editing, PR review in the side panel, faster Computer Use, and multi-repository projects. The later hierarchy is a global ChatGPT ↔ Codex switch with Chat ↔ Work inside ChatGPT; the new layout is on all plans, while particular Work / Codex capabilities still depend on plan and workspace. As of 2026-08-05. Codex is not selectable as an ordinary web / mobile experience; mobile Remote is a conditional way back into supported desktop chats, not a repository running on the phone.1注 1Note 1OpenAI 帮助中心 · ChatGPT Work and Codex —— 桌面应用全局在 ChatGPT 与 Codex 间切换;ChatGPT 内再选 Chat / Work。Codex 保留独立视图与历史,不能作为普通体验在 web / mobile 直接选择;Remote 可在支持时接入桌面 Codex 对话。Work 与 Codex 的 plan、workspace 权限分别控制。截至 2026-08-05。OpenAI Help · ChatGPT Work and Codex — the desktop app switches globally between ChatGPT and Codex; inside ChatGPT, choose Chat / Work. Codex keeps a separate view and history and is not selectable as an ordinary web / mobile experience; Remote can access supported desktop Codex chats. Plan and workspace controls for Work and Codex are separate. As of 2026-08-05.
— II
一台引擎,不是一份配置走天下One Engine, Not One Configuration Everywhere.
这里最容易写错的是「共用」两个字。同一台机器上的 CLI、IDE 扩展、ChatGPT 桌面应用共用 Codex 的本地认证、config.toml 与 MCP —— 在 CLI 接好的服务器,切到编辑器或桌面应用还在。3注 3Note 3OpenAI Codex 文档 · Config basics / MCP / Customization —— 同一台机器上的 CLI、IDE 扩展与 ChatGPT 桌面应用共用 Codex 的本地 config / auth / MCP;用户默认在 ~/.codex/config.toml,项目覆盖在受信任仓库的 .codex/config.toml。云端任务与 GitHub 集成不会读取你电脑上的用户 config;要随仓库走的规则 / skill 必须签进仓库。截至 2026-08-05。OpenAI Codex Docs · Config basics / MCP / Customization — on the same host, the CLI, IDE extension, and ChatGPT desktop app share Codex's local config / auth / MCP; user defaults live in ~/.codex/config.toml and project overrides in .codex/config.toml in trusted repositories. Cloud tasks and GitHub integrations don't read the user config on your computer; rules / skills that must travel need to be checked into the repo. As of 2026-08-05.但云端任务与 GitHub 集成不会越过网络读取你电脑上的 ~/.codex/config.toml。要让项目规则可移植,把 AGENTS.md 与 repo skill 签入版本库;具体 surface 是否调用某个 skill 仍以它的支持范围为准,云端环境、联网与 secrets 另配。3注 3Note 3OpenAI Codex 文档 · Config basics / MCP / Customization —— 同一台机器上的 CLI、IDE 扩展与 ChatGPT 桌面应用共用 Codex 的本地 config / auth / MCP;用户默认在 ~/.codex/config.toml,项目覆盖在受信任仓库的 .codex/config.toml。云端任务与 GitHub 集成不会读取你电脑上的用户 config;要随仓库走的规则 / skill 必须签进仓库。截至 2026-08-05。OpenAI Codex Docs · Config basics / MCP / Customization — on the same host, the CLI, IDE extension, and ChatGPT desktop app share Codex's local config / auth / MCP; user defaults live in ~/.codex/config.toml and project overrides in .codex/config.toml in trusted repositories. Cloud tasks and GitHub integrations don't read the user config on your computer; rules / skills that must travel need to be checked into the repo. As of 2026-08-05.The easiest word to get wrong here is 'shared.' On the same host, the CLI, IDE extension, and ChatGPT desktop app share Codex's local authentication, config.toml, and MCP — a server wired in the CLI remains in the editor or desktop app.3注 3Note 3OpenAI Codex 文档 · Config basics / MCP / Customization —— 同一台机器上的 CLI、IDE 扩展与 ChatGPT 桌面应用共用 Codex 的本地 config / auth / MCP;用户默认在 ~/.codex/config.toml,项目覆盖在受信任仓库的 .codex/config.toml。云端任务与 GitHub 集成不会读取你电脑上的用户 config;要随仓库走的规则 / skill 必须签进仓库。截至 2026-08-05。OpenAI Codex Docs · Config basics / MCP / Customization — on the same host, the CLI, IDE extension, and ChatGPT desktop app share Codex's local config / auth / MCP; user defaults live in ~/.codex/config.toml and project overrides in .codex/config.toml in trusted repositories. Cloud tasks and GitHub integrations don't read the user config on your computer; rules / skills that must travel need to be checked into the repo. As of 2026-08-05. But a cloud task or GitHub integration doesn't reach across the network to read ~/.codex/config.toml on your computer. To make project rules portable, check in AGENTS.md and repo skills; whether a given surface invokes a skill still depends on its support, while cloud environments, internet, and secrets are configured separately.3注 3Note 3OpenAI Codex 文档 · Config basics / MCP / Customization —— 同一台机器上的 CLI、IDE 扩展与 ChatGPT 桌面应用共用 Codex 的本地 config / auth / MCP;用户默认在 ~/.codex/config.toml,项目覆盖在受信任仓库的 .codex/config.toml。云端任务与 GitHub 集成不会读取你电脑上的用户 config;要随仓库走的规则 / skill 必须签进仓库。截至 2026-08-05。OpenAI Codex Docs · Config basics / MCP / Customization — on the same host, the CLI, IDE extension, and ChatGPT desktop app share Codex's local config / auth / MCP; user defaults live in ~/.codex/config.toml and project overrides in .codex/config.toml in trusted repositories. Cloud tasks and GitHub integrations don't read the user config on your computer; rules / skills that must travel need to be checked into the repo. As of 2026-08-05.这条边界决定了本书的读法:第 4 章的本地沙箱与审批、第 5 章的 config、第 7 章的 MCP,先在本机客户端共用;第 6 章的自定义 agent 也属于本地配置层。签入仓库的 AGENTS.md 与 skills 才便于随项目去其它环境。你不是学几套互不相干的工具,也不是配一台会隔空同步一切的机器 —— 你是在同一套工作方式下,管理几处明确不同的运行边界。That boundary sets how to read the book: chapter 4's local sandbox and approvals, chapter 5's config, and chapter 7's MCP are first shared by local clients; chapter 6's custom agents also belong to local configuration. Checked-in AGENTS.md files and skills travel most portably with the project. You aren't learning unrelated tools, nor configuring one machine that teleports everything — you're managing distinct execution boundaries under one way of working.
— III
本地、worktree、云端:一个窗口,三种去处Local, Worktree, Cloud: One Window, Three Destinations.
在 ChatGPT 桌面应用里开一个 Codex 对话,先选它在哪跑:Local 直接在你当前项目目录里改;Worktree 在一个 Git worktree 里隔离改动;Cloud 在配好的云端环境里远程跑 —— Local 和 Worktree 都在你这台电脑上。4注 4Note 4OpenAI Codex 文档 · Codex environments —— 在 ChatGPT 桌面应用里开始一个 Codex 对话时选它在哪跑:Local(直接在你当前项目目录)、Worktree(在 Git worktree 里隔离改动)、Cloud(在配置好的云端环境里远程跑);Local 与 Worktree 都在你的电脑上运行。截至 2026-08-05。OpenAI Codex Docs · Codex environments — when you start a Codex chat in the ChatGPT desktop app, choose where it runs: Local (directly in your current project directory), Worktree (isolate changes in a Git worktree), or Cloud (remotely in a configured cloud environment); both Local and Worktree run on your computer. As of 2026-08-05.这是运行位置,不是产品界面计数:同一个窗口里,你决定活留在当前工作树、挪到隔离工作树,还是离开这台机器。Open a Codex chat in the ChatGPT desktop app and first choose where it runs: Local edits directly in your current project directory; Worktree isolates changes in a Git worktree; Cloud runs remotely in a configured cloud environment — Local and Worktree both run on your computer.4注 4Note 4OpenAI Codex 文档 · Codex environments —— 在 ChatGPT 桌面应用里开始一个 Codex 对话时选它在哪跑:Local(直接在你当前项目目录)、Worktree(在 Git worktree 里隔离改动)、Cloud(在配置好的云端环境里远程跑);Local 与 Worktree 都在你的电脑上运行。截至 2026-08-05。OpenAI Codex Docs · Codex environments — when you start a Codex chat in the ChatGPT desktop app, choose where it runs: Local (directly in your current project directory), Worktree (isolate changes in a Git worktree), or Cloud (remotely in a configured cloud environment); both Local and Worktree run on your computer. As of 2026-08-05. These are execution locations, not a count of product interfaces: in one window, you decide whether work stays in the current tree, moves to an isolated tree, or leaves the machine.worktree 是这里的关键零件:它基于 git worktree,让 Codex 在同一个项目里并行跑多个互不干扰的对话 —— 各自一份检出,共享 .git 元数据。5注 5Note 5OpenAI Codex 文档 · Worktrees —— worktree 让 Codex 在同一个项目里并行跑多个互不干扰的对话(基于 git worktree,各自一份检出、共享 .git 元数据);Handoff 把一场对话连同 Git 状态在 Local 与 Worktree 之间安全搬移,由 Codex 处理底层的 Git 操作。仅在 ChatGPT 桌面应用的 Codex 里可用。截至 2026-08-05。OpenAI Codex Docs · Worktrees — worktrees let Codex run multiple independent, non-interfering chats in one project (built on git worktree — each its own checkout, sharing the .git metadata); Handoff moves a chat and its Git state safely between Local and Worktree, with Codex handling the underlying Git operations. Available only in Codex in the ChatGPT desktop app. As of 2026-08-05.Handoff 则把对话与 Git 状态在 Local / Worktree 间安全移动。前台想专心时把独立改动挪进 worktree,要亲手验时再 Handoff 回 Local —— 这是「不守着做完」的本地版,第 8 章再把它推到云端。Worktrees are the key part here: built on git worktree, they let Codex run several independent, non-interfering chats in one project — each with its own checkout and shared .git metadata.5注 5Note 5OpenAI Codex 文档 · Worktrees —— worktree 让 Codex 在同一个项目里并行跑多个互不干扰的对话(基于 git worktree,各自一份检出、共享 .git 元数据);Handoff 把一场对话连同 Git 状态在 Local 与 Worktree 之间安全搬移,由 Codex 处理底层的 Git 操作。仅在 ChatGPT 桌面应用的 Codex 里可用。截至 2026-08-05。OpenAI Codex Docs · Worktrees — worktrees let Codex run multiple independent, non-interfering chats in one project (built on git worktree — each its own checkout, sharing the .git metadata); Handoff moves a chat and its Git state safely between Local and Worktree, with Codex handling the underlying Git operations. Available only in Codex in the ChatGPT desktop app. As of 2026-08-05. Handoff safely moves the chat and Git state between Local and Worktree. Push an independent change into a worktree when you need the foreground, then Handoff back to Local for hands-on verification — the local form of finishing without watching, extended into cloud in chapter 8.另一种并行是subagents:同一任务里的角色分工。主线程把检索、审阅、测试分析等独立分块交给专门 agent,再收摘要;CLI 的 /agent 只负责看和切线程。6注 6Note 6OpenAI Codex 文档 · Subagents —— ChatGPT 桌面应用、CLI、IDE 扩展当前默认支持 subagents:主 agent 可以把一件复杂任务拆给多个专门 agent 并行处理,再汇总结果;CLI 里 /agent 查看、切换线程。它适合互不依赖的调查 / 审阅分块,代价是更多 token。Work 的 Ultra 档可主动委派。截至 2026-08-05。OpenAI Codex Docs · Subagents — the ChatGPT desktop app, CLI, and IDE extension currently support subagents by default: the main agent can split one complex task among specialized agents working in parallel, then consolidate their results; in the CLI, /agent inspects and switches threads. It suits independent investigation / review slices, at the cost of more tokens. Work's Ultra setting can delegate proactively. As of 2026-08-05.它适合「一件复杂活,多路调查」;多个 worktree / cloud task 适合「几件独立活,各自产生改动」。第 6 章会把配置、调用与 token 账完整走一遍,这里先记边界:subagent 隔离上下文,worktree / cloud 隔离写入。The other parallel form is subagents: role division inside one task. The main thread assigns independent slices such as search, review, or test analysis to specialists and collects summaries; /agent in the CLI only inspects and switches threads.6注 6Note 6OpenAI Codex 文档 · Subagents —— ChatGPT 桌面应用、CLI、IDE 扩展当前默认支持 subagents:主 agent 可以把一件复杂任务拆给多个专门 agent 并行处理,再汇总结果;CLI 里 /agent 查看、切换线程。它适合互不依赖的调查 / 审阅分块,代价是更多 token。Work 的 Ultra 档可主动委派。截至 2026-08-05。OpenAI Codex Docs · Subagents — the ChatGPT desktop app, CLI, and IDE extension currently support subagents by default: the main agent can split one complex task among specialized agents working in parallel, then consolidate their results; in the CLI, /agent inspects and switches threads. It suits independent investigation / review slices, at the cost of more tokens. Work's Ultra setting can delegate proactively. As of 2026-08-05. Use it for one complex job with several investigations; use several worktrees / cloud tasks for independent jobs that each produce changes. Chapter 6 walks through configuration, invocation, and token cost; for now remember the boundary: subagents isolate context, while worktrees / cloud isolate writes.动手 · 把三种并行各用对一次:Hands-on · use each kind of parallelism correctly once:
挑一件中等改动,先在编辑器 / Local 里陪着跑一遍,感受「盯每一步」的成本。Pick a medium change, run it once in the editor / Local while watching, and feel the cost of tracking every step.
同一类活,下次开一个 worktree 让它后台跑,你去干别的,回来只看 diff —— 对比你省下的时间。Next time, open a worktree for the same kind of work, let it run in the background while you do something else, and read only the diff — compare the time saved.
让主 agent 用 subagents 分头查一件复杂问题,再用 /agent 看线程;不要让它们同时改同一处代码。Have the main agent use subagents to investigate one complex problem, then inspect the threads with /agent; don't have them edit the same code at once.
做一次边界测试:CLI 里接的 MCP 在同机 IDE / 桌面应用里应还在;云端不该凭空读到你的 ~/.codex/config.toml。Run one boundary test: MCP wired in the CLI should remain in the same-host IDE / desktop app; cloud should not magically read your ~/.codex/config.toml.
入口跟着活走,
配置边界别想当然.
Entrances follow the work;
configuration stops at boundaries.
Aklman Library
— 讨论Discussion
讨论Discussion.
评论区初始化中…Initializing comments…
01 / 01
没有匹配结果No matches.
换个关键词,或按 Esc 回到页面Try another keyword, or press Esc to return