引子 · 不止 ChatGPT 里那个写代码的Intro · More Than the Code Mode in ChatGPT.
你付着 ChatGPT 的订阅,对 Codex 的用法大概停在:贴一个报错,看它改,复制走。但你的订阅里装着的,是一个四面开工的异步编码 agent —— 终端 CLI、IDE 扩展、ChatGPT 应用、云端沙箱连着同一台引擎;它最大的样子,是把一批活派到云端并行跑,回来是一摞待审的 PR。这一章讲清楚这本书的立场:量 Codex 的尺子不是「它能写什么代码」,而是「有多少活可以不守着做完」—— 以及为什么停在聊天框那层,等于把订阅里的后一半白扔。You pay for ChatGPT, and your use of Codex probably stops at: paste an error, watch it fix, copy it away. But what your subscription contains is an async coding agent on four fronts — the CLI, the IDE extension, the ChatGPT app, and cloud sandboxes, all wired to one engine; at its largest, it runs a batch of jobs in parallel in the cloud and comes back with a stack of PRs to review. This chapter sets the book's stance: the ruler for Codex isn't 'what code can it write' but 'how much work gets finished without you watching' — and why stopping at the chat box forfeits the second half of what you pay for.
7 分钟 · 初稿 2026.077 Min · Drafted 2026.07
你大概是这样用 Codex 的:在 ChatGPT 里切到它,贴一个报错、一段函数,看它给你改好的代码,复制走。偶尔它跑了个命令、开了个 PR,你觉得挺方便。一天下来,它对你来说是 ChatGPT 里一个更会写代码的模式 —— 比普通聊天多省下的,只是你自己落地那几步。Here's probably how you use Codex: switch to it inside ChatGPT, paste an error or a function, watch it hand back fixed code, copy it away. Now and then it runs a command or opens a PR and you find it handy. By day's end, it's a mode inside ChatGPT that writes code better — all it saves over an ordinary chat is the few steps of applying it yourself.这没错,但这是它最小的一层。你的 ChatGPT 订阅里本来就含着 Codex,和 ChatGPT 的其它 agentic 功能共用一个额度池1注 1Note 1OpenAI 帮助中心 · Using Codex with your ChatGPT plan —— Codex 是帮你写、审、修、交付代码的 AI agent,包含在 ChatGPT 计划里(Free / Go / Plus / Pro / Business / Enterprise),各档额度不同;Codex、ChatGPT Work、以及其它 agentic 功能在可用时共用同一个 usage / credit 池。截至 2026-07-17。OpenAI Help · Using Codex with your ChatGPT plan — Codex is an AI agent that helps write, review, fix, and ship code, included in ChatGPT plans (Free / Go / Plus / Pro / Business / Enterprise) with plan-dependent allowances; Codex, ChatGPT Work, and other agentic features share one usage / credit pool where available. As of 2026-07-17. —— 也就是说,你从没为「会写代码的聊天框」单独付费,你付的钱里装着一台大得多的机器。这本书的立场一句话说完:Codex 最小的样子是 ChatGPT 里一段会改代码的对话,最大的样子,是一个四面开工的异步编码 agent —— 把一批活派到云端并行跑,回来是一摞待你审的 PR。停在聊天框那层,等于把订阅里的后一半白扔。Not wrong — but that's its smallest layer. Your ChatGPT subscription already contains Codex, drawing on one usage pool shared with ChatGPT's other agentic features1注 1Note 1OpenAI 帮助中心 · Using Codex with your ChatGPT plan —— Codex 是帮你写、审、修、交付代码的 AI agent,包含在 ChatGPT 计划里(Free / Go / Plus / Pro / Business / Enterprise),各档额度不同;Codex、ChatGPT Work、以及其它 agentic 功能在可用时共用同一个 usage / credit 池。截至 2026-07-17。OpenAI Help · Using Codex with your ChatGPT plan — Codex is an AI agent that helps write, review, fix, and ship code, included in ChatGPT plans (Free / Go / Plus / Pro / Business / Enterprise) with plan-dependent allowances; Codex, ChatGPT Work, and other agentic features share one usage / credit pool where available. As of 2026-07-17. — which means you never paid separately for a code-writing chat box; the price you pay contains a much larger machine. The book's stance in one line: Codex's smallest form is a conversation that edits code inside ChatGPT; its largest is an async coding agent working on four fronts — a batch of jobs sent to the cloud, run in parallel, coming back as a stack of PRs for you to review. Stopping at the chat box forfeits the second half.
— I
一个 agent,四处开工One Agent, Working on Four Fronts.
Codex 文档给自己的一句话定位是「用 Codex CLI、IDE 扩展与云端自动化加速开发」。2注 2Note 2OpenAI Codex 文档 · Quickstart / CLI —— Codex 的入口:ChatGPT 桌面应用与网页、Codex CLI(终端与脚本)、Codex IDE 扩展、Codex cloud;llms.txt 的一句话定位是「用 Codex CLI、IDE 扩展与云端自动化加速开发」。2026 年 7 月 9 日起,原独立的 Codex app 并入 ChatGPT 桌面应用(macOS / Windows),Codex 保留独立的编码体验。截至 2026-07-17。OpenAI Codex Docs · Quickstart / CLI — Codex's entrances: the ChatGPT desktop app and web, the Codex CLI (terminal and scripts), the Codex IDE extension, and Codex cloud; the docs' llms.txt one-liner is 'build with the Codex CLI, IDE extension, and cloud automation to speed up development.' Since July 9, 2026 the standalone Codex app is folded into the ChatGPT desktop app (macOS / Windows), keeping a dedicated coding experience. As of 2026-07-17.注意它没说「一个聊天功能」—— 它说的是四个面。同一个 agent,连着同一台引擎,在四处开工:Codex's own one-line positioning is 'build with the Codex CLI, IDE extension, and cloud automation to speed up development.'2注 2Note 2OpenAI Codex 文档 · Quickstart / CLI —— Codex 的入口:ChatGPT 桌面应用与网页、Codex CLI(终端与脚本)、Codex IDE 扩展、Codex cloud;llms.txt 的一句话定位是「用 Codex CLI、IDE 扩展与云端自动化加速开发」。2026 年 7 月 9 日起,原独立的 Codex app 并入 ChatGPT 桌面应用(macOS / Windows),Codex 保留独立的编码体验。截至 2026-07-17。OpenAI Codex Docs · Quickstart / CLI — Codex's entrances: the ChatGPT desktop app and web, the Codex CLI (terminal and scripts), the Codex IDE extension, and Codex cloud; the docs' llms.txt one-liner is 'build with the Codex CLI, IDE extension, and cloud automation to speed up development.' Since July 9, 2026 the standalone Codex app is folded into the ChatGPT desktop app (macOS / Windows), keeping a dedicated coding experience. As of 2026-07-17. Note it doesn't say 'a chat feature' — it names fronts. One agent, wired to one engine, working in four places:
面Front
它在哪开工Where it works
哪章Chapter
CLICLI
终端与脚本,进得了管道与 CITerminal and scripts, into pipes and CI
第 3、8 章Ch. 3, 8
IDE 扩展IDE extension
编辑器里陪你改、盯每一步 diffIn the editor, pairing on every diff
第 2 章Ch. 2
ChatGPT 应用ChatGPT app
桌面、网页、手机,一个窗口切换本地与云Desktop, web, phone — one window across local and cloud
第 2、7 章Ch. 2, 7
云端Cloud
OpenAI 的隔离容器,批量并行、交回 PROpenAI's isolated containers, batched and parallel, returning PRs
第 7 章Ch. 7
2026 年 7 月 9 日起,原本独立的 Codex app 并入了 ChatGPT 桌面应用 —— Codex 保留自己的编码体验,和 Chat、Work 并排。2注 2Note 2OpenAI Codex 文档 · Quickstart / CLI —— Codex 的入口:ChatGPT 桌面应用与网页、Codex CLI(终端与脚本)、Codex IDE 扩展、Codex cloud;llms.txt 的一句话定位是「用 Codex CLI、IDE 扩展与云端自动化加速开发」。2026 年 7 月 9 日起,原独立的 Codex app 并入 ChatGPT 桌面应用(macOS / Windows),Codex 保留独立的编码体验。截至 2026-07-17。OpenAI Codex Docs · Quickstart / CLI — Codex's entrances: the ChatGPT desktop app and web, the Codex CLI (terminal and scripts), the Codex IDE extension, and Codex cloud; the docs' llms.txt one-liner is 'build with the Codex CLI, IDE extension, and cloud automation to speed up development.' Since July 9, 2026 the standalone Codex app is folded into the ChatGPT desktop app (macOS / Windows), keeping a dedicated coding experience. As of 2026-07-17.四个面里最有分量的是云端:它的一句话定位是「把活委派给隔离的云端环境里的 Codex」,每个任务在 OpenAI 托管的容器里跑,检出你的仓库、装依赖、干活,收尾交回一份 diff,一键开 PR。3注 3Note 3OpenAI Codex 文档 · Codex cloud —— 一句话定位是「把活委派给隔离的云端环境里的 Codex」。每个云端任务在 OpenAI 托管的隔离容器里跑:检出你的仓库、带网跑 setup 脚本、然后 agent 阶段默认断网;跑完交回一份 diff,你可以开 PR 或追问。截至 2026-07-17。OpenAI Codex Docs · Codex cloud — the one-liner is 'delegate work to Codex in isolated cloud environments.' Each cloud task runs in an isolated OpenAI-managed container: it checks out your repo, runs the setup script with network access, then the agent phase runs offline by default; when it finishes it hands back a diff, and you can open a PR or ask follow-up questions. As of 2026-07-17.这不是「在别的地方也能聊天」,这是活离开你这台机器、在你不看着的时候完成。Since July 9, 2026 the once-standalone Codex app is folded into the ChatGPT desktop app — Codex keeps its own coding experience beside Chat and Work.2注 2Note 2OpenAI Codex 文档 · Quickstart / CLI —— Codex 的入口:ChatGPT 桌面应用与网页、Codex CLI(终端与脚本)、Codex IDE 扩展、Codex cloud;llms.txt 的一句话定位是「用 Codex CLI、IDE 扩展与云端自动化加速开发」。2026 年 7 月 9 日起,原独立的 Codex app 并入 ChatGPT 桌面应用(macOS / Windows),Codex 保留独立的编码体验。截至 2026-07-17。OpenAI Codex Docs · Quickstart / CLI — Codex's entrances: the ChatGPT desktop app and web, the Codex CLI (terminal and scripts), the Codex IDE extension, and Codex cloud; the docs' llms.txt one-liner is 'build with the Codex CLI, IDE extension, and cloud automation to speed up development.' Since July 9, 2026 the standalone Codex app is folded into the ChatGPT desktop app (macOS / Windows), keeping a dedicated coding experience. As of 2026-07-17. The weightiest of the four fronts is the cloud: its one-liner is 'delegate work to Codex in isolated cloud environments,' where each task runs in an OpenAI-managed container that checks out your repo, installs dependencies, does the work, and returns a diff for a one-click PR.3注 3Note 3OpenAI Codex 文档 · Codex cloud —— 一句话定位是「把活委派给隔离的云端环境里的 Codex」。每个云端任务在 OpenAI 托管的隔离容器里跑:检出你的仓库、带网跑 setup 脚本、然后 agent 阶段默认断网;跑完交回一份 diff,你可以开 PR 或追问。截至 2026-07-17。OpenAI Codex Docs · Codex cloud — the one-liner is 'delegate work to Codex in isolated cloud environments.' Each cloud task runs in an isolated OpenAI-managed container: it checks out your repo, runs the setup script with network access, then the agent phase runs offline by default; when it finishes it hands back a diff, and you can open a PR or ask follow-up questions. As of 2026-07-17. This isn't 'you can also chat elsewhere' — this is work leaving your machine, finished while you aren't watching.
— II
边界重画:能派多少,验得动多少The Boundary, Redrawn: What You Can Send Out — and Verify.
Codex 最省的不是敲代码的时间,而是你守着 AI 干活的时间。What Codex saves most is not typing time, but the hours you spend watching an AI work.
本书的第一条判断The first judgment of the book
所以量它的尺子得换。旧尺子问「它能写什么代码」—— 按这把尺子,它和 Claude Code、Cursor、Copilot 挤在同一条跑道上。新尺子问「有多少活可以不守着做完」—— 按这把尺子,一次能派一批:五个 bug 各开一个云端任务,并行跑,你去干别的,回来挨个收;写代码只是它顺手的一类活。四面开工的意思,是同一件事在四个面各有最省的入口:要陪跑的留在编辑器,要批量的上云,要进脚本的走 CLI。So the ruler has to change. The old ruler asks what code it can write — by that ruler it's crowded onto one track with Claude Code, Cursor, and Copilot. The new ruler asks how much work gets finished without you watching — by that ruler you can send a batch at once: five bugs, five cloud tasks running in parallel while you do something else, then collected one by one; writing code is just one job it happens to do. Four fronts means the same task has its cheapest entrance on each: pair-work stays in the editor, batches go to the cloud, scripts go to the CLI.注意新尺子的后半句。派活是容易的一半;难的一半是确认它真做对了。官方最佳实践反复讲的不是「写更好的 prompt」,而是把 Codex 当队友:让它写测试、跑检查、审自己的 diff,再由你接受 —— 原话是「在 OpenAI,Codex 审 100% 的 PR」。4注 4Note 4OpenAI Codex 文档 · Best practices —— 建议把 Codex 当成一个你逐步配置、逐步改进的队友,而不是一次性助手;可靠性来自测试与复审:让它写 / 更新测试、跑该跑的检查、确认结果、审 diff 里的 bug 与回归,再由你接受。原话:「在 OpenAI,Codex 审 100% 的 PR。」截至 2026-07-17。OpenAI Codex Docs · Best practices — treat Codex less like a one-off assistant and more like a teammate you configure and improve over time; reliability comes from testing and review: have it write / update tests, run the right checks, confirm results, review the diff for bugs and regressions, and then you accept it. Verbatim: 'At OpenAI, Codex reviews 100% of PRs.' As of 2026-07-17.活越是在你看不见的地方完成,验收就越是唯一能兜底的动作。这本书把「验收」单独设为第 9 章,也是全书的书眼:别的教程教你怎么派活,这本书还要你带着凭据把活收回来。5注 5Note 5OpenAI Codex 文档 · Code review —— 用 ChatGPT 或 Codex 在提交 / 推送前审代码;本地 /review 起一个专门的 reviewer 读选定的 diff、报出按优先级排序的发现,不改你的工作区;GitHub 上 @codex review 只标 P0 / P1 高优先级问题,可开自动审查让每个 PR 都过一遍。截至 2026-07-17。OpenAI Codex Docs · Code review — use ChatGPT or Codex to inspect code before you commit or push; local /review starts a dedicated reviewer that reads the chosen diff and reports prioritized findings without changing your working tree; on GitHub, @codex review flags only P0 / P1 high-priority issues, and automatic reviews can put every PR through a pass. As of 2026-07-17.Mind the second half of the new ruler. Sending work out is the easy half; the hard half is confirming it got it right. The official best practices don't harp on 'better prompts' but on treating Codex as a teammate: have it write tests, run checks, review its own diff, then you accept it — verbatim, 'At OpenAI, Codex reviews 100% of PRs.'4注 4Note 4OpenAI Codex 文档 · Best practices —— 建议把 Codex 当成一个你逐步配置、逐步改进的队友,而不是一次性助手;可靠性来自测试与复审:让它写 / 更新测试、跑该跑的检查、确认结果、审 diff 里的 bug 与回归,再由你接受。原话:「在 OpenAI,Codex 审 100% 的 PR。」截至 2026-07-17。OpenAI Codex Docs · Best practices — treat Codex less like a one-off assistant and more like a teammate you configure and improve over time; reliability comes from testing and review: have it write / update tests, run the right checks, confirm results, review the diff for bugs and regressions, and then you accept it. Verbatim: 'At OpenAI, Codex reviews 100% of PRs.' As of 2026-07-17. The more work finishes where you can't see it, the more review is the only backstop. This book gives review its own chapter 9, the centerpiece of the book: other tutorials teach you to hand work out; this one has you collect it with evidence.5注 5Note 5OpenAI Codex 文档 · Code review —— 用 ChatGPT 或 Codex 在提交 / 推送前审代码;本地 /review 起一个专门的 reviewer 读选定的 diff、报出按优先级排序的发现,不改你的工作区;GitHub 上 @codex review 只标 P0 / P1 高优先级问题,可开自动审查让每个 PR 都过一遍。截至 2026-07-17。OpenAI Codex Docs · Code review — use ChatGPT or Codex to inspect code before you commit or push; local /review starts a dedicated reviewer that reads the chosen diff and reports prioritized findings without changing your working tree; on GitHub, @codex review flags only P0 / P1 high-priority issues, and automatic reviews can put every PR through a pass. As of 2026-07-17.
— III
先量一次你的活First, Measure Your Own Work.
往下读之前,先给自己的活拍一张底片:Before reading on, take a baseline photo of your own work:
01
翻两周,挑 5 件你亲手陪着 AI 做完的活Scroll back two weeks, pick 5 things you did alongside the AI by hand
不限写代码:改过的一个 bug、加过的一个小功能、清理过的一批依赖、写过的一份发布说明 —— 挑 5 件当时你一句句盯着、看它每一步的活。Not just coding: a bug you fixed, a small feature you added, a batch of dependencies you cleaned, release notes you wrote — pick 5 you watched line by line, checking each step.
02
给每件写一条「它能自己跑的检查」Write each one a check it could run itself
想象把这件活派到云端、你不在场:你能不能写出一条测试、一条命令、一个可对比的产出,来判断它做没做对?写得出、写不出、拿不准,各自标上。Imagine sending it to the cloud with you absent: could you write a test, a command, or a comparable output that decides whether it was done right? Mark each: can, can't, unsure.
03
数「写得出」的有几件Count the 'can' rows
那几件是你现在就能派出去、不用守着的活;「拿不准」的部分,是这本书接下来九章要补的。读完回来重标一遍 —— 这张表就是你的前后对照。Those are the jobs you could send out today without watching; the 'unsure' rows are what the next nine chapters fill in. Re-mark the table when you finish — it's your before-and-after.
聊天框是它最小的样子,
四面开工才是最大的.
The chat box is its smallest form;
four fronts is its largest.
Aklman Library
— 讨论Discussion
讨论Discussion.
评论区初始化中…Initializing comments…
01 / 01
没有匹配结果No matches.
换个关键词,或按 Esc 回到页面Try another keyword, or press Esc to return