Skip to content

Avoid repeating Manager Inbox requests in the Progressive first read - #8397

Open
loopx-agent wants to merge 2 commits into
mainfrom
codex/progressive-manager-agenda-20261109
Open

loopx-agent wants to merge 2 commits into
mainfrom
codex/progressive-manager-agenda-20261109

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Progressive admission can show a delegation agenda and then require the same scoped Manager Inbox read before work. Both carry the request rows. This change keeps incoming and outgoing counts, scan status and the required command in the initial view. The required read carries the rows and their guidance, and the original capture supports exact recovery.

The projection checks the current normal-work route, the exact registered pre-work read and a large, complete agenda with consistent counts. Small, partial, mismatched and unfamiliar agendas use the original inline view. The original read and result-consumption authority comes from the existing Manager Inbox and collaboration owners. C1 uses the same selection code from its existing quota entry point. Related to #8266.

Matched native CLI replay

Both arms used actual File and SQLite authority, native SessionStart, and public synthetic peer requests. The required-path totals include the guard, every initial page and the required Manager Inbox read. Every replay returned the same scoped request IDs and directions from the captured and current inbox views. Exact recovery was verified separately.

Path, 12 requests Initial pages Required CLI stdout Framed local RPCs Framed local bytes
Main, File 3 → 2 61,206 → 53,953 B 82 → 81 517,249 → 514,566 B
Main, SQLite 3 → 2 61,294 → 54,033 B 82 → 81 518,013 → 515,328 B
Local C1, File 3 → 2 60,885 → 53,648 B 82 → 81 512,346 → 509,560 B
Local C1, SQLite 3 → 2 60,969 → 53,724 B 82 → 81 513,030 → 510,264 B

In the 5-, 8- and 18-request main replays, required stdout fell by 4.1–10.0 KB and the initial read used one fewer page. Exact agenda recovery in the 12-request case costs one extra call and about 7.5 KB if the caller needs it. Replays with one request, an agenda with omitted rows, and explicit raw delivery checked the full original agenda. The fixture measures CLI and local bridge traffic. Model tokens, context retention and accepted outcomes require their own comparison.

Validation

  • Main base c44eb156d947198b9b5e36e1f9444afbbf9b205b, author head 59eb26851dbf609649fb56b8faff58400724bb4e.
  • The three Python source suites passed 211 cases. Control-plane typecheck and standard diff-scoped premerge passed.
  • Exact wheel matched the committed TypeScript file and passed 8 isolated File/SQLite CLI cases. Recovery returned the captured agenda with its original values.
  • Local C1 integration passed 11 focused selection cases and 8 real CLI cases. The 98-row budget comparator passed with 28 carrier and continuation review signals.

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 loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

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, reasoning_effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

已准入的 Codex App Turn 可能先在 Progressive 首读看到委派摘要,然后在必读的 Manager Inbox 看到同一批逐条记录。两份都进必经路径会占用分页和输出。当前提交把大而完整的摘要行留给这次必读,首读仍告诉接收方有多少请求、扫描是否完整、接下来运行哪条命令。以同一批 12 条请求对照,File 和 SQLite 的首读均从 3 页降到 2 页。本次只测源代码 CLI 的交付;安装后的模型上下文保留、采纳和完整成本仍待比较。按需恢复原捕获另有一次读取成本。

改动思路 / Approach

仅当普通工作已经准入,而且同一 scope 的 Manager Inbox 读取已列为 pre-work 必读时,首读投影才省略重复行。Inbox 继续供应当前请求及说明;原 capture 仍可按原 digest 和指针恢复。没有新的评估、采纳、回传消费或扣额权限。

具体改动 / Changes

评审 59eb268,基线 c44eb15,3 个路径,+90/−12。对照必需工作上下文契约:scoped-inbox-delivery、fallback-and-exact-recovery 和 required-path-reduction 已独立验证;model-outcome-qualification 另行验证。

关键代码讲解

  • canDeferManagerAgenda 核对已登记 hook、before-work 顺序、完整必读记录、命令、已知字段和计数。摘要小、漏项、扫描不完整、未知字段、命令不一致或 Turn 被 hold 时仍给原视图。
  • 首读选择 保留 read_complete、收发计数、扫描状态与必读命令。实际 manager-inbox read 读取当前项;委派投影 owner 继续拥有方向、状态和消费语义,原 capture 仍按精确指针恢复。

对主干的风险 / Risks

File 和 SQLite 的实际 guard、首读分页及必读 Inbox 对照,12 条夹具均从 3 页降到 2 页,必经 stdout 分别从 82,336 降到 73,177 B、从 82,362 降到 73,203 B。请求 ID、方向和正文完整读回;未记录接收方决定或扣额。首读后新增一项时,必读看到 11 项,原捕获仍精确恢复原 10 项。单项、24 项有遗漏、显式 off 的路径继续显示原摘要;命令不匹配、未知字段及 hold 的源码负例也通过。若需要再读原 12 项捕获,另加一次调用、9,355 B,这笔成本未算入常规必经输出。

我的整体评价 / Verdict

认可当前提交。两版各 10 个独立 CLI 用例通过;候选另外通过 324 个 Python、41 个 TypeScript 用例、类型检查和 standard premerge。作者的本地 C1 测量未在本次复跑。

English verdict: APPROVE. The matched native CLI path removes one duplicate page while retaining the required current Inbox read, exact capture recovery, and original behavior for partial or disabled delivery.

This branch has not been deployed

No deployments
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.

1 participant