Replies: 2 comments
|
Verified against rc.2 (HEAD b150a55) — your repro is line-exact, but the "terminates the session" attribution needs a correction: this error does not abort the turn. The guard is real, deliberate, and tested; its blast radius is smaller than the report suggests. 1. The guard is intentional, with a regression test and 2. The turn does not terminate — both automatic triggers catch it
Can you confirm what 3. The real cost is different: repeated wasted summarizer calls + warn spam 4. Fix placement (endorses your fallback, sharpened)
No session-corruption family connection: the |
|
"summary is not smaller" is a constraint that only exists because the backend asks a model to produce prose and then polices it. A deterministic backend has no such gate to misfire: dsh-dcp extracts structured facts (paths/commands/errors/todos/user quotes) with fixed output rules, zero LLM calls per compaction, and the official trigger/retention/lock semantics are inherited unchanged. dsh plugin add @aiwayds/dsh-dcpIndependently, the reject-valid-short-summary behavior you documented still looks like a real compaction-basic bug worth fixing upstream — the deterministic option just stops depending on that code path. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The session compactor aborts when the generated summary is longer than the shadowed content, even for a very short turn. The whole agent turn is terminated instead of retaining the original content or skipping compaction.
Reproduction
@deepseek-ai/dsh0.1.1-rc.2headlessRun a short tool-using task that triggers compaction, for example:
After the tool calls, compaction ends with:
A second occurrence in the same test session was:
The JSONL event is:
{"type":"compaction/end","data":{"error":"summary is not smaller than the shadowed content (254 estimated framed tokens >= 67)"}}Expected behavior
If the summary is not smaller, compaction should be skipped and the shadowed content retained, or the summary should be replaced with a minimal marker. It should not abort the agent turn.
Actual behavior
The compaction step reports an error and the session terminates prematurely after otherwise successful tool calls.
Notes
This is especially likely with short Windows tool-call turns, where framing overhead makes a summary larger than the content being replaced. A simple fallback such as
if summary_tokens >= shadowed_tokens: return no_compactionappears sufficient.All reactions