[GH-ISSUE #4981] [GUI] Goal 自治长程任务:goal 回合不挂 TurnGuard、卡片不说真原因、导出不含工具调用(0.2.11 实测 Turn5 跑了 5 小时 23 分、26 次调用失败,16/17 目标真实存在) #2294

Open
opened 2026-11-04 01:58:14 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @xvcezrqpbxtpzblrt on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4981

@Niko1221 — flagging this for your triage. Updated 2026-11-06 against v0.2.11 (main @ 9f7d977d2). Everything below is re-verified; the original text is kept verbatim underneath.

中文速览:最新版 v0.2.11 实测,goal 下连续 5 小时 23 分、10 次失败且无任何刹车,是我自己掐断的;错误卡片标题不说真原因;导出的日志里没有任何工具调用。我认 IQ3_XXS 长上下文是模型侧问题,下面只要 app 侧的五件,您按您的优先级排就行。

English

TL;DR: v0.2.11 (which fixed #5079) did not touch the goal-turn gaps below. Verified on this machine (v0.2.11, Windows, RTX 3080 Ti Laptop, 64 GB) and against main @ 9f7d977d2:

  • Goal turns still construct no TurnGuard: apps/host/server/agent/agent-bridge.mjs:459 — if (!goal) guard = new TurnGuard({...}) (unchanged); the pre-send fit check is skipped for goal turns too (:441).
  • plainToolError (apps/host/server/agent/events.mjs:144-155) still returns no sentence for FS_EDIT_NOT_FOUND ("old_string was not found in …") / FS_NOT_FOUND; failed edits surface as a generic card title ("Couldn't change the file" / 无法修改文件, s2627) with the raw English error only in Details.
  • Export ("下载会话日志") still serializes the browser-side store snapshot without flushing the server session; no tool/call / tool/result, no error code, and repeated clicks produce a byte-identical file.
  • dsh-repeat-tool-reminder still counts only identical consecutive calls (arguments canonicalised by deep key-sort), thresholds [3,5,8], reminder only, no hard stop — self-incrementing file names never reach threshold 3.
  • Compaction still shows a one-line status: no calibrated pressure %, no elapsed time; the end-of-compaction line uses this.contextTokens, not pressureNow(), so it can disagree with the correction point.

Reproduction status: the 2026-11-06 run and the error table below were observed on this machine; the two "source" lines above are static analysis of main @ 9f7d977d2 and the 0.2.11 install, not runtime observation.

2026-11-06 run (v0.2.11), goal created 04:29 ("我睡觉去了,你把这个软件做到0错误", maxGoalRounds=256), goal round 4 (turn 5) ran 5 h 23 min and accumulated 10 tool failures spread across the turn; nothing paused it — the user aborted the turn at 11:39 (goal then paused, roundsStarted=4). Full session across all turns: 26 tool/result errors — FS_EDIT_NOT_FOUND 9, INVALID_ARGS 7, FS_NOT_OBSERVED 5, FS_STALE_VERSION 2, FS_NOT_FOUND 1, uncoded 2. 16 of 17 failing targets exist on disk — this run is anchor/argument failure, not fabricated paths.

What I ask for, in priority order:

  1. plainToolError: add one sentence for FS_EDIT_NOT_FOUND (and ideally FS_NOT_OBSERVED), e.g. "The file was not changed: the text to replace is not in it." One-line-class change; the original English stays behind Details, as with the other sentences. (Focused fix.)
  2. Export: flush and re-pull the server session before serializing, and include tool/call / tool/result with the error code. As it stands the export cannot show a steering failure like the one above. (Focused fix.)
  3. Compaction card: show progress % and elapsed time; use the calibrated pressure for the banner percent. (Small GUI change.)
  4. Proposal, needs your scope agreement (per CONTRIBUTING): count consecutive read/edit failures (at least FS_NOT_FOUND / FS_EDIT_NOT_FOUND) in goal turns and pause-and-ask at a threshold; and let repeat-tool-reminder count by failure class with an optional hard stop at the highest tier. No change to any default proposed.

I have no new evidence on the model side and am not asking to touch quants, defaults, or the compaction strategy itself. If the call on the above is "wontfix / model-side", please label it as such — a legitimate answer, and it unblocks users from waiting.

I can retest on this machine once any of these land, and I can open a focused PR for item 1 if you want it (one problem per PR).

中文速览收尾:1–3 是小而聚焦的修复,4 需要你先同意范围。如果方便,按您的优先级排即可;不修的话打个标签也行。


Goal 自治长程任务:4 次自动压缩(每次 7–8 分钟只有一行状态);goal 回合跳过全部 TurnGuard;13:46:54 最后一次落盘后,8 分钟内 131 次编造路径调用永久丢失,导出 3 次逐字节相同

English TL;DR: In a 10 h 13 min goal run (v0.2.9, Swift-Qwen3.8-Flash-Next IQ3_XXS, yarn×2, kv int8, archive contextWindow 393,216), auto-compaction fired 4 times (426–471 s each; the UI shows only a one-line status "Summarising…", no progress/elapsed). Goal turns construct no TurnGuard at all (agent-bridge.mjs:434), and the harness repeat-guard (dsh-repeat-tool-reminder, thresholds [3,5,8]) only counts byte-identical consecutive calls, so the self-incrementing storm file names never trigger it. After the last checkpoint flush at 13:46:54, a 13:47–13:54 storm of 115 edit + 16 read calls to non-existent paths ran in a third goal turn that was never persisted (session.v4.jsonl.zstd ends 13:46:54: 4,744 events, 784 tool calls, 45 errors). "下载会话日志" serializes the browser-side store snapshot whose updatedAt equals the last checkpoint, so 3 downloads at 13:47/13:48/13:49 produced byte-identical 3,847,621-byte JSON with no tool calls in it.

环境

  • 桌面应用 v0.2.9(2026-10-31),引擎 0.1.55-windows-x86_64-cuda-cuda13,agent 组件 @deepseek-ai/dsh 0.2.1-alpha.3(安装器随带,harness/BUNDLE.json)
  • 模型:Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS(3.25 bpw),--max-context 524288 --rope-scaling yarn --rope-scale 2 --kv int8 --expert-cache auto --spec 4
  • 硬件:RTX 3080 Ti Laptop(16 GB VRAM),64 GB RAM,Windows
  • 会话:UI 会话 s_bjhkc51wxy75 = 存档 session-bb49d9a5-6f31-4d2f-ac1d-e01a4f72087e(路径 ~/.strata/data/agent/home/sessions/…,4,744 行事件,时间戳为本机 UTC+8)
  • 场景:睡前下达 goal(goal-24e8507c…,create 11-02 03:36:38),沙箱 danger-full-access,approval ask→never

存档实测(session.v4.jsonl.zstd 逐行解析,4,744 条全部解码)

  • 两个 goal 回合:turn1 turn/start 03:33:37 → turn/end 11:14:58;turn2 紧随 13 ms 重启 11:14:58 → turn/end 13:46:54。合计 10 小时 13 分。文件最后一行 workspace/changes 13:46:54,之后 0 条事件;13:46:54 同刻记录了 goal pause。
  • 784 次 tool/call / 803 次 tool/result:pwsh 290、edit 152、read 149、grep 70、job_output 48、write 44、web_fetch 11、job_kill 11、其余 15。Σ usage:input 157,434,735 / output 681,569。
  • 45 次工具结果 isError,按引擎错误码:FS_EDIT_NOT_FOUND 26、FS_STALE_VERSION 5、INVALID_ARGS 4、WEB_PROVIDER_ERROR 4、FS_AMBIGUOUS_EDIT 2、FS_NOT_FOUND 1、FS_NOT_OBSERVED 1、spawn/wait 2。
  • 26 次锚点失败的目标全部是真实存在的项目文件:src/core/layout.cpp ×10、tests/test_image_geometry.cpp ×10、AGENTS.md ×5、src/core/image_jpeg.cpp ×4。
  • 4 次自动压缩(compaction/start→summary,全部落盘):05:39:52→05:46:59(426.4 s,摘要 14,870 字符);07:28:44→07:36:34(470.6 s,21,406);09:19:12→09:27:03(470.4 s,19,233);12:52:10→12:59:47(457.3 s,17,959)。另有 20 条 compaction/prune。压缩横幅文案(zh.json s9007)实测为 “80% / 80% / 80% / 81%”,即截图尾部“连续 3 条 80% 横幅”来自第 2/3/4 次压缩。
  • 最后一次压缩摘要后(13:01–13:41)落盘的调用仅 19 次(pwsh 8、edit 4、job_output 4、read 2、job_kill 1);13:46:54 之后为 0 —— 见“尾部风暴”。

对代码的核对(静态分析,按 CONTRIBUTING 规则标注)

  1. goal 回合没有 TurnGuard:agent-bridge.mjs:434 明确 if (!goal) guard = new TurnGuard(...);:487 对 turn.goalRun 跳过 guard.silent;:416 goal 跳过发送前 fit 检查。因此搜索失败上限、计划重写上限、93% 上下文停机、空回答提示在 goal 长跑中全部不生效。且 TurnGuard 只统计 web_search(turn-guard.mjs:27),edit/read 失败没有任何计数器。
  2. 重复调用守卫按“逐字节相同参数”计数:dsh-repeat-tool-reminder(dsh-base/cordis.patch.yml 启用,thresholds [3,5,8])对连续完全相同的调用注入提示(仅提示,不停机)。风暴里每次调用都在给文件名 +1(clone_fix2→13、fix_clone2→5),链计数每次都回到 1,115 次调用 0 提示——守卫设计上抓不到这种“自我扩号”循环。
  3. goal 轮数上限默认 256(dsh-goal defaultMaxGoalRounds=256,轮尽则 block: round-limit):本次仅用 2 轮,10 小时的连跑完全在上限内,护栏不触发。
  4. UI 卡片文案掩盖真实原因:edit 引擎错误来自 dsh-fs-local/lib/index.js:703-704(old_string was not found … / old_string matched N times)。卡片标题走 zh.json s2627 “无法修改文件” / s1905 “无法打开此文件”;events.mjs plainToolError(143) 对这两个码没有映射,原因只在折叠的 Details 里以英文原文出现。13:47–13:51 截图里 80+ 张 “无法打开文件/无法修改文件 · 失败” 卡片,标题全部指向“打开/修改失败”,用户据此往磁盘/权限方向排查——而真实原因是目标文件不存在。
  5. 落盘语义 = 请求边界 flush:dsh-session-checkpoint-policy 在每次模型请求前/工具派发前 flush。13:46:54 的 flush 即 turn2 的收尾;turn3(13:47–13:54 风暴)的所有事件(≈131 次调用、13:46 用户消息、第 4 次压缩的迟到横幅、13:49 “上下文已压缩”提示)在进程结束(≈13:54:58,UI 侧)时从未追加——存档永久止于 13:46:54。
  6. 导出是纯前端快照:apps/host/src/lib/session-log.ts 的 downloadSessionLog 直接序列化浏览器侧 store 里的 session 对象(schema: 'strata.session-log/1'),不触发服务端 flush/重新拉取;快照的 updatedAt 恰为最后一次 checkpoint(13:46:54),于是 13:47/13:48/13:49 三次点击得到 3 个逐字节相同的 3,847,621 字节文件(blob 下载静默进 Downloads,文件名取标题前 80 字符,重名后缀由浏览器添加)。store 快照按 checkpoint 刷新,故风暴中的调用/失败原因在导出里完全不可见。
  7. 80% 触发线:dsh-compaction-basic thresholdRatio 默认 0.8;profile.mjs compactionHeadroom 把 headroom 覆盖为 (window−outputBudget)×0.125。代入存档窗口:threshold = min(393216×0.8, 393216−32768−45056) = 314,572 = 恰好 80.0%,与横幅百分数一致。
  8. 底栏计数与横幅百分数不同源:底栏 “133.5K tokens · 1.4X context”(34% of 393K)显示的是 surface 计量,而压缩与横幅用的是 context-budget.mjs 校准后的 pressure(~314K)。同一窗口两个数字,用户看到的是“34% 时弹出 80% 横幅”。

尾部风暴(13:47–13:51,UI 卡片 + 引擎运行日志,未持久化)

13:46 用户插入 “这个模型是 iq3_xxs…我开始怀疑它是否有修改文件的能力…”(存档最后一条 user/message 是 13:37:47——这条消息本身也随 turn3 丢失)。随后 4 分钟内引擎日志出现 115 次 “writing a tool call: edit” 与 16 次 “read”(单次参数 47–149 token、2–4 秒,典型盲发),对应 UI 80+ 张失败卡片。涉及路径逐一核验为项目中不存在:clone.js(.log)、pdf_clone.py(.bak)/pdf_clone2.py、merge_pdf_to_html.py、pdf_clone_merged2.html、fix_clone.py…fix_clone5.py、clone_fix1.py…clone_fix13.py(项目为 C++/Qt:src/core、tests、临时目录)。这些路径在已持久化的 784 次调用中出现 0 次——编造始于最后一次压缩之后。

根因链:IQ3_XXS(3.25bpw)+yarn×2+int8 KV 在 >300K pressure 长上下文下保真度崩塌;有损压缩剥掉逐字文件内容 → 模型凭记忆生成锚点(26 次 FS_EDIT_NOT_FOUND 已落盘为证)→ 转为在编造路径上盲发调用(131 次,未落盘)→ 失败叙述膨胀上下文 → 循环。goal 回合不挂 TurnGuard + 重复守卫抓不到变参循环 → 无人刹车。

对 issue 第一版的更正(本版已按源码与存档逐条重验)

  • “10 小时 21 分、5 次压缩、19 条 prune” → 10 小时 13 分(2 个 goal 回合)、4 次压缩(426–471 s)、20 条 prune;原第 5 行 “30.1 s/1.8 KB” 是 UI 里写 压缩说明.log 的文件卡片,不是压缩。
  • “app 无失败熔断” → 表述过强:TurnGuard 与 repeat-reminder 都存在,问题是 (a) goal 回合整体跳过 TurnGuard,(b) 重复守卫按逐字节相同参数计数抓不到扩号循环,(c) 没有任何计数器统计 edit/read 失败——是覆盖面缺口,不是不存在。
  • “压缩期间无任何进度提示” → 存在一行状态 “正在总结较早的消息…”(s9005);缺的是百分比/耗时/进度,且截图时段可见的是转圈动画。
  • “文件内含 turn/end 13:54:58” → 存档最后一条 turn/end 是 13:46:54;13:54:58 是 UI 侧收尾时刻,turn3 的结束从未写入。

建议

  1. goal 回合也挂 TurnGuard(至少 93% 上下文停机与空回答提示),并在 TurnGuard 增加“连续 N 次 read/edit 失败(尤其 FS_NOT_FOUND/FS_EDIT_NOT_FOUND)”计数,达阈值暂停 goal 询问用户。
  2. repeat-tool-reminder 按目标(同一路径前缀/同一失败类)计数,并在最高阈值处支持硬停而非纯提示。
  3. 压缩过程显示校准后的 pressure 百分比与耗时计时;底栏 meter 与压缩横幅同源(校准后的 pressure);摘要生成考虑异步/更短目标长度。
  4. 导出会话日志前先 flush 并重新拉取服务端会话;导出内容包含 tool/call 与 tool/result(含 isError 错误码与原因),并提供保存对话框。
  5. plainToolError 补映射:FS_EDIT_NOT_FOUND → “文件存在,但你给的这段文字在文件里找不到(锚点失效)”;FS_NOT_FOUND → “文件不存在”——直接出现在卡片标题,且翻译。当前标题 “无法修改文件/无法打开此文件” 把用户引向不存在的磁盘/权限问题。

截图说明

  • 图 1:13:46 用户消息(绿框)+ “exploring clone.js” 卡片内 80+ 条 “查看文件内容/无法打开文件/无法修改文件 · 失败” 列表。
  • 图 2:尾部 “为腾出空间,较早的消息已被总结。聊天之前已用 80%。” ×2 与 “Ran 15/17 commands” 卡片(Ran 卡片即导出里仅存的统计壳)。
  • 图 3:第 3 条 80% 横幅 + “Ran 19” + “压缩说明.log 1.8KB 30.14s”(写文件卡片,非压缩)+ 13:49 “上下文已压缩” 提示;底栏 “466 消息 · 133.5K tokens · 1.4X context · GPU 13.2/13.6”。
    (GitHub 附件上传需仓库写权限,非合作者无法随 issue 上传;原图可在本 issue 下回复索取。)
Originally created by @xvcezrqpbxtpzblrt on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4981 **@Niko1221** — flagging this for your triage. Updated 2026-11-06 against v0.2.11 (main @ `9f7d977d2`). Everything below is re-verified; the original text is kept verbatim underneath. **中文速览**:最新版 v0.2.11 实测,goal 下连续 5 小时 23 分、10 次失败且无任何刹车,是我自己掐断的;错误卡片标题不说真原因;导出的日志里没有任何工具调用。我认 IQ3_XXS 长上下文是模型侧问题,下面只要 app 侧的五件,您按您的优先级排就行。 **English** TL;DR: v0.2.11 (which fixed #5079) did not touch the goal-turn gaps below. Verified on this machine (v0.2.11, Windows, RTX 3080 Ti Laptop, 64 GB) and against `main @ 9f7d977d2`: - Goal turns still construct no TurnGuard: `apps/host/server/agent/agent-bridge.mjs:459` — `if (!goal) guard = new TurnGuard({...})` (unchanged); the pre-send fit check is skipped for goal turns too (`:441`). - `plainToolError` (`apps/host/server/agent/events.mjs:144-155`) still returns no sentence for `FS_EDIT_NOT_FOUND` ("old_string was not found in …") / `FS_NOT_FOUND`; failed edits surface as a generic card title ("Couldn't change the file" / 无法修改文件, s2627) with the raw English error only in Details. - Export ("下载会话日志") still serializes the browser-side store snapshot without flushing the server session; no `tool/call` / `tool/result`, no error code, and repeated clicks produce a byte-identical file. - `dsh-repeat-tool-reminder` still counts only identical consecutive calls (arguments canonicalised by deep key-sort), thresholds [3,5,8], reminder only, no hard stop — self-incrementing file names never reach threshold 3. - Compaction still shows a one-line status: no calibrated pressure %, no elapsed time; the end-of-compaction line uses `this.contextTokens`, not `pressureNow()`, so it can disagree with the correction point. **Reproduction status**: the 2026-11-06 run and the error table below were observed on this machine; the two "source" lines above are static analysis of `main @ 9f7d977d2` and the 0.2.11 install, not runtime observation. 2026-11-06 run (v0.2.11), goal created 04:29 ("我睡觉去了,你把这个软件做到0错误", maxGoalRounds=256), goal round 4 (turn 5) ran **5 h 23 min** and accumulated 10 tool failures spread across the turn; nothing paused it — the user aborted the turn at 11:39 (goal then paused, roundsStarted=4). Full session across all turns: 26 tool/result errors — FS_EDIT_NOT_FOUND 9, INVALID_ARGS 7, FS_NOT_OBSERVED 5, FS_STALE_VERSION 2, FS_NOT_FOUND 1, uncoded 2. 16 of 17 failing targets exist on disk — this run is anchor/argument failure, not fabricated paths. **What I ask for, in priority order:** 1. `plainToolError`: add one sentence for `FS_EDIT_NOT_FOUND` (and ideally `FS_NOT_OBSERVED`), e.g. "The file was not changed: the text to replace is not in it." One-line-class change; the original English stays behind Details, as with the other sentences. (Focused fix.) 2. Export: flush and re-pull the server session before serializing, and include `tool/call` / `tool/result` with the error code. As it stands the export cannot show a steering failure like the one above. (Focused fix.) 3. Compaction card: show progress % and elapsed time; use the calibrated pressure for the banner percent. (Small GUI change.) 4. Proposal, needs your scope agreement (per CONTRIBUTING): count consecutive read/edit failures (at least `FS_NOT_FOUND` / `FS_EDIT_NOT_FOUND`) in goal turns and pause-and-ask at a threshold; and let repeat-tool-reminder count by failure class with an optional hard stop at the highest tier. No change to any default proposed. I have no new evidence on the model side and am not asking to touch quants, defaults, or the compaction strategy itself. If the call on the above is "wontfix / model-side", please label it as such — a legitimate answer, and it unblocks users from waiting. I can retest on this machine once any of these land, and I can open a focused PR for item 1 if you want it (one problem per PR). 中文速览收尾:1–3 是小而聚焦的修复,4 需要你先同意范围。如果方便,按您的优先级排即可;不修的话打个标签也行。 --- # Goal 自治长程任务:4 次自动压缩(每次 7–8 分钟只有一行状态);goal 回合跳过全部 TurnGuard;13:46:54 最后一次落盘后,8 分钟内 131 次编造路径调用永久丢失,导出 3 次逐字节相同 **English TL;DR**: In a 10 h 13 min goal run (v0.2.9, Swift-Qwen3.8-Flash-Next IQ3_XXS, yarn×2, kv int8, archive contextWindow 393,216), auto-compaction fired **4** times (426–471 s each; the UI shows only a one-line status "Summarising…", no progress/elapsed). Goal turns construct **no TurnGuard at all** (`agent-bridge.mjs:434`), and the harness repeat-guard (`dsh-repeat-tool-reminder`, thresholds [3,5,8]) only counts *byte-identical* consecutive calls, so the self-incrementing storm file names never trigger it. After the last checkpoint flush at 13:46:54, a 13:47–13:54 storm of 115 `edit` + 16 `read` calls to **non-existent paths** ran in a third goal turn that was never persisted (`session.v4.jsonl.zstd` ends 13:46:54: 4,744 events, 784 tool calls, 45 errors). "下载会话日志" serializes the browser-side store snapshot whose `updatedAt` equals the last checkpoint, so 3 downloads at 13:47/13:48/13:49 produced byte-identical 3,847,621-byte JSON with no tool calls in it. ## 环境 - 桌面应用 v0.2.9(2026-10-31),引擎 `0.1.55-windows-x86_64-cuda-cuda13`,agent 组件 `@deepseek-ai/dsh 0.2.1-alpha.3`(安装器随带,`harness/BUNDLE.json`) - 模型:`Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS`(3.25 bpw),`--max-context 524288 --rope-scaling yarn --rope-scale 2 --kv int8 --expert-cache auto --spec 4` - 硬件:RTX 3080 Ti Laptop(16 GB VRAM),64 GB RAM,Windows - 会话:UI 会话 `s_bjhkc51wxy75` = 存档 `session-bb49d9a5-6f31-4d2f-ac1d-e01a4f72087e`(路径 `~/.strata/data/agent/home/sessions/…`,4,744 行事件,时间戳为本机 UTC+8) - 场景:睡前下达 goal(`goal-24e8507c…`,create 11-02 03:36:38),沙箱 danger-full-access,approval ask→never ## 存档实测(session.v4.jsonl.zstd 逐行解析,4,744 条全部解码) - 两个 goal 回合:turn1 `turn/start 03:33:37 → turn/end 11:14:58`;turn2 紧随 13 ms 重启 `11:14:58 → turn/end 13:46:54`。合计 10 小时 13 分。文件最后一行 `workspace/changes 13:46:54`,之后 0 条事件;13:46:54 同刻记录了 goal `pause`。 - 784 次 tool/call / 803 次 tool/result:pwsh 290、edit 152、read 149、grep 70、job_output 48、write 44、web_fetch 11、job_kill 11、其余 15。Σ usage:**input 157,434,735 / output 681,569**。 - 45 次工具结果 isError,按引擎错误码:**FS_EDIT_NOT_FOUND 26**、FS_STALE_VERSION 5、INVALID_ARGS 4、WEB_PROVIDER_ERROR 4、**FS_AMBIGUOUS_EDIT 2**、FS_NOT_FOUND 1、FS_NOT_OBSERVED 1、spawn/wait 2。 - 26 次锚点失败的目标全部是真实存在的项目文件:`src/core/layout.cpp` ×10、`tests/test_image_geometry.cpp` ×10、`AGENTS.md` ×5、`src/core/image_jpeg.cpp` ×4。 - 4 次自动压缩(`compaction/start→summary`,全部落盘):05:39:52→05:46:59(426.4 s,摘要 14,870 字符);07:28:44→07:36:34(470.6 s,21,406);09:19:12→09:27:03(470.4 s,19,233);12:52:10→12:59:47(457.3 s,17,959)。另有 **20 条 compaction/prune**。压缩横幅文案(zh.json s9007)实测为 “80% / 80% / 80% / 81%”,即截图尾部“连续 3 条 80% 横幅”来自第 2/3/4 次压缩。 - 最后一次压缩摘要后(13:01–13:41)落盘的调用仅 19 次(pwsh 8、edit 4、job_output 4、read 2、job_kill 1);13:46:54 之后为 0 —— 见“尾部风暴”。 ## 对代码的核对(静态分析,按 CONTRIBUTING 规则标注) 1. **goal 回合没有 TurnGuard**:`agent-bridge.mjs:434` 明确 `if (!goal) guard = new TurnGuard(...)`;`:487` 对 `turn.goalRun` 跳过 `guard.silent`;`:416` goal 跳过发送前 fit 检查。因此搜索失败上限、计划重写上限、93% 上下文停机、空回答提示在 goal 长跑中全部不生效。且 TurnGuard 只统计 web_search(`turn-guard.mjs:27`),edit/read 失败没有任何计数器。 2. **重复调用守卫按“逐字节相同参数”计数**:`dsh-repeat-tool-reminder`(dsh-base/cordis.patch.yml 启用,thresholds [3,5,8])对连续完全相同的调用注入提示(仅提示,不停机)。风暴里每次调用都在给文件名 +1(clone_fix2→13、fix_clone2→5),链计数每次都回到 1,115 次调用 0 提示——守卫设计上抓不到这种“自我扩号”循环。 3. **goal 轮数上限默认 256**(`dsh-goal` `defaultMaxGoalRounds=256`,轮尽则 `block: round-limit`):本次仅用 2 轮,10 小时的连跑完全在上限内,护栏不触发。 4. **UI 卡片文案掩盖真实原因**:edit 引擎错误来自 `dsh-fs-local/lib/index.js:703-704`(`old_string was not found …` / `old_string matched N times`)。卡片标题走 zh.json `s2627` “无法修改文件” / `s1905` “无法打开此文件”;`events.mjs plainToolError(143)` 对这两个码没有映射,原因只在折叠的 Details 里以英文原文出现。13:47–13:51 截图里 80+ 张 “无法打开文件/无法修改文件 · 失败” 卡片,标题全部指向“打开/修改失败”,用户据此往磁盘/权限方向排查——而真实原因是目标文件不存在。 5. **落盘语义 = 请求边界 flush**:`dsh-session-checkpoint-policy` 在每次模型请求前/工具派发前 flush。13:46:54 的 flush 即 turn2 的收尾;turn3(13:47–13:54 风暴)的所有事件(≈131 次调用、13:46 用户消息、第 4 次压缩的迟到横幅、13:49 “上下文已压缩”提示)在进程结束(≈13:54:58,UI 侧)时从未追加——存档永久止于 13:46:54。 6. **导出是纯前端快照**:`apps/host/src/lib/session-log.ts` 的 `downloadSessionLog` 直接序列化浏览器侧 store 里的 `session` 对象(`schema: 'strata.session-log/1'`),不触发服务端 flush/重新拉取;快照的 `updatedAt` 恰为最后一次 checkpoint(13:46:54),于是 13:47/13:48/13:49 三次点击得到 3 个逐字节相同的 3,847,621 字节文件(blob 下载静默进 Downloads,文件名取标题前 80 字符,重名后缀由浏览器添加)。store 快照按 checkpoint 刷新,故风暴中的调用/失败原因在导出里完全不可见。 7. **80% 触发线**:`dsh-compaction-basic` `thresholdRatio` 默认 0.8;`profile.mjs compactionHeadroom` 把 headroom 覆盖为 (window−outputBudget)×0.125。代入存档窗口:threshold = min(393216×0.8, 393216−32768−45056) = **314,572 = 恰好 80.0%**,与横幅百分数一致。 8. **底栏计数与横幅百分数不同源**:底栏 “133.5K tokens · 1.4X context”(34% of 393K)显示的是 surface 计量,而压缩与横幅用的是 `context-budget.mjs` 校准后的 pressure(~314K)。同一窗口两个数字,用户看到的是“34% 时弹出 80% 横幅”。 ## 尾部风暴(13:47–13:51,UI 卡片 + 引擎运行日志,未持久化) 13:46 用户插入 “这个模型是 iq3_xxs…我开始怀疑它是否有修改文件的能力…”(存档最后一条 user/message 是 13:37:47——这条消息本身也随 turn3 丢失)。随后 4 分钟内引擎日志出现 115 次 “writing a tool call: edit” 与 16 次 “read”(单次参数 47–149 token、2–4 秒,典型盲发),对应 UI 80+ 张失败卡片。涉及路径逐一核验为**项目中不存在**:`clone.js(.log)`、`pdf_clone.py(.bak)/pdf_clone2.py`、`merge_pdf_to_html.py`、`pdf_clone_merged2.html`、`fix_clone.py…fix_clone5.py`、`clone_fix1.py…clone_fix13.py`(项目为 C++/Qt:src/core、tests、临时目录)。这些路径在已持久化的 784 次调用中出现 0 次——编造始于最后一次压缩之后。 根因链:IQ3_XXS(3.25bpw)+yarn×2+int8 KV 在 >300K pressure 长上下文下保真度崩塌;有损压缩剥掉逐字文件内容 → 模型凭记忆生成锚点(26 次 FS_EDIT_NOT_FOUND 已落盘为证)→ 转为在编造路径上盲发调用(131 次,未落盘)→ 失败叙述膨胀上下文 → 循环。goal 回合不挂 TurnGuard + 重复守卫抓不到变参循环 → 无人刹车。 ## 对 issue 第一版的更正(本版已按源码与存档逐条重验) - “10 小时 21 分、5 次压缩、19 条 prune” → **10 小时 13 分(2 个 goal 回合)、4 次压缩(426–471 s)、20 条 prune**;原第 5 行 “30.1 s/1.8 KB” 是 UI 里写 `压缩说明.log` 的文件卡片,不是压缩。 - “app 无失败熔断” → 表述过强:TurnGuard 与 repeat-reminder 都存在,问题是 (a) goal 回合整体跳过 TurnGuard,(b) 重复守卫按逐字节相同参数计数抓不到扩号循环,(c) 没有任何计数器统计 edit/read 失败——是**覆盖面缺口**,不是不存在。 - “压缩期间无任何进度提示” → 存在一行状态 “正在总结较早的消息…”(s9005);缺的是百分比/耗时/进度,且截图时段可见的是转圈动画。 - “文件内含 turn/end 13:54:58” → 存档最后一条 turn/end 是 13:46:54;13:54:58 是 UI 侧收尾时刻,turn3 的结束从未写入。 ## 建议 1. goal 回合也挂 TurnGuard(至少 93% 上下文停机与空回答提示),并在 TurnGuard 增加“连续 N 次 read/edit 失败(尤其 FS_NOT_FOUND/FS_EDIT_NOT_FOUND)”计数,达阈值暂停 goal 询问用户。 2. repeat-tool-reminder 按目标(同一路径前缀/同一失败类)计数,并在最高阈值处支持硬停而非纯提示。 3. 压缩过程显示校准后的 pressure 百分比与耗时计时;底栏 meter 与压缩横幅同源(校准后的 pressure);摘要生成考虑异步/更短目标长度。 4. 导出会话日志前先 flush 并重新拉取服务端会话;导出内容包含 tool/call 与 tool/result(含 isError 错误码与原因),并提供保存对话框。 5. plainToolError 补映射:FS_EDIT_NOT_FOUND → “文件存在,但你给的这段文字在文件里找不到(锚点失效)”;FS_NOT_FOUND → “文件不存在”——直接出现在卡片标题,且翻译。当前标题 “无法修改文件/无法打开此文件” 把用户引向不存在的磁盘/权限问题。 ## 截图说明 - 图 1:13:46 用户消息(绿框)+ “exploring clone.js” 卡片内 80+ 条 “查看文件内容/无法打开文件/无法修改文件 · 失败” 列表。 - 图 2:尾部 “为腾出空间,较早的消息已被总结。聊天之前已用 80%。” ×2 与 “Ran 15/17 commands” 卡片(Ran 卡片即导出里仅存的统计壳)。 - 图 3:第 3 条 80% 横幅 + “Ran 19” + “压缩说明.log 1.8KB 30.14s”(写文件卡片,非压缩)+ 13:49 “上下文已压缩” 提示;底栏 “466 消息 · 133.5K tokens · 1.4X context · GPU 13.2/13.6”。 (GitHub 附件上传需仓库写权限,非合作者无法随 issue 上传;原图可在本 issue 下回复索取。)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6570770293 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@chengye75-star commented on GitHub (Nov 2, 2026):

这是模型量化和你用的agent的问题,不是llm的问题。

<!-- gh-comment-id:6571188561 --> @chengye75-star commented on GitHub (Nov 2, 2026): 这是模型量化和你用的agent的问题,不是llm的问题。
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6571374482 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): Thanks, this follows the format now.
Author
Owner

@microcai commented on GitHub (Nov 2, 2026):

3. 这是模型量化和你用的agent的问题,不是llm的问题。

不,这个是注意力涣散导致压缩上下文指令出错,进而导致后续工作崩溃

<!-- gh-comment-id:6575812400 --> @microcai commented on GitHub (Nov 2, 2026): > 3\. 这是模型量化和你用的agent的问题,不是llm的问题。 不,这个是注意力涣散导致压缩上下文指令出错,进而导致后续工作崩溃
Author
Owner

@chengye75-star commented on GitHub (Nov 2, 2026):

我今天发现0.1.54的引擎有严重降智问题。切回0.1.44一切正常。新版引擎暂时不要用。

<!-- gh-comment-id:6588940219 --> @chengye75-star commented on GitHub (Nov 2, 2026): 我今天发现0.1.54的引擎有严重降智问题。切回0.1.44一切正常。新版引擎暂时不要用。
Author
Owner

@chengye75-star commented on GitHub (Nov 2, 2026):

另外长程任务不要用IQ3_XXS。加点内存改用NVFP4的分支/sergqwer/strata-nvfp4

<!-- gh-comment-id:6589088165 --> @chengye75-star commented on GitHub (Nov 2, 2026): 另外长程任务不要用IQ3_XXS。加点内存改用NVFP4的分支/sergqwer/strata-nvfp4
bsakaguchi changed title from [GH-ISSUE #4981] [GUI] Goal 自治长程任务:4 次自动压缩(每次 7–8 分钟仅一行状态);goal 回合跳过全部 TurnGuard;13:46:54 最后一次落盘后 131 次编造路径调用未持久化、导出 3 次逐字节相同 to [GH-ISSUE #4981] [GUI] Goal 自治长程任务:goal 回合不挂 TurnGuard、卡片不说真原因、导出不含工具调用(0.2.11 实测 Turn5 跑了 5 小时 23 分、26 次调用失败,16/17 目标真实存在) 2026-11-07 14:37:27 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2294
No description provided.