Repository navigation
fix(turn): stop native Codex tools when their Goal stops - #8519
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
评审 head 06535d8ae796b1827ce178f1e0ae71837beaf7c0,实际 base d3ac3bd8d69821ae5843b7cef5fdb6dcbc7cae74。
[P2] 仅修改评审排序会中断当前 Codex Turn。 执行中的 Goal 保持 active。调用 loopx configure-goal --pr-review-order reverse --execute 只写入 control_plane.pull_request_review.review_order,但候选版本在 File 和 SQLite 上均返回 stale_goal_authority,终止原命令并丢失预期产物。当前 main 在两种存储上均完成命令并返回 wait。
动机
操作工具模式下,用户需要让已准入的 Codex 命令自然完成,并能用 Goal Stop 中断原 Turn。 在同一个活跃 Goal 上运行延迟写入命令,然后分别执行 owner Stop 和修改 PR 评审顺序。 File 和 SQLite 上,真实 Stop 现在都能在约 1.3 秒内清理命令。仅改变评审顺序也会被判断为 stale_goal_authority,误中断原 Turn。主干在这个对照中完成命令并返回 wait。 核验范围是现有 operation-enabled CLI 和隔离状态。普通 codex exec 的运行中 Stop 仍有独立的验收缺口。 应让当前执行继续通过评审顺序变更,同时保留对 Stop、身份替换、真实权限变更和 authority 读失败的处理。
改动思路
Core 应根据与当前执行有关的 authority facts 决定能否继续。Codex adapter 负责中断已确认的原 Turn 并读回所属 terminal。 保留现有启动准入和本次运行中 Stop,收窄运行中 authority 比较的字段范围。 当前实现保留 launch guard,随后在 app-server 等待事件时检查 current authority。收到 typed 拒绝后,它沿用已有的中断及 terminal readback。问题出在 ongoing guard 对整个 Goal entry 计算摘要,把与当前命令无关的配置纳入中断条件。
具体改动
关键代码讲解
_legacy_goal_authority对完整的 Goal entry 做 SHA-256。legacyRuntime优先判断 Stop,再把任一字段引起的摘要变化判成stale_goal_authority。check_running在事件等待和最终返回前调用require_running。CodexChatAgentSession.interrupt按已确认的 native Turn ID 中断,等待 terminal 状态并清理该 Turn 所属的 command terminal。inventory 无法确认时返回codex_operation_host_stop_unconfirmed。- Codex checkpoint 改用共享 digest pattern。Python digest 架构检查在 head 通过 244 项,主干在该重复校验处失败一项。
对照 docs/architecture/rfcs/controller-executor-unified-contract-v0.md 在 d3ac3bd8d69821ae5843b7cef5fdb6dcbc7cae74 的 Stop at the proven scope 和 Governed work boundary。前者在本次作用域实测通过,后者被评审顺序反例挡住。Ordinary Codex CLI cleanup 走独立路径。
对主干的风险
使用本机 Codex 0.167.0-alpha.3.2、localhost 合成 Responses 和真实 File、SQLite。真实 Stop 的两组 head 对照中,原命令在退出前消失、未写延迟文件、零扣额。候选版本在无干预时两组均自然完成。只改排序时,两组均误中断。精确 head 的 30 项启动测试、11 项 TypeScript runtime 测试和 6 项直接及 10 项选定预合并检查通过。operation tools 关闭时,两端的同一组 9 项检查通过。TypeScript digest suite 的两项 benchmark inventory 失败在两端相同,影响范围与本次改动分开。
语义与 CI 对齐
沿用现有 typed Stop、原 Turn 绑定与 native inventory。stale_goal_authority 应只对应影响原执行授权的变更。用当前 Goal 的排序变更和真实 Stop 分别做回归对照,并保留不可读 authority 和未确认 cleanup 的失败分支。
我的整体评价
保留本次证实有效的 Stop 清理。请让 ongoing guard 依据当前执行的身份、route 和 authority facts 判定失效,并补齐同 Goal 非 authority 配置变更的反例。受影响的交互在现有 CLI。当前 diff 未改变 App、Lark 或公开首屏。 原生核验使用一个本机 Codex 版本与 localhost 合成 Responses,未覆盖其他平台和安装组合。
English verdict: REQUEST_CHANGES — preserve the verified native Stop fix and keep a still-authorized Turn running when only PR review order changes.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> (cherry picked from commit e59f078) Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> (cherry picked from commit 99193eb) Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
评审提交:b54dca7c704db0829b1cc0d1892e02355ff9197c
[P2] 添加另一名 Agent 会中断原本仍获准的 Codex Turn。 命令已开始后,configure-goal --registered-agent 只给同一 Goal 加一名 Agent,当前 Agent 仍在名单、Goal 仍 active。File 和 SQLite 上,主干都正常写出产物并返回 wait;候选均报 stale_goal_authority 并终止原命令。让运行中检查绑定已准入 Agent 的有效 grant。只增加或删除其他 Agent 时保留该 Turn;当前 Agent 被撤销、Goal Stop、身份或 route 改变、证据不可读时仍须拒绝并核验清理。
动机 / Motivation
受影响的是使用 operation-enabled CLI 的人:已经准入的命令应能完成,也应能被真实 Goal Stop 中断。真实 Stop 时,主干允许已启动命令写出延迟文件,候选能清理它。上一提交因评审排序变更误中断的分支已修复;但只给同一 Goal 添加另一名 Agent,候选仍中断原命令。File 与 SQLite 上,真实 Stop 均在延迟写入前清理。当前 Agent 仍获准时,主干两版都完成命令并返回 wait,候选两组均报 stale_goal_authority。本评审核验已确认的 app-server Turn 和其所属终端,不关闭普通 codex exec 或 #8484 的独立 Stop 验收。仍需保证只添加另一名 Agent 时,当前仍获准的命令能完成。
改动思路 / Approach
现有 typed runtime 和 native interrupt 的分工合适,但运行期摘要还包括其他 Agent 的注册,错误地扩大了中断范围。保留已验证的真实 Stop、源镜像和 terminal 清理;把运行中比较收窄到当前执行者及其真实共同约束。 启动时保留完整 registry witness;运行期按原定身份持续核验。原 P2 的排序更新已在本地与全局镜像的实际入口复验通过。新的反例发生在同一 Goal 的其他 Agent 注册。
具体改动 / Changes
关键代码讲解
_legacy_goal_authority 去掉镜像时间戳并压缩 capability 设置,却仍把整个 coordination.registered_agents 纳入摘要。legacyRuntime 在启动后将该摘要不等判成 stale;check_running 把拒绝送到原 interrupt,只核验已确认 Turn 的终端。另复用 Python/TypeScript digest owner 和 canonical Steward Stop fixture。11 个文件 +374/-60。摘要位置;清理。
规范依据:docs/architecture/rfcs/controller-executor-unified-contract-v0.md @ d3ac3bd8d69821ae5843b7cef5fdb6dcbc7cae74。stop-at-proven-scope 由实际 Stop 和 terminal 读回覆盖;governed-work-boundary 因新增另一 Agent 的误中断仍未满足。主循环
对主干的风险 / Risks
真实 Stop 和撤销当前 Agent 都应停:两种存储的候选均清理进程、没有延迟写或扣额。只改评审顺序(含镜像刷新)应继续,两种存储均正常完成。仅新增另一 Agent 也应继续,但候选同样中断,这是阻塞问题。异常终端 inventory 和 authority 不可用的定向用例保持拒绝。
语义与 CI 对齐
480 项定向 Python、58 项 TypeScript、两端各 30 项普通路径检查通过;本地 premerge 的 6 项直接、18 项定向检查及静态检查通过。发布前主干更新到 b89a574b05a3e7d5920a8e7184476dfb7b041790,仅改仪表盘和浏览器测试;新主干重跑仍会在真 Stop 后写文件,但能完成新增另一 Agent 的用例,合并树无冲突。全量 Python 未完成,Change Quality 还保留这项缺口和本次实测回归;未查询远程 CI。
我的整体评价 / Verdict
请保留已经证实的原生 Stop 清理,修复运行期权限比较的作用域,并在两个存储上并列复验真实 Stop、撤销当前 Agent 和只增加另一 Agent。这里的结果不结清 #8484 的普通路径验收。交付面是现有 operation-enabled CLI;没有 App、Lark 或首屏改动。原生对照用一个本机 Codex 版本和 localhost 合成 Responses。普通 codex exec 的真实运行中 Stop、安装组合及模型收益未验。
English verdict: REQUEST_CHANGES. Keep the verified native Stop cleanup, but scope running authority to the admitted Agent. Registering another Agent must not kill the current authorized command.
…dinary-codex-exec-stop-20261111 Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
评审提交:7d37c30bae3a55d3e29af8fa3cf1c2b20476b206
[P2] 仅注册另一名 Agent 仍会中断当前命令。 只在同一活跃 Goal 注册另一名 Agent,当前 Agent 仍在名单。主干四组都写出产物并返回 wait。候选四组均报 stale_goal_authority,终止原命令。 请按本次已准入 Agent 的有效 grant 和 route 核验运行权限,并继续拒绝真实 Stop、撤销当前 Agent 和不可读的 authority。 原讨论
动机 / Motivation
受影响的是已准入的 Codex CLI 命令。主干在 Goal Stop 后仍允许已启动的原生命令完成延迟写入。候选通过现有 Host supervisor 或 app-server 中断原 Turn,普通 exec 现在也走运行期检查。File 和 SQLite 上,两种模式的真实 Stop 都清理了已启动进程,无延迟文件或新增扣额。撤销当前 Agent 同样会停。 只在同一活跃 Goal 注册另一名 Agent,当前 Agent 仍在名单。主干四组都写出产物并返回 wait。候选四组均报 stale_goal_authority,终止原命令。原生测试使用 macOS Codex CLI 和 localhost 合成响应。Windows、安装采用和 C1 单会话成果仍待独立验证。请按本次已准入 Agent 的有效 grant 和 route 核验运行权限,并继续拒绝真实 Stop、撤销当前 Agent 和不可读的 authority。
改动思路 / Approach
保留原生 Stop 的运行期核验和清理,修正 authority 比较的范围。同时覆盖两种 Codex CLI 路径。 上次的 P2 在这个 head 仍成立,并扩大到普通 exec。仅改评审顺序仍可正常完成,镜像刷新对照也通过。
具体改动 / Changes
关键代码讲解
依据 docs/architecture/rfcs/controller-executor-unified-contract-v0.md 核对 stop-at-proven-scope、governed-work-boundary、unknown-interrupt-evidence。17 个文件 +659/-94。运行期摘要保留整个 coordination,TypeScript 把变化判成 stale。普通 exec 现在也使用该回调。 规范 · 实现
对主干的风险 / Risks
File 和 SQLite 上,两种模式的真实 Stop 都清理了已启动进程,无延迟文件或新增扣额。撤销当前 Agent 同样会停。 只在同一活跃 Goal 注册另一名 Agent,当前 Agent 仍在名单。主干四组都写出产物并返回 wait。候选四组均报 stale_goal_authority,终止原命令。
语义与 CI 对齐
322 项 Python 和 58 项 TypeScript 通过。主干的两项 Steward Stop 夹具失败和两项 TS digest 失败在候选消失。Ruff、默认 mypy 和 TS typecheck 通过。额外扩大 scoped mypy 到全部七个生产模块后,原 61 个诊断剩 57 个,无新增。标准 premerge 的 6 项直接检查和 18 项定向检查通过。仓库全量 Python 仍待执行。 远程 CI 未查询。
我的整体评价 / Verdict
请修复该 P2,再重跑当前入口和反例。原生测试使用 macOS Codex CLI 和 localhost 合成响应。Windows、安装采用和 C1 单会话成果仍待独立验证。变更发生在现有 headless CLI。原生测试使用 macOS Codex CLI 和 localhost 合成响应。Windows、安装采用和 C1 单会话成果仍待独立验证。
English verdict: REQUEST_CHANGES. Scope running authority to the admitted Agent so unrelated registration does not kill either Codex mode.
songoow
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-6 Astra Pro · OpenAI · self_reported
评审 head:7d37c30bae3a55d3e29af8fa3cf1c2b20476b206;当前主干:beff0f3e55d1f70eceebbd8e78c11f1cff34643b。
动机 / Motivation
在 Codex 普通 exec 或 operation 模式运行 Goal 的用户,需要 Stop 真正结束原生子进程,同时允许其他仍被授权的协作继续。
旧路径可能在 Goal Stop 后仍留下工具继续执行;PR 增加运行中检查与进程清理,但给同一 Goal 新增一个协作 Agent 也会让原有合法 Turn 被当成过期权限。
期望真正的 Stop、撤权或身份失效能终止原生执行,未撤销原 Agent 权限的协作登记变动则保持原 Turn。
本次修复普通与 operation Codex 的运行中授权和清理,不应把整份可变 Goal 配置变成一个运行期间不得变化的锁。
改动思路 / Approach
复用同一个 admission owner、把运行中检查放在发起锁之外,并由既有进程 owner 清理子进程,这个结构正确;当前问题是运行中权限摘要的覆盖范围过宽。 当前 PR 应保留 Stop 的端到端修复,并在原 admission 边界收窄比较语义,不需要新建运行锁、第二套授权服务或重放原生请求。
普通 exec 和 operation 都经同一运行中检查,并通过已有 SIGINT、grace period 与最终清理路径结束。失败后的未知效果仍交给原 settlement 边界,不自动重放。这与原生 host 应拥有执行/历史、LoopX 拥有范围化协调权限的分工一致。
具体改动 / Changes
关键代码讲解
_legacy_goal_authority 去掉同步时间与 capability-only control_plane;for_plan 捕获摘要,require_running 重新读取并交给 TypeScript 判定。普通 codex_cli 与 codex_operation_host 将拒绝接到各自 transport 的终止路径。host_process_transport 的终止与回收、checkpoint/digest 校验以及 canonical Stop fixture 一同补齐。
接受依据是主干 required-work-context 的当前范围授权与已绑定 Turn 语义,spec_revision=beff0f3e55d1f70eceebbd8e78c11f1cff34643b,criterion_id=existing_boundary:Stop/撤权必须阻止执行,授权未失效的原工作可以继续。检查完整17文件差异后,review-order 的旧问题已排除;新增其他 Goal 的测试不能代替给同一个 Goal 添加协作者。
对主干的风险 / Risks
[P2] 同 Goal 新增 Agent 误撤销原 Turn 的运行权限。 独立反例:在真实 File、SQLite 各建一个 active Goal,registered_agents 只有 codex-fixture;捕获 admission 并运行 guard 成功。随后执行真正的 configure-goal --registered-agent codex-fixture --registered-agent other-agent --execute,读回 Goal 仍 active、原 Agent 仍在名单。再经真实 Effect owner 调用同一 guard,两种存储都抛出 stale_goal_authority。原因是新增摘要保留了整份 coordination/registered_agents。由现有 admission owner 比较当前 Turn 所需的权限与稳定身份,保留真正的 Stop/撤权拒绝,但排除不影响当前授权的新增协作者;补充同 Goal 保留原 Agent 并新增 Agent 的运行中回归。
这一拒绝会经本 PR 新接入的 ordinary/operation guard 触发清理,并非单纯日志变化。完整原生 macOS Codex 未在本轮重跑,不把作者的实际宿主结果当成自己的执行;本轮已直接验证真实 CLI、存储读回和错误授权决定,并以现有 host 测试确认消费者行为。
本轮322项相关 Python 测试、58项 TypeScript 测试全部通过,说明反例不在现有覆盖中。已有 P2 仍适用,不重复新增 inline。远端 CI 没有完整 rollup。
语义与 CI 对齐
运行中授权应与当前 Turn 绑定;launch 前严格字节一致的检查不能直接推广为运行期间任何协作登记变化都终止原工作。应同时保留真正撤权、Stop、原身份替换的负例。
我的整体评价 / Verdict
Stop 端到端修复有价值,结构也沿用现有 owner;但仍有可复现的正常协作回归,建议 REQUEST_CHANGES。最小修复在权限投影和同 Goal 新增 peer 的回归,不需要扩大到新状态服务。本次检查的是 CLI、文件事务或文档语义,没有修改渲染页面。完整安装后的宿主行为未在本轮重新验收。
English verdict: REQUEST_CHANGES. Keep the Stop fix, but do not interrupt an admitted Turn merely because another Agent is added to the same Goal.
Signed-off-by: huangruiteng <huangrt01@163.com>
Keep the original launch witness and current Goal route. Compare the admitted Agent’s registration and grants during execution so changes to other peers do not interrupt the Turn. Reject revocation of its coordination membership even if a historical alias still exists. Signed-off-by: huangruiteng <huangrt01@163.com>
…pair-8519-Yz6CYe Signed-off-by: huangruiteng <huangrt01@163.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max
本次评审对应提交 b8c01d3f156dc98bebea6eba505e515ae5085535。
[P2] 只改显示标题仍会中断获准的原生命令。
动机 / Motivation
已准入的 Codex Turn 可以继续自己的原生命令。Goal Stop 或撤销运行 Agent 的权限应停止该命令并如实报告清理结果。基线在真实 Goal Stop 后仍可能让已启动的工具完成写入;只更新展示标题或添加另一名 Agent 时,命令正常结束。当前提交在 File 和 SQLite 上均能中断真正 Stop,终止两种入口的运行中工具;加入另一名 Agent 仍可完成。撤销当前 Agent 也会终止。当前提交在 File 和 SQLite 上均能中断真正 Stop,终止两种入口的运行中工具;加入另一名 Agent 仍可完成。撤销当前 Agent 也会终止。只更新同一 Goal 的展示标题,Goal、Agent、workspace 和授权均不变;但 File 和 SQLite 上的两种入口都报 stale_goal_authority,提前杀掉原工具。基线四例均完成并返回 wait。本次验证 macOS 上两种真实 Codex 入口与 File/SQLite,未验 Windows 原生中断、已安装采用或 C1 完整组合。
改动思路 / Approach
沿用现有 Host 权限门和进程监督,运行中比较应只由本次准入依赖的事实构成。真实 Stop 和当前 Agent 撤权已得到处理;同一授权下的展示改动仍会触发错误中断。 当前重查对 Stop 和撤权是真正的执行门。源与工作区沿用原绑定,把与执行无关的展示字段放回原投影。
具体改动 / Changes
关键代码讲解
15 个文件,+725/−83。核对 interrupt-proven-stop、continue-within-current-grant 和 reject-revoked-agent。准入与工作循环 运行中比较。在真实 Codex CLI 的普通 exec 和 operation tools 两条路径启动同一个合成命令。命令写出 PID 后才提交 Stop、另一名 Agent 注册或标题变更。真实 Stop 下,进程已退出且没有延迟写入;另一名 Agent 加入时产物正常落盘。撤销本 Agent 的四个候选分支也没有留下写入。
对主干的风险 / Risks
只更新同一 Goal 的展示标题,Goal、Agent、workspace 和授权均不变;但 File 和 SQLite 上的两种入口都报 stale_goal_authority,提前杀掉原工具。基线四例均完成并返回 wait。 既有 peer 注册反例已通过,另一个显示标题反例表明摘要仍把非权限数据计入授权。收窄输入,不改变真实 Stop、来源丢失和撤权拒绝。
语义与 CI 对齐
两种运行入口与两个 provider 使用同一反例,对比实际进程、产物、结果及零扣额。178 项 Python、TypeScript、Ruff 和 quick premerge 通过。未查询托管 CI。
我的整体评价 / Verdict
请求修改。保留已有 Stop 与 peer 修复,在当前运行授权 owner 排除展示标题并补同条件回归。现有 CLI,无首屏改动。macOS loopback 验证;Windows 仍待。
English verdict: REQUEST_CHANGES. Stop and peer addition work, but a display-title-only update still cancels an authorized running Codex Turn. Narrow the authority comparison.
Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent, gpt-6.1-sol, OpenAI, runtime_reported, reasoning effort max
动机 / Motivation
本评审覆盖已有 loopx turn run-once --host codex-cli 的普通 exec 和 --codex-operation-tools 入口,以及控制同一 Goal 的操作者。 在同一原生工具写入前暂停,主干对已核验的 Goal Stop 仍放行下一次写入,File 和 SQLite 的两种入口都返回 wait。PR 的上个 head 修好了真实停止,但把注册表中与授权无关的标题放进摘要,改名即误报 stale_goal_authority。
当前 head 在两种本地 provider 上终止失去授权的原生工具,原进程退出后不会写出延迟标记,失败不结算额度。显示标题改名、评审排序及其他 Agent 变动后,原获准工具可完成并返回 wait。
范围为当前 Turn 启动的本地原生 Codex 子进程。远程副作用、其他 Host 的停止能力和 C1 的发布版采用各有自己的验收。
改动思路 / Approach
复用 Goal 源注册表、镜像路由、Agent 有效权限投影和 TS runtime 的准入判定。启动前核对原注册表字节见证与当前 quota 决策,运行时由同一 owner 检查生命周期与原 Agent 的执行依据。标题和镜像同步时间退出运行时摘要,未知旧字段保守保留,避免将未经分类的授权字段一并放行。普通 exec 复用现有进程监管,operation 模式复用已认证的 native Turn 中断和终端清点。
源注册表与同源镜像按既有写入顺序锁定和回读,锁只覆盖相应读决策或派发边界。普通 exec 与 operation 的进程收尾各沿用已有宿主语义,外层执行器保存失败和额度结果。 运行中的 SHA-256 来自当前 Goal 的身份、路由及有效执行事实,保存在该进程的 admission 对象中。无法证明退出时,沿用进程监管记录并标为 interrupt_unconfirmed,后续 drain 回读保留不确定性。
具体改动 / Changes
运行时 authority projection 按当前 Agent 比较有效成员资格、工作模式、profile 和 grant。显示字段与同步时间独立于这些事实。 _legacy_running_authority
现有 TS 决策先处理缺失、注册状态、Stop 和不可用,再根据当前阶段检查启动见证或运行摘要。 legacyRuntime
Operation transport 保存真实 turn/start 返回的 id,用原生中断与终端回读清理这一次受管 Turn。 run_codex_operation_host
普通 exec 将运行检查交给现有监管器,退出后再核对一次权限。无法证明中断时返回单独错误。 _run_codex_exec
TS 子进程 owner 先给受管 Codex CLI 有界 SIGINT 收尾时间,再执行原进程组清理,私有回执保留返回信号。 runHostProcess
15 文件 +742/−83。production 11 文件 +375/−81,tests_or_fixtures 4 文件 +367/−2。规格依据为 Controller–Worker 主循环,版本 896ef5ebc8f7924cbbcf54de4ab47f8ed7dc3113。评审映射 admitted-worker-stop-and-current-authority 要求 Worker 继续执行须有原 Goal、原 Agent 和当前授权。Stop 在已证明的范围内生效,不能凭未知退出完成结算。同一有效授权下的展示改动保留正在进行的工作。 结果为 implemented,验证来自 uv run --extra test python -m pytest -q tests/control_plane/test_codex_operation_launch.py tests/control_plane/test_host_process.py tests/test_loopx_turn_codex_cli.py。真实宿主对照沿用仓库 test_codex_context_boundary.py 的私有临时 Codex 环境及 codex_checkpoint_fixture.local_inference_provider,从 loopx turn run-once --host codex-cli 启动同一受控写入命令。
本补丁没有新增开关。普通 exec 是现有默认入口,operation tools 仍沿用已有显式入口。通用 Host 和普通 Chat 调用缺少已准入的原生 Codex 运行检查时,保留原有参数、输出和清理,覆盖 EOF、输出上限、超时和回调异常。 同一工作区或源路由仍绑定原 Goal 与 Agent。新增或删除其他 Agent 可继续,当前 Agent 撤权时即使旧 alias 仍存在也拒绝。旧的结果和 session 绑定仍由既有读写路径处理,无需状态迁移。
对主干的风险 / Risks
主要风险是把普通配置编辑误认作撤权,或者在原生工具尚活跃时把 Stop 返回为已确认。使用相同的工具和写入标记、观察原 PID 与原 quota 记录来判定。无法确认退出时保持失败及未知 drain,给出可区分的诊断。
真实 Codex CLI 0.159.2、macOS、loopback 合成 Responses provider。四种 provider × transport 组合在工具运行中单独改标题后均完成写入并返回 wait。SQLite operation 的同 Goal peer 添加及 File 普通 exec 的评审排序变更也正常完成。回归还覆盖显示名、镜像更新、peer 删除和旧的隐式 peer 模型。
同一真实工具运行中执行 Stop 或撤销当前 Agent。File、SQLite 的普通和 operation 共八例均在释放写入信号之前退出,未写入成功标记,quota spend 为零。TS 和 Python 回归覆盖启动前 Stop、工作模式和工作区变更、不可读权限、不可确认中断及保留其他终端。
625 项 Python 回归通过,2 项显式 opt-in 跳过。27 项 TS Host/runtime 测试及控制面 TypeScript typecheck、mypy、Ruff 通过。真实本机 Codex 的 14 个当前提交案例通过。原 PR head 的敏感性对照重新出现误停。 标准预合并 6 项 direct、13 项 smoke 通过。
本次原生验证在 macOS 进行,模型回包来自本机合成服务。实际 Windows Codex 中断、线上模型和已安装 C1 端到端采用仍待验证。GitHub 仓库级 CI 状态以合并前即时检查为准。
我的整体评价 / Verdict
评审版本 7bd2d0d8388013b98557bdc6eb2f009dd00e81d9。Goal Stop、当前 Agent 撤权以及同一 Goal 的展示配置对照已通过上述实际入口验证。原评审发现的条件均以修复前反例和当前结果对应核查。
保留了既有 Goal 路由、TS runtime 和进程 owner。与本次相邻的简化是把两种入口收敛到同一运行授权检查,并复用现有摘要与中断路径。对整个旧注册表另建授权 schema 会扩大迁移范围,现有精确回归已覆盖需要修复的显示字段与权限边界。已安装 Windows Codex、线上模型和发布版 C1 未纳入这次本机验证。
English verdict: APPROVE. Head 7bd2d0d. The reported findings are resolved and the changed behavior is covered by the stated checks.
Original findings verified resolved at 7bd2d0d. A live ordinary Codex tool completed after changing the same Goal PR review order on File. The operation and mirror variants also passed the File/SQLite regression. A real Codex operation Turn on SQLite completed after a peer joined. File/SQLite regressions cover join, removal and stale registration aliases. The original tool was interrupted when its own Agent was revoked in both native transports. The old head interrupted the same tool after a title-only change. All four real Codex File/SQLite and ordinary/operation variants now complete and return wait. Stop and revoked-Agent controls still terminate the tool before its write and spend no quota. Maintainer review: #8519 (review). Original discussion retained.
Running authority follow-up
Head
b8c01d3f156dc98bebea6eba505e515ae5085535against81abf357c7b7c179ee79181376e6210c4826e6bc. A running Turn compares the admitted Agent's registration and grants along its original Goal route. Adding or removing another Agent can proceed while the command runs. Stop, revocation of the running Agent, a changed work mode or workspace, and unavailable authority still interrupt the Turn. Historical registration aliases cannot keep a revoked coordination grant alive. Review findingwait, and quota spend stayed at zero.中文摘要。运行中按原 Agent 的权限判断,增删协作者时原命令可继续,真正 Stop 或撤权时仍会中断。
Goal and delivered outcome
Goal Stop interrupts the native Codex commands launched by both ordinary
codex execand the operation-enabled Turn. With ordinary exec on current main, a verified Stop left the native tool alive and allowed its delayed write on both File and SQLite. The fixed Turn returnsgoal_stoppedafter the tool exits. Changing PR review order during the same ordinary Turn lets the original command complete.The running ordinary Turn checks the same Goal authority as the operation-enabled path. Its launch fence is released before the running check. The existing process supervisor gives the owned Codex CLI a bounded interrupt before its normal process-group cleanup. When it cannot observe the Host return from interruption, LoopX reports
codex_cli_stop_unconfirmedand preserves unknown drain evidence. The ordinary CLI retains its existing native command and result format.Author declaration and scope
Written by
model_agentusing OpenAI Codex. The delivery basis is the realloopx turn run-once --host codex-clientrypoint and the admitted worker and Stop boundaries in the Controller and Executor RFC. Related to #8499 and the C1 integration #8266.The existing operation-enabled Stop and repository-check fixes from #8525 and #8527 remain in this proposal. The new commit shares the running authority check with ordinary exec and extends the private process transport. The update fixes four reproduced type errors in the touched Python modules and keeps the supervision and cleanup routines within the existing maintainability limits. The native Windows interruption path and independent C1 installation adoption still need qualification.
Validation
Tested
7d37c30bae3a55d3e29af8fa3cf1c2b20476b206againstb89a574b05a3e7d5920a8e7184476dfb7b041790. Native cases use installed Codex CLI 0.167.0-alpha.3.2 on macOS, isolated File and SQLite, and scripted loopback Responses with a synthetic write.34171ceb.cqr_def64649f9d9063a1ff8preserves the required full Python hold.Frontend and visual evidence
UI impact is none. The change exercises existing public headless CLI entrypoints.
Type and area
No RFC pair changes. All commits carry DCO sign-offs.