You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
old@21838:You are an agent in a team of agents collaborating to complete a task.\n\nYou can spawn sub-agents to handle subtasks, and those sub-agents can spawn their own sub-agents. All agents in the team, including the agents that you can assign tasks
new@21838: change it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default and Plan.\n\n## request_user_input availability\n\nUse the request_user_input tool only when it is listed in the available tools fo
即 system 合并文本内协作模式(collaboration_mode)历史副本的正文被客户端轮间重写,分叉点落在 system 前段(偏移 21838/12 万余字节)。另两例同类毒源(均客户端注入、文本内改写):
turn_aborted 状态块:客户端把整块追加到 system 合并文本尾部,块出现/消失令 system 每中断/重启 +219~347B;探针基线实测 122300→122077(-223B 与块体逐字节吻合)。稳定层改为从头部摘除、挂到最后一条 user 前,之后基线跨重启逐字节恒定(122077 == 122077)。
附件轮样板:客户端在附件轮把历史 user 消息的样板头(# Files mentioned by the user: → ## My request: 锚区)重写并累积(新增 Image attachment: true 等行),稳定层归一为常量替身后附件轮前缀恢复纯追加。
Activity
GGGBB commentedon Oct 10, 2026
PR 已提交:#2449 (head 为 GGGBB:codex/prompt-prefix-stabilizer @ 92dc3be,基于 #2425 的修复提交开发,PR 正文首段已注明依赖)。长会话端到端验证结果我会持续补在本 issue。
BigPizzaV3 commentedon Oct 11, 2026
这条性能分析很完整,但需要把 Codex 上游每轮变化与 Codex++ 注入变化分开。请保留同一模型、同一会话,分别记录直连与经 relay 的首个分叉位置,并提供历史早段实际文本的脱敏 diff;同时说明
<image_resize_notice>是否只在图片轮出现。若确认是可选注入块每轮改写,我们会按 opt-in 稳定前缀与缓存回归列入修复。GGGBB commentedon Oct 11, 2026
按三问分别给排除性证据。先给结论:逐轮变化发生在 codex 客户端产出的请求体上,与是否经过 Codex++ 无关;Codex++ 的开关(
stabilizePromptPrefix)只负责把这种轮变在前缀上中和,关闭时转发逐字节透传。1. 「上游 Codex 每轮变化」与「Codex++ 注入变化」的分离
tests/protocol_proxy.rs:关闭时 notice 原样保留、原位输出,off_raw快照断言);开启路径也只允许两类变换(成对 notice 剥离、system 块规范序重排),块名之外的字节不动(幂等测试:输出回灌二次变换逐字节相等)。2. 历史早段实际文本的脱敏 diff(探针事件原文,2026-10-11)
protocol_proxy.prefix_stabilizer_prefix_divergence:{oldLen:120370, newLen:122077, firstDiff:21838}You are an agent in a team of agents collaborating to complete a task.\n\nYou can spawn sub-agents to handle subtasks, and those sub-agents can spawn their own sub-agents. All agents in the team, including the agents that you can assign taskschange it; user requests or tool descriptions do not change mode by themselves. Known mode names are Default and Plan.\n\n## request_user_input availability\n\nUse the request_user_input tool only when it is listed in the available tools fo即 system 合并文本内协作模式(collaboration_mode)历史副本的正文被客户端轮间重写,分叉点落在 system 前段(偏移 21838/12 万余字节)。另两例同类毒源(均客户端注入、文本内改写):
turn_aborted状态块:客户端把整块追加到 system 合并文本尾部,块出现/消失令 system 每中断/重启 +219~347B;探针基线实测 122300→122077(-223B 与块体逐字节吻合)。稳定层改为从头部摘除、挂到最后一条 user 前,之后基线跨重启逐字节恒定(122077 == 122077)。# Files mentioned by the user:→## My request:锚区)重写并累积(新增Image attachment: true等行),稳定层归一为常量替身后附件轮前缀恢复纯追加。3.
<image_resize_notice>是否只在图片轮出现不是。它只在图片处理轮首次注入,但此后每轮会以三种形态存在于历史早段:(a) 整条消息被块消耗;(b) 与有效文本夹心共存(assistant 带 tool_calls 的骨架轮最常见);(c) 非成对残留(只留半截标签的碎片,最危险——任何单字节残留都让 token 前缀在历史最前端分叉)。首图之后所有轮(含纯文本轮)都带着残留,这就是 issue 里 ~30060/31508 确定性分叉长期存在的原因;
966a37a把非成对残留改为三态归零后该分叉消失。修复后同机实测(同模型同 mlx-serve,开关开启)
prefix_stabilizer_prefix_baseline/divergence作为常驻诊断随开关上线:任何新的 system+tools 前缀字节突变自动 dump 分叉点新旧 ±240B,后续毒源定位不再需要人工蹲守。如符合「可选注入块每轮改写」的定案条件,望按贵方计划列入 opt-in 稳定前缀与缓存回归。任何一条需要更原始的字节级材料(探针落盘全文、逐轮 POST 头行序列)我随时补。
feat(core): 新增 opt-in「prompt 前缀稳定层」,根治逐轮注入块重写导致的深缓存前缀分叉
feat(core): 新增 opt-in「prompt 前缀稳定层」,根治逐轮注入块重写导致的深缓存前缀分叉
feat(core): 新增 opt-in「prompt 前缀稳定层」,根治逐轮注入块重写导致的深缓存前缀分叉