DeepSeek-Reasonix icon indicating copy to clipboard operation
DeepSeek-Reasonix copied to clipboard

[Bug]: 无限发送对话30轮

Open eghrhegpe opened this issue 5 months ago • 4 comments

Version line

v2 — Go rewrite (1.x), main-v2 (active development)

Exact version

1.12.0

What happened?

太恐怖了,桌面端,多开任务的时候,突然发现有一个窗口频繁发送对话框。

Steps to reproduce

🟡 潜在问题:多 .pmx 并发加载 main.tsL179-L181 for (const path of paths) { handleDropFi... 5 个工具

[已粘贴文本 #45 · 71 行] 9 个工具

记录文档

记录工作到docs/status.md

记录工作到docs/status.md 6 个工具

[已粘贴文本 #1 · 25 行] 56 个工具

[已粘贴文本 #1 · 108 行] 32 个工具

{"type":"memory_v5_execution_contract","instructi...

{"type":"memory_v5_execution_contract","instructi...

{"type":"memory_v5_execution_contract","instructi...

{"type":"memory_v5_execution_contract","instructi...

{"type":"memory_v5_execution_contract","instructi...

{"type":"memory_v5_execution_contract","instructi...

{"type":"memory_v5_execution_contract","instructi... 30+重复发送 {"type":"memory_v5_execution_contract","instruction":"Execute source_event through planner_ir. Treat constraints, risk_notes, strategy_selection, and execution_steps as the controlling plan for this turn. Do not bypass contradictory or quarantined memory outside this IR.","ir_explanation":{"decision_summary":"Use strategy frontend-visual-verify for goal: Continue pursuing the active goal. If it is complete, provide the concise final result and end with [goal:complete]. If it is truly blocked on a user-owned decision after try...","constraint_mapping":["avoid constraint from memory_router: compiled IR overhead exceeded budget; reduce memory references before injection","avoid constraint from noise_filter: bash repeated error: command exited: exit status 1","avoid constraint from noise_filter: bash repeated error: command exited: exit status 2","avoid constraint from noise_filter: complete_step repeated error: evidence 1: diff paths have no matching successful writer receipt in this turn; files written this turn: ["c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\library.ts" "c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\menu.ts" "c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\config.ts"] — cite one as it actually ran, or run the check now","avoid constraint from noise_filter: complete_step repeated error: evidence 3: summary is required — the evidence is the summary, not just its kind"],"memory_influence":["tool:20260626T005950.367027300:0 influenced decision as evidence (HIGH_SIGNAL)","tool:20260626T005950.367027300:1 influenced decision as evidence (HIGH_SIGNAL)","tool:20260626T010539.615398800:0 influenced decision as evidence (HIGH_SIGNAL)","tool:20260626T010539.615398800:1 influenced decision as evidence (HIGH_SIGNAL)","tool:20260626T010539.615398800:2 influenced decision as evidence (HIGH_SIGNAL)"],"strategy_reason":"97% prior success after 61 use(s); 0.35 usage penalty; matched precondition ui; matched goal classifier"},"planner_ir":{"version":"v5.9","goal":"Continue pursuing the active goal. If it is complete, provide the concise final result and end with [goal:complete]. If it is truly blocked on a user-owned decision after trying se...","source_event":"Continue pursuing the active goal. If it is complete, provide the concise final result and end with [goal:complete]. If it is truly blocked on a user-owned decision after trying sensible defaults, end with [goal:blocked:\u003cshort reason\u003e]. Otherwise do the next useful work and end with [goal:continue].","runtime_mode":"control","constraints":[{"type":"avoid","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"memory_router"},{"type":"avoid","text":"bash repeated error: command exited: exit status 1","source":"noise_filter"},{"type":"avoid","text":"bash repeated error: command exited: exit status 2","source":"noise_filter"},{"type":"avoid","text":"complete_step repeated error: evidence 1: diff paths have no matching successful writer receipt in this turn; files written this turn: ["c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\library.ts" "c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\menu.ts" "c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\config.ts"] — cite one as it actually ran, or run the check now","source":"noise_filter"},{"type":"avoid","text":"complete_step repeated error: evidence 3: summary is required — the evidence is the summary, not just its kind","source":"noise_filter"},{"type":"avoid","text":"delete_range repeated error: start_anchor not found in C:/Users/zhujieling11/MikuMikuAR/MikuMikuAR/app.go","source":"noise_filter"},{"type":"avoid","text":"edit_file repeated error: old_string not found in C:\Users\zhujieling11\MikuMikuAR\MikuMikuAR\frontend\src\scene.ts","source":"noise_filter"},{"type":"avoid","text":"edit_file repeated error: old_string not found in C:\Users\zhujieling11\MikuMikuAR\docs\status.md","source":"noise_filter"},{"type":"avoid","text":"multi_edit repeated error: edit 10: old_string not found","source":"noise_filter"},{"type":"must_use","text":"previous execution failed; require source-of-truth verification before acting","source":"ir_builder"},{"type":"must_use","text":"avoid repeating bash after repeated error: command exited: exit status 1","source":"strategy_selector"},{"type":"must_use","text":"avoid repeating bash after repeated error: command exited: exit status 2","source":"strategy_selector"},{"type":"must_use","text":"avoid repeating complete_step after repeated error: evidence 1: diff paths have no matching successful writer receipt in this turn; files written this turn: ["c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\library.ts" "c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\menu.ts" "c:\\users\\zhujieling11\\mikumikuar\\mikumikuar\\frontend\\src\\config.ts"] — cite one as it actually ran, or run the check now","source":"strategy_selector"},{"type":"must_use","text":"avoid repeating complete_step after repeated error: evidence 3: summary is required — the evidence is the summary, not just its kind","source":"strategy_selector"},{"type":"must_use","text":"avoid repeating delete_range after repeated error: start_anchor not found in C:/Users/zhujieling11/MikuMikuAR/MikuMikuAR/app.go","source":"strategy_selector"},{"type":"must_use","text":"avoid repeating edit_file after repeated error: old_string not found in C:\Users\zhujieling11\MikuMikuAR\MikuMikuAR\frontend\src\scene.ts","source":"strategy_selector"},{"type":"must_use","text":"avoid repeating edit_file after repeated error: old_string not found in C:\Users\zhujieling11\MikuMikuAR\docs\status.md","source":"strategy_selector"},{"type":"must_use","text":"avoid repeating multi_edit after repeated error: edit 10: old_string not found","source":"strategy_selector"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T005905.142905100"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T005950.367027300"},{"type":"reference","text":"tool call count exceeded plan shape; prefer tighter execution steps","source":"learning:20260626T005950.367027300"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010539.615398800"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010542.218570900"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010551.157966100"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010559.392276200"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010606.045859100"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010612.177447200"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010618.515890900"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010625.211738600"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010633.197325700"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010639.497672900"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010646.011757200"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010652.594718400"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010659.366840300"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010705.504575400"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010712.547477200"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010719.789085100"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010726.844507200"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010734.130300600"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010740.908928800"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010748.398907200"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010755.195319800"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010803.037988600"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010810.875662900"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010819.892679400"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010828.766068800"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010835.779635200"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010845.457553300"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010852.304888800"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010909.003589400"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010916.949614400"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010923.579401600"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010931.637808500"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010939.527586800"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010946.178052700"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T010955.440710200"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T011004.259457600"},{"type":"reference","text":"compiled IR overhead exceeded budget; reduce memory references before injection","source":"learning:20260626T011011.384369700"}],"strategy_selection":{"selected":"frontend-visual-verify","reason":"97% prior success after 61 use(s); 0.35 usage penalty; matched precondition ui; matched goal classifier","score":1.868,"mode":"control","exploration_rate":0.03,"rejected":[{"id":"code-review","reason":"98% prior success after 50 use(s); 0.35 usage penalty; matched precondition pr","score":1.3824},{"id":"bugfix-reproduce-first","reason":"92% prior success after 24 use(s); 0.32 usage penalty","score":0.5985},{"id":"long-horizon-autoresearch","reason":"rejected because prior success rate is below the risk threshold","score":-0.0074}]},"available_strategies":[{"id":"frontend-visual-verify","success_rate":0.9672,"samples":61,"score":1.868,"reason":"97% prior success after 61 use(s); 0.35 usage penalty; matched precondition ui; matched goal classifier"},{"id":"code-review","success_rate":0.98,"samples":50,"score":1.3824,"reason":"98% prior success after 50 use(s); 0.35 usage penalty; matched precondition pr"},{"id":"bugfix-reproduce-first","success_rate":0.9167,"samples":24,"score":0.5985,"reason":"92% prior success after 24 use(s); 0.32 usage penalty"}],"memory_references":[{"id":"tool:20260626T005950.367027300:0","content":"todo_write succeeded","quality":"HIGH_SIGNAL","influence":"evidence"},{"id":"tool:20260626T005950.367027300:1","content":"grep succeeded","quality":"HIGH_SIGNAL","influence":"evidence"},{"id":"tool:20260626T010539.615398800:0","content":"grep succeeded","quality":"HIGH_SIGNAL","influence":"evidence"},{"id":"tool:20260626T010539.615398800:1","content":"bash succeeded","quality":"HIGH_SIGNAL","influence":"evidence"},{"id":"tool:20260626T010539.615398800:2","content":"read_file succeeded","quality":"HIGH_SIGNAL","influence":"evidence"}],"execution_steps":[{"id":"inspect-ui","action":"Locate the relevant component, state, and i18n wiring."},{"id":"implement-ui","action":"Implement the control using existing design-system patterns."},{"id":"verify-ui","action":"Run type checks and inspect the rendered interaction when practical."}],"risk_notes":["avoid previously failed strategy bugfix-reproduce-first","avoid previously failed strategy code-review","avoid previously failed strategy frontend-visual-verify","avoid previously failed strategy general","avoid previously failed strategy long-horizon-autoresearch","drift control: reduce overused strategy bugfix-reproduce-first","drift control: reduce overused strategy code-review","drift control: reduce overused strategy frontend-visual-verify","quarantined noisy memory pattern bash repeated error: command exited: exit status 1","quarantined noisy memory pattern bash repeated error: command exited: exit status 2"]}}

OS / platform

window 11

Relevant logs or output


eghrhegpe avatar Jun 26 '26 01:06 eghrhegpe

抱歉,这是框架层的 memory routing 循环 bug — memory_v5_execution_contract 被反复重发,不是我能控制的。看起来像是 planner IR 在失败后不断重试同一个指令,导致大量重复的 JSON 块。

eghrhegpe avatar Jun 26 '26 01:06 eghrhegpe

补充状态:这个 “memory_v5_execution_contract 反复重发 / 30+ 轮” 的主循环根因已由 #5387 合并修复。

最终合入的机制不是只匹配某一个英文前缀,而是在 turn orchestrator 确认消息是 synthetic turn 时标记 MemoryCompilerSkip,让 goal continuation、计划批准后的 synthetic execution turn,以及未来同类合成 turn 都跳过 Memory v5 编译。这样新的循环来源不会再把同一段 contract 反复注入。

另外,#5390 已处理旧会话/嵌套损坏 contract 的显示 unwrap;#5391 已合并,补上 citation-only Memory v5 final message 单独变成空 assistant 气泡的前端噪音路径。

如果最新 main-v2 仍能复现 30+ 轮自发发送,请补充新的最小复现和对应 transcript 片段,这样可以确认是否还有不同于 #5387 的新循环入口。

SivanCola avatar Jun 26 '26 17:06 SivanCola

后续硬化更新:#5393 已补上 typed synthetic-turn contract,专门降低这类 “Memory v5 contract 被 synthetic follow-up 重新编译后循环发送” 的复发风险。

具体变化是:goal continuation 现在通过显式 synthetic path 标记 MemoryCompilerSkip,不再只依赖固定前缀字符串识别;旧前缀判断仍作为兼容兜底保留。这样未来如果控制器自动续跑文案调整,也不会因为没命中 syntheticPrefixes 而重新把 Memory v5 contract 注入模型上下文。

SivanCola avatar Jun 26 '26 17:06 SivanCola

后续预防更新:#5395 已补一层防回归 guardrails,针对这类 “synthetic follow-up / Memory v5 contract 循环” 的未来复发风险。

已合入链路里,#5387 / #5393 负责阻断已知 synthetic turn 被 Memory v5 重复编译;#5395 进一步把 ComposeSynthetic 与 WithMemoryCompilerSkip 的配对写成 AST 回归测试,未来如果新增 controller-injected synthetic execution 但忘记 skip Memory v5,测试会直接失败。

另外 #5395 也避免 desktop history 把 raw <memory-compiler-execution> contract 放进 submitText 重放路径,防止恢复旧会话后编辑/重发时把内部 contract 当成用户输入再次发送。这个 PR 不改变正常用户 turn 的 Memory v5 编译,也不改 provider request 或 prompt prefix;CI 的 cache-impact、race、desktop 和三平台测试均已通过。

SivanCola avatar Jun 26 '26 18:06 SivanCola

Closing this as fixed by the Memory v5 synthetic-turn repair chain ending in #5395 (merged as a015f7fea4c4f917541fc0d0dde7250f8ce1b31d).

The merged fixes mark controller-created synthetic turns so they skip Memory v5 compilation, keep raw Memory v5 contracts out of replay submit text, and add regression coverage that prevents future ComposeSynthetic paths from running without the MemoryCompilerSkip guard.

Verification in the PR chain included focused internal/control, internal/agent, internal/memorycompiler, and desktop history regressions, plus broader go test ./... -count=1 and git diff --check.

Release status: the final guarding commit is included in v1.13.0 / Desktop v1.13.0, so users should pick up the fix by upgrading to v1.13.0 or newer.

SivanCola avatar Jun 28 '26 02:06 SivanCola