Repository navigation
[Bug] 长会话中已完成的 Codex 响应被误判 context overflow,随后模型反复自述「预算极低」 #10061
Replies: 2 comments
|
Follow-up qualification on 2026-11-04: I should not carry the original window-mismatch conclusion forward as a confirmed defect in my current installation. Using the installed Desktop 0.2.1-rc.5 overflow/finish classifiers and the original reported usage (input 97 + cacheRead 577664 = 577761; nonempty completed response), an isolated replay returns CONTEXT_WINDOW_EXCEEDED with contextWindow=272000, but normal stop with contextWindow=872000. Installed dsh-codex-connect 0.2.0-alpha.9's contextWindowOverrides function returns an effective model with 872000. The inspected provider -> model registry -> adapter -> finish-classifier chain preserves this effective model. The original claim that the current classifier necessarily keeps using 272000 is therefore not established by the present code. This is function-level verification plus static wiring inspection, not a replay of the historical long session, a readback of the active Host's effective state, or confirmation that repeated compaction failures and the model's budget narration are resolved. There is also a version qualification: this local alpha.9 plugin does not declare rc.5 support; published alpha.11 does. I have not upgraded or restarted the installation during this verification. |
Uh oh!
There was an error while loading. Please reload this page.
摘要
在预发布桌面版 0.2.1-rc.2 +
openai-codex通道 + profile 自定义contextWindowOverrides.gpt-6.1-sol = 872000的组合下,超长会话中已完成的 Codex 响应会被误判为CONTEXT_WINDOW_EXCEEDED(与 #9230 同族)。由此引发重试/压缩失败循环;用户可见后果是模型在思考中反复自述并不存在的"预算"耗尽("Budget is extremely low (I'm near limit)" 等)。已确认这些字符串不存在于客户端/插件/配置中,是模型生成内容。环境
openai-codex/ modelgpt-6.1-sol(pi-aiopenai-codex-responses;内置目录contextWindow: 272000,maxTokens: 128000)。deepseek-account/ modeldeepseek-flash(reasoningEffort: max,maxTokens: 256000)。contextWindowOverrides.gpt-6.1-sol: 872000。现象与证据
会话 A(240 turns、28,856 条 session 事件、73 MB 日志、149 次
compaction/start、171 次llm/retry):assistant/attempt(turn 180 step 11)是一次已完成的 Codex 响应,usage 为inputTokens: 97、cacheReadTokens: 577,664、outputTokens: 29,177、totalTokens: 606,938,finish reason 却是CONTEXT_WINDOW_EXCEEDED,且 reasoning block 为空。按内置目录 272,000 判定超限,而客户端窗口被 override 到 872,000 —— 两侧窗口不一致,组合下必然误报。compaction/end带错误 20 次:14 次summary is not smaller than the shadowed content (… estimated framed tokens >= …);2 次pi-ai detected context overflow for model "gpt-6.1-sol";1 次terminated;3 次其他。TRANSPORT155、TIMEOUT24、PI_AI_ERROR13、QUOTA4、SERVER2、RATE_LIMIT1、CONTEXT_WINDOW_EXCEEDED1。Wow, it looks like I have around 29,000 tokens already, and my remaining budget is 82. Actually, the initial remaining is 110, so it's more like 70 now.(turn 129,gpt-6.1-sol)Budget is extremely low (I'm near limit). I must be very careful.(turn 230,deepseek-flash)会话 B(149 turns、20,018 条事件、47 次压缩):deepseek-flash reasoning 出现
I'm extremely low on tokens (~800 left)。客户端侧已排除:在 0.2.1-rc.2 的完整
app.asar、profile 插件与配置、以及所有会话日志的客户端文案中检索该英文句子均无命中;唯一来源是模型 reasoning。模型自述的 token 数字与实际请求参数(maxTokens: 256000)不符,属于模型侧编造,但触发点与上述失败循环高度相关。影响
超长会话在约第 180 轮后进入不可用状态:已完成的响应被丢弃 → 重试与压缩持续失败 → 上下文被污染/截断 → 用户看到模型反复声称"预算耗尽",会话继续烧 token 却难以推进。
建议排查方向
contextWindowOverrides生效时,是否应同步给 pi-ai 的 overflow 分类器?当前分类仍按内置目录窗口 272,000 判定(见 [Bug] Completed Codex responses are misclassified as context overflow above the catalog window (tested patch) #9230),与客户端 872,000 冲突。summary is not smaller than the shadowed content上连续失败时应有退避/降级策略(见 [compaction bug] Session becomes permanently unusable on context overflow: token underestimation, summarizer replay overflow, and no manual recovery path #9635)。其他
本报告不包含任何凭据、账号标识、私有对话正文或原始会话文件;仅引用事件计数、usage 数值与模型 reasoning 中的英文句子。
English
Summary
On the pre-release desktop build 0.2.1-rc.2, with the
openai-codexroute and a profile-levelcontextWindowOverrides.gpt-6.1-sol = 872000, already-completed Codex responses are misclassified asCONTEXT_WINDOW_EXCEEDEDin very long sessions (same family as #9230). The result is a retry/compaction failure loop; the user-visible symptom is that the model repeatedly narrates a nonexistent token budget ("Budget is extremely low (I'm near limit)"). Those strings do not exist in the client, plugins, or configuration; they are model-generated.Environment
openai-codex, modelgpt-6.1-sol(pi-aiopenai-codex-responses; installed catalogcontextWindow: 272000,maxTokens: 128000).deepseek-account, modeldeepseek-flash(reasoningEffort: max,maxTokens: 256000).contextWindowOverrides.gpt-6.1-sol: 872000.Observed behavior and evidence
Session A (240 turns, 28,856 session events, 73 MB log, 149
compaction/start, 171llm/retry):assistant/attempt, turn 180 step 11) reports usageinputTokens: 97,cacheReadTokens: 577,664,outputTokens: 29,177,totalTokens: 606,938, yet its finish reason isCONTEXT_WINDOW_EXCEEDED, and its reasoning block is empty. The installed catalog window is 272,000 while the client window is overridden to 872,000, so the two windows disagree and this combination misfires deterministically.compaction/endevents carry errors: 14summary is not smaller than the shadowed content (… estimated framed tokens >= …), 2pi-ai detected context overflow for model "gpt-6.1-sol", 1terminated, 3 other.TRANSPORT155,TIMEOUT24,PI_AI_ERROR13,QUOTA4,SERVER2,RATE_LIMIT1,CONTEXT_WINDOW_EXCEEDED1.Wow, it looks like I have around 29,000 tokens already, and my remaining budget is 82. Actually, the initial remaining is 110, so it's more like 70 now.(turn 129, gpt-6.1-sol)Budget is extremely low (I'm near limit). I must be very careful.(turn 230, deepseek-flash)Session B (149 turns, 20,018 events, 47 compactions): deepseek-flash reasoning contains
I'm extremely low on tokens (~800 left).Ruled out on the client side: searching the full 0.2.1-rc.2
app.asar, profile plugins and configuration, and the client-side text of all session logs finds no occurrence of these English sentences; their only source is the model reasoning. The reported token numbers contradict the actual request parameters (maxTokens: 256000) and are fabricated by the model, but they correlate strongly with the failure loop above.Impact
Very long sessions become unusable after roughly turn 180: completed responses are discarded, retries and compactions keep failing, the context is corrupted or truncated, and the user sees the model repeatedly claim budget exhaustion while the session keeps burning tokens without progress.
Suggested investigation
contextWindowOverridesapplies, should the pi-ai overflow classifier use the same window? Today it still classifies against the installed catalog window of 272,000 (see [Bug] Completed Codex responses are misclassified as context overflow above the catalog window (tested patch) #9230), which conflicts with the client-side 872,000.summary is not smaller than the shadowed content(see [compaction bug] Session becomes permanently unusable on context overflow: token underestimation, summarizer replay overflow, and no manual recovery path #9635).Disclosure
This report contains no credentials, account identifiers, private conversation text, or original session files; only event counts, usage numbers, and English sentences from model reasoning are quoted.
All reactions