Skip to content

Resume original work-session history after an interrupted read - #8633

Merged
huangruiteng merged 1 commit into
mainfrom
codex/attached-chat-installed-readback-20261112
Nov 12, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/attached-chat-installed-readback-20261112

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Goal and delivered outcome

When someone scrolls back in a Codex App work session, the server can send HTTP 200 headers and lose the connection before the page body is complete. The transcript used to keep the records already on screen and stop at a generic error until the reader reconnected.

The attached conversation reader now retries the same source and history position automatically. Already loaded records stay visible, and the reader stays at the same position when the older records arrive. A complete invalid response and an interrupted permission denial retain their existing stop behavior.

Author declaration

Written by model_agent, Codex (OpenAI GPT-6).

Implemented against Workspace reading and request continuity at 9ce3a46bfe525aa2167de6699fc676ce8ef60247.

Criterion Disposition Owner and verification
Continue reading the same original Session after a temporary read failure implemented The attached read classifier distinguishes an interrupted successful response from a complete invalid body. The packaged fixture cuts an HTTP 200 body short and checks that the next request uses the same binding, source and cursor.
Keep the saved conversation and reading position implemented The existing history reader retains the transcript during the failure. The packaged browser regression checks the visual anchor when older records arrive.
Preserve permission and delivery boundaries implemented The regression retains the interrupted 403, complete invalid response, binding revocation and reply receipt cases. Only the read retry classifier changes.

Scope and continuation

Complete within the attached transcript read path. It uses the existing TypeScript reader and source validation. The intended base is main. Independent review and installed adoption of this fix are pending.

Validation

  • Tested revision 48fb5334711a8b61eba3f5d2012666c3ab11c909 against 9ce3a46bfe525aa2167de6699fc676ce8ef60247
  • Run state: finished
  • Inputs: synthetic, authorized_private_read_only
Check kind Result Public-safe evidence
static passed Dashboard TypeScript, fixture lint and format, source bundle and isolated wheel, standard diff-selected premerge.
regression_parity passed The same packaged browser regression fails on the base because there is no automatic second request. The candidate retries the same binding, source and cursor, then clears the notice and preserves the scroll anchor.
integration passed The packaged attached-host-follow-up scenario covers a truncated 200 history page, a stalled 503, a truncated 403, a complete invalid 200, binding revocation and reply receipt recovery.
real_backend passed A read-only preview of the candidate wheel used the existing LoopX 2.3.0 Codex App history backend. At 1200 px and 390 px, the injected interruption preserved saved records and the single retry restored older records from the original source.
manual passed Inspected both packaged first viewports with long dialogue, a collapsed group with recorded failures, and the interrupted and recovered states.
real_entrypoint not_run The candidate was verified in an isolated preview; installed desktop adoption remains pending.

Frontend visual evidence

First viewports from the same synthetic Codex App fixture on both packaged revisions. The old error stays on screen with 99 work records; after automatic recovery, 199 records are available in the same group. Long dialogue and the existing reconnect control remain in context during the interruption.

Viewport Before: old error remains After: history resumes automatically
Desktop 1512 px Desktop before: manual reconnect is required after the body is interrupted. Desktop after: older records appear at the same reading position and the error clears.
Narrow 390 px Narrow before: the existing records remain visible with the generic error and reconnect control. Narrow after: the work group grows in place and the error clears.

Type of change

  • Bug fix
  • Test update

LoopX area

Personal Workspace, attached Codex App conversation.

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.

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

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

本次评审对应提交 48fb5334711a8b61eba3f5d2012666c3ab11c909。

无阻塞发现。真正收到 HTTP 200 后正文截断时,候选两种宽度都从原游标补回较早页;旧绑定和读取位置保留。

动机 / Motivation

在 Personal Workspace 回看原 Codex App Agent 工作会话的人。回看原 Codex App 会话时,服务已发 200 头但正文中断。页面保留已读记录,随后停在通用错误,未自动重读较早页。候选从同一绑定、来源和 before 自动重读;打包前端的桌面和窄屏各从 100 恢复到 200 条,原阅读锚点偏移均小于 0.25 px。本轮独立验证源码打包的 Chat、真实本机 HTTP/SQLite 和合成的原 Codex App 宿主。已安装桌面和真实账户接续未验证;托管 CI 未查询。

改动思路 / Approach

由现有 request 捕获传输事实,由既有 readHistory 保持原来源、续页和锚点。没有第二套恢复路由。同一 TS reader 和现有 Python 合成 peer,只增加可直接验证的断体条件。 现有 request 保留已知 status,再用 interruptedSuccessfulResponse 区分正文读取异常与完整坏 JSON。保留分页的同源验证、generation 和原锚点。 错误分类 分页与重试

具体改动 / Changes

关键代码讲解

收到成功头后的断体进入现有读重试,4xx 仍走拒绝;通过完整读取的坏 JSON 不会重试。分页、会话发现和模型读取共用同一异常事实,send 仍由既有投递回执处理。 发现入口 浏览器 smoke 比对原 binding/source/before,并用实际 Content-Length 不足的 socket 注入故障。 对照烟测 断体夹具

以 base 9ce3a46 的 docs/development/frontend-delivery.md 为准。original_cursor 对应同源同游标;stable_viewport 对应已载记录和锚点;refusal_isolation 对应 403、坏响应和换绑定。 暂态读取合同 阅读连续性

对主干的风险 / Risks

PASS。真实 HTTP 先送 200 头再截断,base 桌面和窄屏各一次分页请求、保留 100 条并显示错误;head 两次 query 相同、恢复 200 条,锚点偏移小于 0.25 px。截断 503 两版仍恢复;完整坏 JSON 和截断 403 均只发一次,后者拒绝原读取。候选换绑后释放旧页,只有新会话内容;零回复 POST、零宿主输入、历史原字节未变。

语义与 CI 对齐

两版源码打包和来源校验通过,11 项关联 native reader 用例两版均通过,候选标准 premerge 通过。PR 描述的 1512 与 390 px 前后图均可读,长正文和已有错误折叠组保留;独立 1440 与 390 px 同样确认原位置和恢复提示。

我的整体评价 / Verdict

代码评审通过。复用现有读状态与来源验证即可完成本次恢复,暂不新增独立重试队列。核对 PR 描述的四张首屏以及独立打包两版 1440×900 和 390×844。原工作会话选择和首条可见内容保留;断流恢复后错误移除,窄屏不横向溢出。真实账户与已安装桌面未独立验证。

English verdict: APPROVE. At 48fb533, interrupted successful history responses retry the original binding and cursor, keep the viewport anchored, and leave denied, invalid and stale-binding responses fenced.

@huangruiteng
huangruiteng merged commit 86ba59d into main Nov 12, 2026
35 of 48 checks passed
@huangruiteng
huangruiteng deleted the codex/attached-chat-installed-readback-20261112 branch November 12, 2026 05:55
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