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
The official compaction backend fails deterministically on large sessions: buildSummarizationInput replays the full surface into one fresh LLM request with no truncation, and at ~460k tokens that request dies at the transport layer. Working fix: agent-driven summarization — the agent summarizes its own conversation (KV-cache friendly, no giant replay), verified in production on the exact session that had failed 5 times (Compacted 664 history items (~460634 tokens), compaction/end without error). Plugin: https://github.com/jonah791/dsh-agent-compact
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
摘要
官方压缩后端(
@deepseek-ai/dsh-compaction-basic)在会话膨胀到一定程度后会必然失败。根因:buildSummarizationInput把完整 surface 无截断地重放进一个新 LLM 请求——在约 46 万 token 输入时,该请求死在传输层。我构建了一个可用的替代方案:agent 自总结——让 agent 总结自己的对话(命中 KV 缓存、没有巨型重放请求),并在同一个曾连续失败 5 次的真实会话上验证成功。Bug 详情
compaction/end反复报错:error: "DeepSeek API request to https://api.deepseek.com failed"(TRANSPORT)/compact失败;每次重试都重新构造同一个无上限的重放请求可用修复:让 agent 总结自己的上下文
插件:dsh-agent-compact(已挂
dsh-plugintopic)compaction/start—— 与官方相同的事务封装compaction/summary→ surfacereplace→compaction/end→ flush —— 与官方事务格式字节级兼容在之前失败的会话上实测:
inputTokenscacheReadTokensoutputTokensCompacted 664 history items (~460634 tokens)compaction/enderror给上游的建议
buildSummarizationInput应截断或流式化,而不是构造无上限的重放(TRANSPORT 失败的根因)MODULE_NOT_FOUND);profile 级解析回退可以打通独立插件路径English summary
The official compaction backend fails deterministically on large sessions:
buildSummarizationInputreplays the full surface into one fresh LLM request with no truncation, and at ~460k tokens that request dies at the transport layer. Working fix: agent-driven summarization — the agent summarizes its own conversation (KV-cache friendly, no giant replay), verified in production on the exact session that had failed 5 times (Compacted 664 history items (~460634 tokens),compaction/endwithout error). Plugin: https://github.com/jonah791/dsh-agent-compactAll reactions