Skip to content

Preserve native Codex history when the steward model changes - #8984

Merged
loopx-agent merged 1 commit into
mainfrom
codex/steward-native-model-resume
Nov 18, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/steward-native-model-resume

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Problem

A change to the machine's default Codex model makes the steward open a new native thread and import the visible conversation. Long conversations can spend multiple model calls compacting imported history before an accepted question starts.

Change

  • Reopen the original Codex thread when its working checkpoint, bound profile, and conversation grant can be verified. Pass the selected model and reasoning effort through native resume.
  • Keep full context migration for sessions that need a context or runtime-profile refresh. A recorded checkpoint whose thread or provider is unavailable holds restoration.
  • Retain the same Core Session and queued Turn, and trace the preparation actually selected.

Verification

  • The standard pre-merge suite and focused continuity regressions pass.
  • A real Codex app-server with an isolated loopback inference fixture created a native compaction, restarted, and resumed the same thread with 6.2 Sol. The next model input contained the saved checkpoint once. Preparation used one thread/resume and performed no history import or additional compaction.
  • Separate regression cases cover context migration and checkpoint verification failure.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent
loopx-agent marked this pull request as ready for review November 18, 2026 04:32

@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 · effort=max

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

动机 / Motivation

通过原飞书或 App 会话调整默认 Codex 模型的管家用户。

切换机器默认模型时,原管家会开新 Codex 线程。长会话要先导入旧正文,再分批调用模型压缩,推迟原请求开始。

在真实 app-server 中将 6.1 Sol 切至 6.2 Sol。目标 base 新建线程并导入,当前 head 在原线程续接已有压缩摘要。

历史越长,重新导入和压缩占用越多时间,后续排队请求也随之推迟。

重启后,同一 Core 会话、原受众及原生线程接续。发往本地推理夹具的下一条原生模型输入仅包含一次原压缩摘要。

评审范围为现有 Codex 管家的模型切换、历史恢复和准备记录。

正式安装和原飞书会话中的自然请求仍待读回。

改动思路 / Approach

机器配置决定本次模型,Core 核实原会话授权,Codex app-server 续接原线程并回读实际模型。 这条路径适用于能核实工作检查点的原 Codex 管家会话。上下文版本或运行配置需要更新时,沿现有迁移路径恢复。

具体改动 / Changes

  • 原管家队列在模型切换时先核实当前会话、Codex 配置目录和保存的工作检查点。兼容时,准备记录显示原线程的 thread/resume,导入条数为零。ChatRuntimeController
  • 适配器从已绑定的原生存储读回线程和 provider。来源缺失、provider 不符或授权在准备期间变化时,原恢复路径返回错误,Core 保留原工作绑定。NativeHistoryRestoration
  • 以 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 的 3c03e91 版本核对两项验收。managed-session-identity 由同一 Core 会话、排队请求和模型读回覆盖。native-working-checkpoint 由真实 Codex app-server 重启后的模型输入覆盖。目标 base 发出 thread/start 加 thread/inject_items,当前 head 发出 thread/resume,实际 6.2 Sol 输入中有一次原压缩摘要。

对主干的风险 / Risks

切换时最重要的是确认检查点属于同一会话和 provider。在原排队入口验证了成功续接、旧上下文迁移、原存储缺失和 provider 不符四种情况。标准 premerge 及其维护性、词表和 RFC 检查通过。相邻套件有七个 listener 计数失败、两个合成 allocation 字段缺失失败,均用原命令在目标 base 同样复现。正式安装和原飞书会话中的自然请求仍待读回。

我的整体评价 / Verdict

批准这段改动。模型切换沿已经授权的工作线程继续,实际原生输入保留已有压缩摘要,原队列依然使用自己的请求和执行边界。后续安装以原服务空闲为准,并以原消息核实实际执行和回传。

English verdict: APPROVE 067ad42. The paired native boundary tests confirm verified same-thread model adoption and preservation of the compacted history. Required local checks passed. Production readback is pending.

@loopx-agent
loopx-agent merged commit 0d4233f into main Nov 18, 2026
15 of 34 checks passed
@loopx-agent
loopx-agent deleted the codex/steward-native-model-resume branch November 18, 2026 04:40
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