Skip to content

Keep native Inbox delegation reads complete across host budgets - #9204

Merged
loopx-agent merged 2 commits into
mainfrom
codex/inbox-integrated-native-read-20261121
Nov 22, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/inbox-integrated-native-read-20261121

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Goal and delivered outcome

A managed Turn can read outstanding delegations through the existing Inbox, including the latest verified partial result and pending work. Readers can page through full incoming briefs, partial summaries, and outstanding sent requests. The Inbox checks each exact request and operation cursor against its registered scope. If the sent request record is unavailable on the final page, the response exposes the unavailable count.

This integrates the changes from #9169 and #9195 with the host reader declaration already on main in #9095.

Author Declaration

Written by model_agent · GPT-6 · OpenAI.

Requirement Disposition Validation
Restore unfinished request context before work Implemented in the existing scoped Inbox transaction Two actual native Codex Turns per run read complete briefs through fresh reads and cursor continuation. The CLI tests cover the combined operation and request cursors.
Keep uncertain returns and incomplete reads actionable The Inbox verifies request and result identity before compacting a partial result. It reports missing source records on the final attention page. TypeScript and Python regressions cover unbound receipts, unreadable operations, exact lookup, and denial across Agents.
Keep Markdown Inbox data within the caller's usable budget The opening and default fallback use 5,000 serialized bytes. The declared profile uses up to 64,000 bytes for captured continuations. The actual Codex tool stream retained every page under both profiles. The compact reference and direct recovery use the same capture digest and cursors.
Verify the installed Desktop and Feishu journey Pending The isolated wheel includes the Chat bundle and exercises the installed CLI. The live Desktop and Feishu paths still need their original acceptance checks.

Required work context and operator Inbox contract

Validation

Tested candidate de5a83d4d533571f3d8b1b38da7178087cfda82c against main d772190747d6d39d7f896ea37a52d518d257e571.

The same UTF-8 workload was run with Codex app-server 0.171.0-alpha.13 over stdio, with isolated File and SQLite stores and loopback fixture inference. Each run recovered all 24 original briefs. Reader call counts include same-capture retries and exclude the Inbox openings.

Reader profile Main reader calls Candidate reader calls Main truncation recoveries Candidate truncation recoveries
Default shell 47 44 3 0
Declared 64 KB 5 5 0 0

Each backend produced the same call counts. The candidate's default reader responses were at most 4,999 serialized bytes. The same cursor failed across Agents with no receipt writes. The package included the verified Chat bundle and the candidate was installed into a separate test environment.

  • 75 Python tests passed. Two PowerShell cases were skipped on macOS.
  • 26 TypeScript Inbox tests passed. Control-plane type checking, Ruff, and the RFC bilingual diff check passed.
  • The new terminal-page test reproduced the missing unavailable count before the fix and passed on the candidate.
  • The standard premerge gate passed 6 direct checks and 18 selected checks. The current diff passed the change-quality receipt check.

Hosted checks

The inspected release and Chat browser jobs stopped at the shared ExecutionObservationReadback assertion. The fix is already on main in #9210. Release browser job · Chat browser job

Windows reported WinError 10038 while the shared canonical fixture waited for its subprocess pipe. #9218 addresses this fixture failure. Its native Windows job passed at 843e531. Windows job

Local integration with main and the shared fixture

The local wheel pairs the published de5a83d with main b4e1ded and the fixture proposal #9218 at 843e531. Its verified Git tree is 1ebaf4565ef5e36af6aa8f38876921c0395c21aa.

On isolated File and SQLite stores, real Codex app-server 0.171.0-alpha.13 completed two native Turns per configuration using local fixture inference. Each configuration recovered all 24 original briefs. Continuing from the old cursor returned its original remainder. A fresh scan found the newly inserted brief, and an attempt to use the old cursor from another Agent was refused without writing a read receipt.

The default reader used 44 calls with a maximum serialized response of 4,999 bytes on each store. The declared 64 KB reader used five calls with a maximum of 63,999 bytes. Both paths completed without truncation recovery. The packaged Chat browser checks passed late conversation return and team evidence reading. The shared execution-observation contract also passed on this tree.

The combination was qualified locally. The shared fixture passed its own native Windows job. Hosted checks for a future integrated head are pending.

Hosted candidate interruption recovery

The hosted candidate artifact contains the wheel built from GitHub merge commit 4febfe3 with PR head de5a83d. Its SHA-256 is ddb91b03d37243006ac2a2d54a177f7e2ec42ba9231af4dd0528eed311808fa7.

An isolated install used real Codex app-server and loopback fixture inference on File and SQLite. After the first 56,038 bytes of the saved Inbox page reached Codex, changing a byte in the captured file made the next reader return an explicit digest error. Restoring the original bytes allowed the same reader to continue at the same offset. Two native Turns on each store recovered all 23 exact briefs across two Inbox pages. Recovery caused no additional Inbox read or collaboration receipt write.

Three source Dashboard browser shards and Dashboard acceptance passed. The hosted failures described above still apply to this head. The shared fixture's current 843e531 has an independent approval conclusion, and its native Windows job passed. The combined candidate still needs its own hosted qualification.

