OpenAI 介绍 Codex 任务状态管理与调度循环机制
OpenAI 官方晒了他们内部怎么用 Codex:任务存状态,审查、部署后由不同智能体接力接手。搞工程自动化或想搭智能体工作流的人可以照这套调度循环抄。
OpenAI 开发者团队展示了 Codex 的任务编排工作流:每个任务保存自身状态和发现,工作可以在智能体与工程师之间交接,并在代码审查或部署后继续推进。工程师在任务服务中定义工作流,调度循环会定期检查哪些任务已就绪,并按照任务当前状态启动 Codex turn 分配智能体。
具体机制上,等待 pull request 审查的任务可以订阅审查评论,智能体无需在工程师审查期间持续运行;当匹配的评论到达,任务重新变为就绪状态,调度循环再分配智能体处理反馈。部署完成后,另一个智能体会接手同一任务,检查性能是否恢复到基线水平。
这种以任务为中心的持久化设计,让 Codex 从单次对话工具转向长周期工程流程的编排层,与 Cursor 等以会话为主的编程助手形成差异。对需要在代码审查、部署、回归验证之间多个环节接力协作的工程团队来说,这种状态传递模式可以直接借鉴。
Each task keeps its state and findings, so work can pass between agents and engineers and resume after a code review or deployment. Engineers define the workflow in the task service. A dispatch loop periodically checks which tasks are ready for the next step. It assigns an agent to each task by starting a Codex turn with the instructions for the task’s current state. For example, a task waiting on a pull request review can subscribe to review comments. The agent doesn’t need to keep running while an engineer reviews the fix. When a matching comment arrives, the task becomes ready again and the dispatch loop can assign an agent to address the feedback. After deployment, another agent picks up the same task to check whether performance has returned to baseline.📊 3 ⚡
This report is categorized under AITOP's "Products" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Codex, OpenAI, coding assistants, agents.
Primary source verification: published directly by @OpenAIDevs with first-party authority.