Repository navigation
Avoid duplicating the planning prompt in guided start - #8660
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>
…ided-start-output-budget 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 · gpt-6.1-sol · OpenAI · runtime_reported · max
本次评审对应提交 88abfaacbca8e8af0abeec0e13945cc10ea2966d。
无阻塞发现。
动机 / Motivation
使用 guided start 阅读规划并决定下一步的 Agent。Agent 打开一份目标启动计划,默认 JSON 在建议、步骤和命令包重复同一段规划提示;作者记录的原生 Windows 公开用例达到 40,386 字符,越过 40,000 上限。候选在同一份响应内引用原提示。独立配对的 30 个真实 CLI 样本各减少 3,606 字节;解引用后,完整规划、动作、顺序和安全字段相同。本地标准预算矩阵通过;本轮未在原生 Windows 运行当前提交,也未查询托管 CI。
改动思路 / Approach
复用原规划提示和原投影,省掉重复文本。CLI 默认 JSON;无需另跑命令。保留完整规划步骤、显式 detail 和 Markdown,原生 Windows 门禁另行验证。 只在非空字符串完全相同且未请求 detail 时,复制推荐对象并改为同一响应内的字段引用。
具体改动 / Changes
关键代码讲解
build_start_goal_guided_packet 只替换完全相同的非空文本。 Markdown renderer 仍按原步骤渲染;Pi widget 只读 kind/summary。 以改动前协议为准:同包提示可达、行动等价、显式 detail 保留原文。 配对覆盖五个 host、三种工作量与两种路径;六组显式 detail 和 Markdown 等价,缺 host 时读回 fixture 未变。核对项:compact_same_host_action(同一规划及动作)、explicit_full_and_markdown(显式全文与显示)、same_ceiling(原预算)。 附带的 #8657 提交只对原 F811 加定向 noqa,同一回归实际执行通过。
对主干的风险 / Risks
既有 JSON 集成若直接只读旧的内联字段,会需要解析文档中的同包指针或选择显式 detail。 标准公开矩阵通过;额外刻意加长的路径仍可能超过 40,000 字符。这不扩大原预算保证。
语义与 CI 对齐
标准差分为 98/98,唯一三个形状提示均为有意替换的旧路径。原 fixture 和 40,000 限额没有变。全 workflow Ruff、规划及差分回归、定向 Lark 测试和标准预合并通过。本地标准预算矩阵通过;本轮未在原生 Windows 运行当前提交,也未查询托管 CI。
我的整体评价 / Verdict
批准。相同规划与执行边界从同一响应可读,省去重复字节。原生 Windows 验证仍独立于代码评审。本轮检查实际 CLI JSON 和 Markdown,未改可视界面。本地标准预算矩阵通过;本轮未在原生 Windows 运行当前提交,也未查询托管 CI。
English verdict: APPROVE. The compact response removes only the duplicate prompt; the same complete plan, ordered actions, and explicit detail remain available. Native Windows verification is separate.
|
External contributor analysis (not maintainer-produced), 2026-11-13. PR #8660 has since addressed the overage; the platform mechanism may still be useful context. TL;DR: The Isolation measurements (2026-11-13, local Windows machine)
The +671 delta is fully accounted for by three new Platform size differenceThe output embeds 19 absolute filesystem paths (~1,353 chars on our machine; full path lengths 66–123 chars). Windows absolute paths are longer than their Linux counterparts, and JSON backslash escaping adds further overhead. On serialized JSON text we measure ~597 chars of combined platform overhead on our machine (the path-length and escaping components partially overlap; the figure avoids double counting).
The CI-vs-local difference (40,386 vs 40,424 = 38) matches Context
Isolation numbers are reproducible from the cited SHAs; the Linux figure is a path-substitution simulation, not a native run. |
Goal and delivered outcome
start-goal --guidedrepeats the same planning prompt in the recommendation, the ordered planning step, and the command pack. On native Windows the existing public fixture fails at 40,386 characters against the unchanged 40,000 limit.The default recommendation now points to the existing complete prompt in the same response. The ordered step and the explicit
--include-command-pack-detailpath retain their inline text. A different recommendation is kept inline. There is no extra read, new execution authority, or change to the Markdown output.Base:
main. This branch also includes the unchanged test-only commit from #8657 so the required lint job can reach the Windows check on current main. The guided-start change is a separate commit; this PR does not change #8657.Author declaration
docs/reference/protocols/codex-app-host-command-registry-v0.mdatce69003c73378fdb067a6b86e7b60feb50cb1b77.Validation
d1a6c5b906803f3f0a2601882c717bf0a6af4fe1; combined branch head:88abfaacbca8e8af0abeec0e13945cc10ea2966d. Inputs: synthetic public fixtures.UI impact: none. DCO sign-offs present; no paired RFC files changed.