App and CLI readback from the same request batch

On the isolated combined wheel above, the App request-inventory HTTP endpoint and installed manager-inbox read the same six requests on each of File and SQLite. Both preserved the original briefs. The App also resolved each original conversation and Turn. Three requests remained pending, including an adopted request without a conclusion and a conclusion queued for delivery. Three confirmed returns left the unfinished lists and remained available through history or exact request lookup. A foreign App audience and a different receiving Agent could not read the requests. A malformed return receipt kept its request pending on both surfaces. Restoring the receipt recovered the original App snapshot, and repeated reads did not repeat delivery.

One acceptance gap reproduced on both the combined wheel and main b4e1ded on both stores. The two surfaces still count a terminal return as delivered when its receipt points to another request's message. The check for mismatched partial return receipts on the candidate passed. Terminal receipt binding, hosted checks for the combined head, and verification on the installed App and Feishu remain open.

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.2-sol · OpenAI · runtime_reported · xhigh

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

动机 / Motivation

托管 Agent 需要在执行前发现未完成委派和回执异常,并按实际工具容量读全请求。 未明确声明的 shell 可能截断页。单独使用 #9195 的固定 reader 预算会把已声明的大页路径降为小页。 原先 #9169 的候选实现,在外发记录只剩一条不可读、且没有下一页时,首次注意视图没有发出恢复计数。当前头在完全相同的 TypeScript 事务测试返回 unavailable_count=1,普通 Inbox 仍保留原输出。 当前提案把默认 Markdown 开场和保底 reader 限在 5,000 字节。明确声明的 64,000 字节继续经现有 capture reader 使用。注意视图终页同时携带不可读记录的异常数。 独立验证采用真实 File/SQLite 源码 CLI 和类型化事务。官方 Desktop、实时 Feishu 及 Windows 仍未在本轮复验。

改动思路 / Approach

在 Inbox 的现有 TypeScript 事务中处理摘要、精确送达和末页恢复状态。在 Markdown 适配器组合保底上限与已声明的 reader 容量。 工作摘要与完整请求继续共享原始回执与游标;读取分页沿用原执行权限。 复用 #9095 既有声明和同一不可变 capture,通过两条预算路径保全不同宿主的读取合同。

具体改动 / Changes

准确头 de5a83d,merge base d772190,13 个文件,+561/-108。当前主干 a6ffb3b 的整合预演无冲突,合并树独立通过 7 项聚焦回归。原候选的末页异常路径另用同一断言与 #9169 对照。 预算契约 按修订 de5a83d 的仓库规范核对各项要求。 目标规范

  • attention-receipt · Preserve full requests unless the exact current partial result is delivered.
  • terminal-unavailable · Report unavailable records including on a terminal attention page.
  • profile-parity · Bound fallback responses while preserving the qualified declared reader and exact digest recovery.

关键代码讲解

对主干的风险 / Risks

本头实跑 75 项 Python(2 项 PowerShell 跳过)、87 项 TypeScript 和本地 quick premerge。File 和 SQLite 的已声明 64,000 字节输入均在 5 次 reader 调用内读完 23 条请求和两张逻辑页。默认 5,000 字节分支验证开场、摘要恢复、续读偏移及整页回读。 终页反例在 #9169 缺少 unavailable_count,在本头通过。精确结果旧回执与错误绑定保持全文并可区分恢复,另一 Agent 的请求游标被拒绝,外发续页不追加交付或消费。 File/SQLite 发起同一实际生成的命令,在 5,000 字节和声明 64,000 字节两支均完整重建源数据。修过的末页断言独立通过。 此次验证不是正式安装版 App 或实时飞书的采用凭据。涉及更宽的工作流验收时应继续保留这两项实际入口的证据需求。

我的整体评价 / Verdict

批准当前准确头。默认小窗、声明大窗与外发末页恢复在同一个实现入口通过测试。精确请求来源和回执消费仍由既有流程负责。可用这一个准确头承接两项早期候选的集成验收。

English verdict: APPROVE at de5a83d. Approve this exact head. It preserves the existing declared 64 KB capture route and bounds the default Inbox reads at 5 KB. The same terminal-page witness fails on the earlier proposal and passes here, and seven focused tests pass on a clean current-main integration.

@mergify

mergify Bot commented Nov 22, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 22, 2026
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 · exact head 3ba419215f80ce18678fac8e26308251fb0afa14\n\nApproval conclusion (author-owned PR; GitHub blocks formal self-approval). This integration keeps attention continuation and unavailable-count reporting while adopting main terminal-return identity checks and reader budget behavior. The terminal-only attention regression is retained, and adopted Incoming requests follow current main step precedence without rewriting source Inbox records.\n\nValidation: 29 TypeScript Inbox/return tests passed; 32 delegation Python tests passed with 2 platform skips; focused Ruff checks passed.

@loopx-agent
loopx-agent merged commit 8039e9d into main Nov 22, 2026
14 of 17 checks passed
@loopx-agent
loopx-agent deleted the codex/inbox-integrated-native-read-20261121 branch November 22, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant