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
Pi’s Codex requests include an item with type: "additional_tools" containing tool-definition metadata.
comparableHistory rejects this type, causing snapshot creation to fail with:
SNAPSHOT_UNAVAILABLE
(Error: multimodal or opaque content cannot be compared by text)
Reproduction:
Create a Pi/Codex session with text-only history.
Compress an older range.
Fork the session using pi-subagents.
Observe snapshot rejection during compression-state adoption.
Exact-history fallback can sometimes recover, so this does not fail every fork.
Expected: Tool-definition metadata should not prevent otherwise text-only history from being adopted.
Local fix tested: Accept additional_tools metadata in the comparability check, without removing or modifying the outgoing tool definitions. With both parent
and child restarted, snapshot adoption succeeded in synchronous and asynchronous pi-subagents forks.
2. Emergency summary streaming retry fails on the existing WebSocket
When the initial non-streaming summary request receives HTTP 400:
Stream must be set to true
bili retries with streaming but fails before receiving an event:
Use an isolated config with compress.modelContextLimit: 16000.
Leave compress.streamSummary unspecified.
Provide approximately 18.5K tokens of synthetic history, including an older compressible range.
Trigger preflight summarization against Codex.
The error-response path cleans request handlers and resets history but retains the upstream WebSocket.
Local fix tested: Add this.close("upstream-error") after cleanup/history reset in that path. The streaming retry then opens a new connection and succeeds.
Observed result: 18478 → 13120 estimated tokens, followed by a successful model response.
Setting compress.streamSummary: true also avoided the failure by using streaming from the outset.
Related issue
The inherited http://billion-context.inline attach problem appears covered by #5645 / #5655. The two issues above were reproduced separately and may need
additional fixes.
Activity
ranxianglei commentedon Nov 13, 2026
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)
查重:不重复。 Bug 1 是 #4266/#4900 同一
comparableHistory允许列表机制的新类型(additional_tools,非 thinking 家族);Bug 2 的 WebSocket 错误路径未关闭连接机制无既有 issue。进度(重启前已完成分析,定位到代码):
Bug 1 —
src/plugin.ts:1171comparableHistory允许列表缺少additional_tools,导致含该元数据的 Pi/Codex 历史被判为不可比较 →SNAPSHOT_UNAVAILABLE。修法:加入允许列表 + 提前返回 true(与tool_use/function_call同档,工具定义元数据是稳定文本,非多模态/不透明内容)。Bug 2 —
src/responses-ws.ts两条错误响应路径(bare error envelope ~L527、frame.type==="error"~L553)在clean()+resetHistory("upstream-error")后未关闭 WebSocket,导致 preflight 流式重试复用已死连接。修法:两处各加this.close("upstream-error")(close幂等,clean()后active已清,不会二次 fail)。正在实现修复 + 回归测试,完成后开 PR 并回帖。