Repository navigation
feat(chat): observe unfinished work in attached Agent conversations - #6599
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
评审 6599@1db44f2e8ae1450e7b807269793480ad03201392。[P2] “较新记录”返回尾部后保留过期实时草稿。 在 A 显示时回看,宿主更新为 B,再点“较新记录”到尾部,回看提示已消失而 A 仍持续显示。原生订阅与 B 都有效;同一状态下重新回看再点“回到最新”立即显示 B。应让两条恢复跟随路径都发布 latestLive.current,并在没有后续事件时验证。
动机
正在 Goal 中跟进某个既有 Codex App Agent、需要看到尚未保存的可见工作内容的本机负责人。
原来工作页只显示已保存记录,未完成的消息和工具内容不可见;现在页面跟随同一原宿主的只读快照与补丁,但从回看历史经“较新记录”回到尾部时,会静默保留旧实时草稿。
真实 HTTP/Unix 对端与打包页面已证明实时更新、回看冻结、显式回到最新、Agent 隔离及完成转入已保存历史;同样的入口独立复现了“较新记录”恢复后旧草稿持续显示。
本 PR 不启动第二执行者,不授权原生输入或审批,不证明完整 token/event 对齐、Windows 传输、其他 provider、持续负载或已安装 App 采用。
当前需补齐所有恢复到实时尾部的路径;完整 Slice B 的输入、审批、跨平台及安装采用仍沿原有验收继续。
本次从普通用户要判断交付、跟进原工作内容的任务出发。Agent 能从已有上下文准备的技术资料不应再让人重复输入;原本缺失的真实意图或执行权限仍须确认,不能从展示数据推出授权。当前验证限定到真实可用的这个增量,不把测试、回执、截图或 PR 数量当成长程 Goal 的完成证据。
改动思路
Python 留在已有 Codex provider/HTTP 传输边界是合理的:只解析版本化原生数据与 IO,不创建通用控制面决策。LiveView 保存过滤后的当前内容,SSE 重查原绑定;React 将实时行与原保存历史共用 renderer。
原生 Chat provider 适配私有 Unix IPC;既有绑定、活动观察、保存历史及输入 receipt 保持各自 owner,前端只组合一个短暂可见投影。
| 返回方式(同一原生 B) | 当前观察 |
|---|---|
| 回看 → 回到最新 | B 立即显示 |
| 回看 → 较新记录到尾部 | 提示消失,仍显示 A |
| 切换其他 Agent | 旧实时行移除,原订阅释放 |
表中前两行是同一当前 head、同一真实 HTTP/Unix 对端的独立浏览器结果;不是从截图或单元测试推断。
帧读取已合并到 DesktopClient.read_frame,provider-local 状态与既有 renderer 的复用合理。当前应在同一组件统一恢复跟随时的最新投影发布,覆盖两条返回路径;无需新缓存、设置或第二订阅 owner。 保留原 owner 能让后续规则修改与回滚落在一个地方;重新创建配置或第二个原生执行者既扩大风险,也不能解决已经复现的入口问题。以上比较明确区分原状态、预期改进与当前缺口。
具体改动
整份 base-to-head:14 files, +1303/-50; two frontend files, four runtime/HTTP files, two public documents, three browser fixture/scenario files, one 469-line test addition and two synthetic PNGs.
- read_frame:Share frame decoding, keeping the ordinary 8 MiB RPC limit and a separately requested live limit. Length checked before body allocation; malformed object raises a provider-local protocol error.
- LiveView:Add compact exact-thread revisioned visible-work projection instead of retaining raw history. Snapshot/patch version and shape checks; bounded turns/items/fields/view; private and completed items omitted.
- observations:Follow/unfollow only the discovered original owner. Owner/thread/host/version fencing, bounded frame read and finally-unsubscribe; no input method.
- _codex_attached_live:Expose scoped SSE through the existing local HTTP routing. Exact Goal/Agent/binding; two-reader bound; binding checks and heartbeat; protocol stops versus transient retry distinguished.
- AttachedAgentConversations:Append short-lived live rows, freeze while looking back, clear on binding change and completion. Live identity prevents cross-Agent reuse; latestLive buffers updates while following is paused, but older(true) fails to publish that buffer at the tail.
- AttachedConversationRecord:Use current prop text for live rows while retaining stored-detail continuation for durable rows. Live tool title states in-progress; no acceptance or execution permission inferred.
DesktopClient.read_frame 把原有解帧聚合到一个函数,普通调用仍保留 8 MiB 上限。新 Codex-only LiveView 丢弃旧完成 Turn 内容、隐藏推理/用户/配置字段,保留允许的可见项;身份、原宿主版本、baseRevision、索引和大小不连续就拒绝。该原生状态词留在 provider,不成为通用 LoopX actor 或执行状态。
observations 只向发现的原 owner 发送 following/unfollowing,finally 释放;HTTP 路由重查精确 Goal/Agent/binding,限制两个读者,区分暂时断线可重连与协议不兼容停读。额外真实 Unix/HTTP 用例中,第三读者收到 unavailable;9,437,591 字节的原始帧只输出一条当前可见行;撤销绑定使两个原订阅停止。新注册但无绑定的 Agent、同进程另一 Goal、额外 thread 参数与外部 Origin 均拒绝,输入数保持 0,保存历史未因观察被写入。
前端同一个 renderer 接收临时实时文本,原保存记录继续用原 detail/continuation 逻辑。观察区标记内容来自正在运行的原宿主,回看冻结插入、切换 Agent 清除旧行,完成后转到保存历史。新 liveView/latestLive 双缓冲却没有接入 older(true) 的尾部恢复:该分支只重置 following/reading/unread,新增的 setLiveView 只在 latest() 中执行。这是本轮独立重现的当前缺口,单元与普通 wheel 的绿测没有覆盖它。
三个既有 browser/Unix fixture/scenario 文件增加合成快照、补丁、并发客户端及释放;469 行测试覆盖过滤、完成 map、断线、错 owner/version/revision、字段/帧边界和离开页面。两张 PNG 为合成记录,保留未接独立执行服务的提示;RFC 与 integration guide 明说实验范围、64 MiB 帧/32 行/256 KiB 视图和未完成资格。
独立规范依据是 docs/architecture/rfcs/desktop-execution-frontends-v0.md,不可变 revision ebc01b2a46abb493f8a2300ce07bc54036cc7a29。条款映射:Common invariants 的原 owner、精确绑定和无第二执行者获证;companion docs/integrations/session-runtime-control-plane-adapter.md 同 revision 的 Experimental owner-local Codex App conversations 中有界阅读、回看和恢复路径,本次恢复到最新仍 not_met;Attached mode 的完整输入、interrupt/resume 等继续 deferred,不额外要求此观察切片关闭整个 Slice B。新改过的 checkpoint 未被倒用为独立规范。
对主干的风险
主要阻塞是恢复后的内容真实性,不是额外执行或原生输入。后台已有 B,UI 声称结束回看却仍展示 A,且把“回到最新”控件一起隐藏;如果宿主此后没有新的可见变化,SSE 的去重不会再发送一个碰巧修正它的事件。负责人会漏看新结果,或误把旧工具/消息当作当前工作。点击另一次回看再返回虽可恢复,但这是不必要的额外步骤。
最小修复在原组件:所有回到 following 的路径都应用最新缓冲,保留身份 fencing 与历史分页;可用小的共同恢复 helper,避免两处继续漂移。在既有打包场景同时覆盖 Back to latest 与 Newer records 到尾部,并在 B 后停止事件,断言内容立即为 B。无需新状态、自动重连或放宽任何权限。
47 项源码测试通过(55.45s);普通 wheel 的独立 site-packages 环境同样 47 项通过(21.83s)。四个变化的运行时文件与 37 个 Chat 文件均与 head 逐字节相同。Ruff、配置内 mypy 19 文件、Dashboard TypeScript/build、正常 wheel、advisory 后完整语义 smoke 通过;风险 canary 5 direct +17 selected 全通过、无 manual hold。
9 MiB 用例使用真正的 Unix 帧和 HTTP,但原宿主内容是合成数据;它证明独立读限与紧凑投影,不证明私有 Desktop 协议的所有版本或持续成本。没有读取活动会话的私有历史,也没有把作者的原宿主观察当成本轮独立资格。
语义审查覆盖本次局部联合/状态词、实际 producer 和 consumer、default-off/未绑定、同容器未覆盖主体及新主体。advisory 未检出支持的命名载体,并不证明动态构造没有语义变化;此处另逐一追踪。原强制的身份、同意、版本与恢复条件没有被改成“建议”。本 Goal 的 CI policy 是 not_consulted:本轮未查询、轮询、dispatch 或等待远端 CI,局部 canary 也不替代托管/发布或合并资格。
我的整体评价
结论 REQUEST_CHANGES;delivery verdict 为 not_yet_proven。当前观察增量有用,provider 归属与大小边界合理;必须先修复已经重现的返回路径,不能因其余测试通过而批准旧实时内容被静默当作当前。
long_horizon=preserved:执行、调度和接受事实仍由原 owner 决定,局部读回/生命周期与反例保持边界;不据此认证持续部署。user_experience=regression:“较新记录”移除回看提示并恢复 following,却不发布缓存的最新实时投影;不再有变化时页面无限保留旧草稿,要求用户重新进入回看再点回到最新。
帧读取已合并到 DesktopClient.read_frame,provider-local 状态与既有 renderer 的复用合理。当前应在同一组件统一恢复跟随时的最新投影发布,覆盖两条返回路径;无需新缓存、设置或第二订阅 owner。 当前需补齐所有恢复到实时尾部的路径;完整 Slice B 的输入、审批、跨平台及安装采用仍沿原有验收继续。 验收/运行时通过、独立代码评审、原始首屏确认和 exact-head merge readiness 各有其边界;本结论不授予 merge、bypass、dismiss、resolve、输入或安装权限。
English verdict: REQUEST_CHANGES - 1db44f2; Newer records can resume following while retaining a stale live draft. Reconcile the buffered projection on every return-to-tail path; source/wheel/provider checks pass but do not cover this reproduced packaged-UI defect.
| function latest() { | ||
| historyEpoch.current++; after.current = null; history.current = null; revision.current = ""; | ||
| following.current = true; setReadingHistory(false); setUnread(false); setMessages([]); setBefore(null); | ||
| setLiveView(latestLive.current); |
There was a problem hiding this comment.
[P2] 同时覆盖“较新记录”抵达尾部时的恢复。实际打包页中,实时草稿 A → 回看 → 原宿主更新为 B → “较新记录”到尾部后,回看提示已消失但仍显示 A;同状态再点“回到最新”会立即显示 B。older(true) 在第221行恢复 following,却没有发布 latestLive.current;若原宿主不再产生可见变化,旧草稿会一直保留。请让两条恢复路径都应用最新缓冲,并在 B 后无新事件的真实 browser 场景中断言显示 B,保留 Agent 切换/完成/身份 fencing。
…path Look-back froze live insertion correctly, but only "Back to latest" republished the newer buffered draft. Returning to the tail through "Newer records" resumed following while the previous draft stayed visible, so a finished look-back could show stale work as current until some later host event happened to replace it. Restore following through one helper both paths share, so the frozen draft is replaced whenever the tail is resumed. Qualify it in the packaged browser scenario: after a second live draft arrives while reading history, "Newer records" must publish it immediately, without a new subscription. Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. 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 HEADFor a same-repository clone whose Keep the DCO |
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…n-live-observation-20261016 Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
评审 6599@f44c02eaa1cd7ee2d995868cec9aa6fc160233c8,实际合并基线 b2aca67d76af45e554c620818a982a81f8d2d52b。结论 APPROVE;原评审指出的尾部恢复缺陷已在当前完整提案上重新验证。
动机
在 Goal 中跟进既有 Codex App Agent、需要判断尚未保存的消息和工具进展的本机负责人。
原页面只能等待保存记录;新增观察从同一原宿主读取未完成的可见工作。旧提案回看后经“较新记录”返回尾部仍停留草稿 A,当前头会立即显示已缓冲的 B,无需再点一次恢复。
真实打包页面已验证实时更新、回看冻结、两条返回路径、Agent 隔离、完成转入保存历史,以及断线后的保存记录保留和自动重连。
本 PR 不启动第二执行者,不授权原生输入或审批,不证明完整 token/event 对齐、Windows 传输、其他 provider、持续负载或已安装 App 采用。
完整 Slice B 的输入、审批、跨平台及安装采用仍沿原有验收继续;本次仅交付同一原宿主的有界只读观察。
已知目标、Agent 和原绑定都能从现有上下文取得;打开工作页即可观察,零新增准备或确认轮次。原生输入仍须实际用户意图,观察状态不会替人作执行决定。保持现状会继续隐藏未保存的进展;单靠保存记录轮询无法取得这些内容,而新建 app-server 会破坏原会话所有权。
改动思路
原生 IO 与版本化过滤留在既有 Codex provider,精确绑定复用原 owner;前端只组合临时可见记录,所有返回尾部的入口复用一个 resumeFollowing,不新增通用状态或第二执行者。
当前边界是可用的原宿主只读观察与正确恢复;保存历史、输入回执、Goal 验收仍各归原 owner,完整 Slice B 不在本次关闭。
这次整审覆盖全部 15 个路径、+1375/-55,并另看原 1db44f2 到当前头的修改;没有沿用旧结论。跟随同一 owner 的版本 11 快照/补丁,先过滤为紧凑当前 Turn,再经既有精确 Goal/Agent/binding 的本机 SSE 路由投影。保存历史继续负责耐久读取和长内容,输入及其不确定回执继续用原通道。
| 同一宿主已有更新 B,随后不再发事件 | 独立浏览器结果 |
|---|---|
旧 1db44f2:回看 → 较新记录到尾部 |
回看提示消失,仍是 A;独立断言失败 |
| 当前头:同一操作 | 立即显示缓冲 B,follow/unfollow 序列不变 |
| 当前头:回看 → 回到最新 | 立即显示缓冲 B |
表格来自真实打包资产、生产 HTTP 与隔离 Unix 对端,不以截图代替执行证据。现有帧解析被收敛到 DesktopClient.read_frame;局部活动 glyph 只表示原宿主当前可见工作,回看、完成、断线与切换都停止动态待遇。
具体改动
独立规范先于 diff 读取:docs/architecture/rfcs/desktop-execution-frontends-v0.md 与 docs/integrations/session-runtime-control-plane-adapter.md,均固定在 b2aca67d76af45e554c620818a982a81f8d2d52b,没有拿本 PR 新 checkpoint 为自己认证。条款映射:Common invariants 与 Safety and privacy 已实现本切片所需的原 owner、精确身份和只读边界;Experimental owner-local Codex App conversations 的有界阅读、回看及恢复路径在本次实际入口获证;Slice B: attached Codex App 的完整输入/interrupt/resume、跨平台及安装资格继续 deferred。
关键代码讲解
- DesktopClient.read_frame 共享长度先验及对象解码;普通 RPC 仍保留 8 MiB 限制,只有观察调用传入 64 MiB,超限在分配 body 前拒绝。
- LiveView.accept / packet 保留原线程、revision 与完整索引基线,只投影未完成的受支持可见项;隐藏 reasoning、用户输入、旧完成内容及配置,凭证检测复用既有 owner。32 行/256 KiB 投影和 64 KiB 字段仍明确拒绝或留下不可读缺口,不截成伪完整记录。
- observations 只向发现的原 owner 发送 following/unfollowing,校验 owner、thread、host 和协议版本;离开或失败均释放,不启动、恢复或重试原生输入。
- _codex_attached_live 在既有本机路由提供 SSE,输出前重验绑定,限两个并发读者。临时连接损失允许重连,协议/身份错误停止;新 route 注册在原 configuration router,没有新授权 owner。
- resumeFollowing 同时恢复 following、回看提示与最新投影,连接 reset、较新记录抵尾和显式返回。配套 record renderer 对 live 使用最新 prop 文本,对保存记录保留原续读状态;CSS 的活动标记包含形状和可访问标签,reduced-motion 不旋转。
其余三个 browser/Unix fixture 文件和 469 行测试扩展原通道的快照、补丁、过滤与释放;两张 PNG 都是合成数据。两份文档明确新观察的限制及旧通道不变,CLI/Lark 入口不变。新字段/状态属于 provider 局部 wire 投影及外部 Codex 输入,不新增 Kernel actor、Todo 生命周期或通用 capability;Python 归属是原生传输适配,未平行实现 TS 决策。
对主干的风险
最强风险是把旧投影当成当前、把观察当成执行,或在绑定撤销后继续泄露内容。本次独立浏览器在原缺陷头再次得到 ERR_ASSERTION:预期 B,实际 A;当前头同一真实边界显示 B,且没有重订阅或后续事件帮助修正。原 blocker 因而有当前证据支持解决;这不授予处理旧 review/thread 的权限。
源测试 base 25 项、head 47 项通过;两端正常 Chat 构建通过,当前 source bundle 核验、Ruff、仓库配置的 mypy 17 roots、advisory 后完整 semantic smoke 通过。原生 premerge 的 5 项直接检查及 17 项选择已执行,必需检查无失败、无 manual hold。保留一个 advisory 红灯:_run_dsh_operation_host 的 oversized-function debt;同命令在不可变 base 与当前头输出完全相同,相关 owner/检查器未变、magnitude regression 为 0,不将其写成“全部测试通过”。未查询、轮询或等待远端 CI。
额外真实 Unix/HTTP 验证发送 9,437,592 字节快照,得到一条 277 字节可见记录;第三读者明确不可用,两个已准入读者在改绑后停止。新登记而未绑定 Agent、额外 thread 参数及错误 binding 拒绝,恢复原绑定后可重新阅读;观察本身零原生输入、保存 rollout 不变。此证据支持独立观察通道,不支持无限大输入或持续成本保证。
真实打包 UI 的中英、1200px/390px、两条返回、切换/完成和网络故障恢复通过;390px 文档宽 390,reduced-motion 经实际 matchMedia 与 animation=none 读回。另在隔离宿主发送一次合成回复,刷新后输入数仍为 1、原历史保留、composer 可继续。目录元数据是公开合成 fixture;所有被评审的对话/观察/输入回执均走真实生产 API。最初私有 reader 的选择器、尚未完成的历史 reset 与跨轮媒体模拟未合格,未计为通过;最终固定已读窗口,在同一订阅上补验,无产品代码或断言放宽。pause-during-reset 的完整 race 不在本次新增资格中。
语义与 CI 对齐
逐一检查局部状态词和 producer/consumer、未绑定/空闲路径、启用后未覆盖主体与后注册主体。没有 substring denylist 或把机器强制条件改称 guidance。advisory 的零候选不覆盖 TSX/dynamic 字符串,另追踪了 native 状态及两类 SSE envelope。保留普通 RPC 限制,以实测独立观察通道承接大快照;64 MiB、字段/视图上限及私有协议版本仍是明确覆盖边界。该观察不改变 Goal 权限、scheduler 或 quota。
我的整体评价
APPROVE,justified_increment。 long_horizon=preserved:所有权、保存历史、一次输入和晚续读边界维持;多次更新、改绑拒绝、释放及重新连回都有真实读回。user_experience=improved:原页可以看到未保存工作,已重现的尾部恢复错误得到修复,瞬时观察故障保留已保存内容且自动恢复,没有新增人工准备轮次。
原生 IO 与版本化过滤留在既有 Codex provider,精确绑定复用原 owner;前端只组合临时可见记录,所有返回尾部的入口复用一个 resumeFollowing,不新增通用状态或第二执行者。
当前边界是可用的原宿主只读观察与正确恢复;保存历史、输入回执、Goal 验收仍各归原 owner,完整 Slice B 不在本次关闭。
本 PR 的 future-facing pass 已用一个返回 helper 消除三处恢复分支漂移,共享帧读取而保留异质通道限额;没有必要扩大为通用 session 框架。独立的完整宿主、平台、安装采用和长期收益仍未验证。旧公共 review 的讨论、未解决 thread、首屏授权与最终 merge readiness 各留其原门;本结论不执行 merge、dismiss、resolve 或升级。
English verdict: APPROVE - f44c02e; the original stale-tail defect reproduces at 1db44f2 and passes at this exact head through the real packaged UI/HTTP/Unix boundary. Provider, scope, large-frame, cleanup and local validation pass; unchanged maintainability advisory and broader host qualification remain separate.
Problem And Result
The attached Agent reader currently waits for saved host records, leaving unfinished messages and tool work invisible. This adds read-only observation from the same original Desktop owner to the existing Agent work page. Opening that page is sufficient; no extra setup or confirmation is added.
The current refinement puts a small activity ring beside the observed message or tool, removes the repeated live banner/tool prefix, and keeps reading calm. Looking back freezes insertion and motion; both return-to-latest paths publish the buffered current draft. Completion, disconnection and switching Agents stop the live treatment. Reduced motion retains a still glyph and accessible label.
Continues #6482 under Desktop execution-frontends RFC Slice B. Base:
main, integrated throughb2aca67d76af45e554c620818a982a81f8d2d52b. The integration preserves #6592/#6625 discovery recovery. This remains a bounded Codex provider stage, not full Slice B acceptance.Author Declaration And Boundary
Written by: model_agent — OpenAI Codex, GPT-6 family, submitted through
loopx-agent.Affected entries: the existing frontend Agent page and provider HTTP/SSE endpoint. CLI and Lark entrypoints do not change. No new capability, setting, executor, model call, benchmark execution or approval authority is introduced.
Full native event/token parity, busy input, approval callbacks, other providers, Windows transport, sustained-load qualification and installed-App adoption remain unqualified. Observed completion is not Goal acceptance.
Validation
Candidate:
f44c02eaa1cd7ee2d995868cec9aa6fc160233c8. Run state: finished for the listed local checks. Inputs: synthetic/public fixtures and retained authorized read-only host evidence.attached-host-follow-uppassed, including history/live update, pause, both return paths, switching, deduplication, completion and explicit input/recovery cases; activity and reduced-motion assertions included77a1081; only the inspected synthetic after-image was additionally updatedcqr_65b954adfe16b323811brecords pass and verifies valid; author qualification is separate from independent reviewThe source patch and installed App are distinct: this proposal does not update an already-running installation. Complete native-input or other-host acceptance is not inferred from a fixture.
Visual Evidence
First-screen refinement was previewed and approved before its commits. Source data below is synthetic.
Whole-viewport review: messages remain the focus; tool detail stays folded. The activity glyph replaces duplicated status prose, while input availability, source and failures remain visible. Frozen/idle content does not animate; color is accompanied by shape and accessible state text. The after-image intentionally shows the unavailable generic execution service in this isolated demo; its notice is not hidden. No opening navigation, Goal overview composition or primary CTA is redesigned.
No private transcripts, credentials, native traces, private screenshots, device paths or internal links are included. Original acceptance and unsupported/untested boundaries remain open.