Skip to content

Avoid rereading the Manager Inbox before Todo selection - #8659

Merged
huangruiteng merged 1 commit into
mainfrom
codex/selection-inbox-first-read
Nov 13, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/selection-inbox-first-read

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

Goal and delivered outcome

When the native first read asks the agent to select a Todo, it can include a large Manager Inbox agenda that the same Turn already requires the agent to read separately. Use the existing compact agenda view during explicit, non-spending Todo selection when the scan is complete and the required read matches exactly.

The first read keeps counts, scan status, the required command, and any omission guidance. The existing inbox cursor supplies the request rows, and the full captured agenda remains at its original address. The projection does not change admission, required reads, receipts, spend, or the feature-off route. Held and unmatched routes retain the inline agenda.

Base: main.

Author declaration

  • Written by: Codex (OpenAI model agent).
  • Implemented against: docs/reference/required-work-context.md, first-read and Manager Inbox behavior at ce69003c73378fdb067a6b86e7b60feb50cb1b77.
Criterion Disposition Owner and verification
Preserve the same required read, counts and recovery address. Implemented Existing agenda projection in progressive_context.ts; scoped CLI read and immutable-capture readback.
Keep selection separate from delivery and spend. Implemented Share the existing selection-route predicate in interaction_contract.ts; test admitted, explicit selection, held, spend-enabled and mismatched paths.

Complete for the native first-read projection. No schema, backend, install, or default-activation change.

Validation

  • Tested revision: 5970d95914afbb3a653de1da23020e663e6735e4. Input: synthetic fixtures.
Check Result Evidence
Real CLI / regression parity Passed The same 23-request fixture fails at the inline-agenda assertion on the base and passes on the candidate with File and isolated SQLite (3.53.4). The emitted inbox command returns all request IDs across its cursor, the original agenda reads back unchanged, and the Turn has one decision receipt and zero spend.
Focused suites Passed tests/test_delegation_turn_context.py, tests/control_plane/test_context_first_read.py, and tests/control_plane_ts/turn_envelope.test.ts.
Static / premerge Passed TypeScript control-plane typecheck; standard diff-selected premerge checks and public boundary scan.

UI impact: none. Control-plane bug fix, contract documentation and regression tests. DCO sign-off present. No paired RFC files changed.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · max

本次评审对应提交 5970d95914afbb3a653de1da23020e663e6735e4。

无阻塞发现。

动机 / Motivation

通过 Codex App 原生首读从多个可执行 Todo 中选择下一步的 Agent。有 23 条来件和一条待确认回执时,未选 Todo 的首读会带入一批随后还要到 Inbox 查看完整内容的摘要。File 和 SQLite 的同一输入都从两页缩为一页。原必读命令通过 cursor 找回全部 23 条来件和同伴结果,原捕获的议程可原样读回。覆盖源码 CLI 和隔离 File、SQLite。已安装会话的实际模型采用与完整成本仍待观察。

改动思路 / Approach

复用原 agenda 摘要与显式选择谓词。只有命令可用、尚未交付且两类扣额均关闭时,才扩展到待选首读。选区使用现有 before_work 读和 cursor,完整资料仍在同一不可变 capture。 判定留在首读视图层,原 discovery 与同轮绑定仍走现有命令。

具体改动 / Changes

关键代码讲解

hasUnboundActionSelection 复用显式选择的既有谓词。 initialContextReadGroups 只在正确阶段选取匹配的摘要。 progressivePreparationScopes 复用谓词保持准备范围。 首读与回退测试覆盖可扣额、失配和缺选择命令,原生试验通过同一 Inbox cursor 读回全部请求。文档增加待选阶段的适用范围。 interaction_contract.ts progressive_context.ts turn_envelope.ts

评审以 ce69003 的 docs/reference/required-work-context.md 为准。selection_controls_before_work 对应待选时保留发现、同一 Turn 的选择命令和读义务。 scoped_inbox_and_capture_readback 对应保留 scoped Inbox、遗漏信息和原 capture 的回读。 explicit_off_and_fallback 对应保持关闭态和未知来源的原完整读取。 required-work-context.md

对主干的风险 / Risks

PASS。真实已准入和显式 off 保留原读取及执行控制。缺路由、异源、可扣额、held 与不完整扫描的首读测试保留原 agenda。两版各一条原决策回执、零扣额。工作控制和原 Inbox 的确认权保持。标准预合并检查通过。显式 off 的原始完整决策和议程在两版相同,既有正常准入路径的页大小也相同。

语义与 CI 对齐

179 项 Python、64 项 TypeScript及类型检查通过。检查同一 reader 上的 #8644,两个开放提交的静态合成树无冲突。托管 CI 未查询。

我的整体评价 / Verdict

批准。首读中的摘要复用降低了开始选任务的阅读量,后续继续从已授权来源获取原任务依据。验证覆盖现有原生入口。覆盖源码 CLI 和隔离 File、SQLite。已安装会话的实际模型采用与完整成本仍待观察。

English verdict: APPROVE. At 5970d95, unbound native Todo selection compacts duplicate inbox rows and preserves the same scoped read, original capture and admission controls.

@huangruiteng
huangruiteng merged commit 40edb71 into main Nov 13, 2026
34 of 39 checks passed
@huangruiteng
huangruiteng deleted the codex/selection-inbox-first-read branch November 13, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants