收束 · 一个人,带一队 agentClosing · One Person, a Team of Agents.
把整本书压成一句:Chat、Work、Codex 解决不同形状的活;进入 Codex 后,主线程守目标,explorer、worker 与 reviewer 分工,worktree / cloud 隔离会写入的独立任务,最后从 diff 与 PR 收回证据。你不再守着一位 agent 敲代码,而是带一队 agent 跑一套异步工作流;人仍只负责两件机器替不了的事:决定派什么,确认它真做成了。The whole book in one line: Chat, Work, and Codex solve different shapes of work; inside Codex, the main thread protects the goal, explorer / worker / reviewer divide the job, worktrees and cloud isolate independent writers, and diffs and PRs return the evidence. You no longer watch one agent type code; you direct a team through an async workflow while keeping the two jobs a machine cannot replace: deciding what to send and confirming it was truly done.
把前十一章压成一句:Codex 的问题从来不是「它能不能写这段代码」,是「你能不能把一件活拆给一队 agent,让它们在对的位置完成,而你还能确认结果」。新版 ChatGPT 桌面应用把 Chat、Work、Codex 放进同一扇门;合并的是入口,不是职责。你真正建立的,是一条从对话澄清、工作产物到仓库变更,再到隔离执行与 GitHub 验收的异步工作流。Eleven chapters in one line: the question was never 'can Codex write this code' — it is 'can you split a job across a team of agents, let them finish in the right places, and still verify the result.' The new ChatGPT desktop app puts Chat, Work, and Codex behind one door; the entrance merged, their responsibilities did not. What you actually built is an async workflow from conversational framing and work artifacts to repository changes, isolated execution, and GitHub review.
回扣一遍这台机器怎么拼起来。第 1 章把 Chat / Work / Codex 分清:Chat 澄清,Work 产通用工作成果,Codex 改仓库;第 2 章再把体验、客户端与执行位置拆开 —— IDE 陪跑、CLI 进脚本、桌面应用调度 Local / Worktree / Cloud、GitHub 在团队流程里派与收。1注 1Note 1OpenAI Codex 文档 · Quickstart / Codex cloud —— CLI、IDE 扩展、ChatGPT 应用是客户端入口,cloud 是远程执行环境,GitHub 是派活 / review 集成;这不是官方固定的「四界面」。云端把活委派给隔离环境、交回可开 PR 的 diff。截至 2026-08-05。OpenAI Codex Docs · Quickstart / Codex cloud — the CLI, IDE extension, and ChatGPT app are client entrances, cloud is a remote execution environment, and GitHub a dispatch / review integration; this isn't an official fixed set of 'four interfaces.' Cloud delegates work to isolated environments and returns a diff you can open as a PR. As of 2026-08-05.第 3 章在 CLI 闭环,第 4 章用沙箱与审批控制放权,第 5 章把项目规则写进 AGENTS.md。第 6 章终于组队:explorer 并行查、worker 单点写、reviewer 独立验;第 7 章才用 MCP 接外部系统。本地客户端共用 config 与 MCP,云端 / GitHub 不读取你电脑上的 ~/.codex/config.toml,边界不能想当然。4注 4Note 4OpenAI Codex 文档 · Config basics / MCP / AGENTS.md —— 同一台机器上的 CLI、IDE 扩展与 ChatGPT 桌面应用共用本地 config / auth / MCP;cloud / GitHub 不读取你电脑上的 ~/.codex/config.toml。AGENTS.md 等签入仓库的资产最便于随项目走,具体能力仍看 surface 支持。截至 2026-08-05。OpenAI Codex Docs · Config basics / MCP / AGENTS.md — the CLI, IDE extension, and ChatGPT desktop app on one host share local config / auth / MCP; cloud / GitHub don't read ~/.codex/config.toml on your computer. Checked-in assets such as AGENTS.md travel most portably, subject to each surface's support. As of 2026-08-05.Recap how the machine assembles. Chapter 1 separates Chat / Work / Codex: Chat frames, Work produces general work artifacts, Codex changes repositories; chapter 2 then separates experiences, clients, and execution locations — the IDE pairs, the CLI enters scripts, the desktop app orchestrates Local / Worktree / Cloud, and GitHub dispatches and collects in team flow.1注 1Note 1OpenAI Codex 文档 · Quickstart / Codex cloud —— CLI、IDE 扩展、ChatGPT 应用是客户端入口,cloud 是远程执行环境,GitHub 是派活 / review 集成;这不是官方固定的「四界面」。云端把活委派给隔离环境、交回可开 PR 的 diff。截至 2026-08-05。OpenAI Codex Docs · Quickstart / Codex cloud — the CLI, IDE extension, and ChatGPT app are client entrances, cloud is a remote execution environment, and GitHub a dispatch / review integration; this isn't an official fixed set of 'four interfaces.' Cloud delegates work to isolated environments and returns a diff you can open as a PR. As of 2026-08-05. Chapter 3 closes the CLI loop, chapter 4 controls delegation with sandbox and approvals, and chapter 5 checks project rules into AGENTS.md. Chapter 6 finally forms the team: explorers investigate in parallel, one worker writes, and a reviewer verifies independently; only then does chapter 7 connect external systems with MCP. Local clients share config and MCP, while cloud / GitHub do not read ~/.codex/config.toml from your machine, so never assume the boundary.4注 4Note 4OpenAI Codex 文档 · Config basics / MCP / AGENTS.md —— 同一台机器上的 CLI、IDE 扩展与 ChatGPT 桌面应用共用本地 config / auth / MCP;cloud / GitHub 不读取你电脑上的 ~/.codex/config.toml。AGENTS.md 等签入仓库的资产最便于随项目走,具体能力仍看 surface 支持。截至 2026-08-05。OpenAI Codex Docs · Config basics / MCP / AGENTS.md — the CLI, IDE extension, and ChatGPT desktop app on one host share local config / auth / MCP; cloud / GitHub don't read ~/.codex/config.toml on your computer. Checked-in assets such as AGENTS.md travel most portably, subject to each surface's support. As of 2026-08-05.并行仍有两种,而且别混:subagents 拆同一件复杂活,worktree / cloud tasks 铺开几件独立活(第 2、6、8 章)。3注 3Note 3OpenAI Codex 文档 · Subagents / Worktrees —— subagents 在一项复杂任务内并行分工并由主 agent 汇总;多个 worktree / cloud tasks 让独立任务在隔离工作树 / 容器里并行。前者拆一件活,后者铺开几件活,都不是云端独有的「并行」按钮。截至 2026-08-05。OpenAI Codex Docs · Subagents / Worktrees — subagents divide one complex task in parallel and report to the main agent; multiple worktrees / cloud tasks run independent jobs in isolated working trees / containers. The former splits one job and the latter fans out several, so parallelism isn't a cloud-only button. As of 2026-08-05.第 9 章用 exec、SDK、CI 与 schedule 把流程推到无人值守,本地 schedule 仍要电脑和应用在运行;第 10 章用检查、复审与回归托住交付;第 11 章把主线程与所有子线程的 token 放进同一本 credits 账,不再数消息。一个应用没有抹掉这些边界,只是让你少换一扇门。Parallelism still has two forms, and they should not be confused: subagents split one complex job, while worktree / cloud tasks fan out several independent jobs (chapters 2, 6, and 8).3注 3Note 3OpenAI Codex 文档 · Subagents / Worktrees —— subagents 在一项复杂任务内并行分工并由主 agent 汇总;多个 worktree / cloud tasks 让独立任务在隔离工作树 / 容器里并行。前者拆一件活,后者铺开几件活,都不是云端独有的「并行」按钮。截至 2026-08-05。OpenAI Codex Docs · Subagents / Worktrees — subagents divide one complex task in parallel and report to the main agent; multiple worktrees / cloud tasks run independent jobs in isolated working trees / containers. The former splits one job and the latter fans out several, so parallelism isn't a cloud-only button. As of 2026-08-05. Chapter 9 pushes the flow toward unattended work with exec, the SDK, CI, and schedules, though a local schedule still needs the computer and app running; chapter 10 supports delivery with checks, re-review, and regression; chapter 11 puts main-thread and child-thread tokens into the same credits ledger instead of counting messages. One app did not erase these boundaries; it merely removed a door change.
— II
你只做机器替不了的两件事You Do Only What the Machine Can't.
当入口、运行位置和交付链成形,你的工作只剩两件,恰好是最不该外包的两件:决定派什么,和确认它真做成了。前者是品味和取舍 —— 哪件活值得派、在哪跑、边界画在哪;后者是这本书反复回来的那句 —— 给它一个能自己跑的检查,要证据,不要断言。2注 2Note 2OpenAI Codex 文档 · Best practices —— 别停在让它改;给它一个它能自己跑的检查、要证据不要断言,让它写测试、跑检查、审自己的 diff,再由你接受。原话:「在 OpenAI,Codex 审 100% 的 PR。」截至 2026-08-05。OpenAI Codex Docs · Best practices — don't stop at asking it to change; give it a check it can run, evidence over assertions, have it write tests, run checks, review its own diff, then you accept. Verbatim: 'At OpenAI, Codex reviews 100% of PRs.' As of 2026-08-05.派活的人已经太多,这两件事上的功夫,才是多处协作时代里你真正的手艺。Once entrances, execution locations, and delivery form a chain, your work reduces to two things — precisely the two you shouldn't outsource: deciding what to send, and confirming it was truly done. The first is taste and trade-off — which job is worth sending, where it runs, where the boundary sits; the second is the line this book keeps returning to — give it a check it can run, evidence over assertions.2注 2Note 2OpenAI Codex 文档 · Best practices —— 别停在让它改;给它一个它能自己跑的检查、要证据不要断言,让它写测试、跑检查、审自己的 diff,再由你接受。原话:「在 OpenAI,Codex 审 100% 的 PR。」截至 2026-08-05。OpenAI Codex Docs · Best practices — don't stop at asking it to change; give it a check it can run, evidence over assertions, have it write tests, run checks, review its own diff, then you accept. Verbatim: 'At OpenAI, Codex reviews 100% of PRs.' As of 2026-08-05. Delegators are already plentiful; craft in these two is what's actually yours in an era of work across surfaces.
— III
边界,和一把不过期的尺The Boundary, and a Ruler That Doesn't Expire.
剩下的是画边界。哪些活自己盯:不可逆的、高风险的、要品味的。哪些活派出去:可验证的、可分块的、重复的。再分一次:一件复杂活的多路调查交给 subagents;几件会各自产生改动的独立活进 worktree / cloud;该先把目标说清的去 Chat,要一份通用成果的去 Work,要改仓库并跑验证的去 Codex。入口跟着活走(第 11 章)。多 Agent 不是让更多线程同时写,是让每个角色只拿它该拿的边界。What remains is drawing boundaries. Watch yourself: the irreversible, the high-stakes, the matters of taste. Send out: the verifiable, divisible, repeated. Split once more: several lines of investigation inside one complex job go to subagents; independent jobs that each produce changes go to worktrees / cloud; what needs goal framing goes to Chat, what needs a general artifact goes to Work, and what must change a repository and run verification goes to Codex. Entrances follow the work (chapter 11). Multiple agents are not a license for more threads to write at once; each role gets only the boundary it needs.最后说句实话:这本书会过期,而且很快 —— Codex 以周为单位在变,模型名、命令、档位,书里每个数字都标了核对日期,过期请以官方文档为准。但这把尺子不过期:拿到任何一个新特性、新入口,还是那三问 —— 它省什么,什么活用它,怎么验收。问完这三问,你就不需要下一本教程了。One honest closing note: this book will expire, and quickly — Codex changes week by week, model names, commands, tiers, and every number here carries its verification date; when one expires, trust the official docs. But the ruler doesn't expire: hand it any new feature or entrance and ask the same three questions — what does it save, which work is it for, how do I verify it. Once you ask those three, you won't need the next tutorial.
一个人,带一队 agent:
你定边界,你做验收.
One person, a team of agents:
you set boundaries, you verify.