Replies: 5 comments
|
The symptom is real, but the root cause needs one correction — the compaction backend is not missing from the host plane; it's mounted twice and the web overlay disables the host copy while the preset copy never reaches the session. What's actually in the composition
So "no host-plane replacement" isn't quite it: the host copy exists and is deliberately disabled, and the standard preset is supposed to supply compaction from its own realm. The bug is that the preset copy isn't producing compaction events for web sessions, while re-enabling the host copy (your home-patch workaround) does. The real question to pin downWhy does the standard preset's
That distinction decides the fix: (2) is a one-line scope fix; (1) means the preset realm wiring needs repair. Either way, "remove the Can you capture |
|
Thanks — your citations check out against the installed bundle, and I have the capture you asked for. Verified on dsh 0.1.0-rc.6: 1. Bundle confirmation (installed, not repo-HEAD):
And 2. The top-level dump renders exactly one instance per id, and all three rows sit in this section: and later: So the visible rows are the dsh-base (host) copies: the web-app 3. The preset-realm copy does not appear in the top-level dump at all. The dump has no 4. Honest runtime status: the workaround is composition-verified but I have not yet observed a runtime compaction event in a web session — the one post-fix session ran only 13 steps, well under the 59K threshold. The decisive experiment is a long web session (30+ tool calls) with Agreed on the stop-gap caveat: re-enabling the host copy sidesteps the 2026-08-10 per-preset ownership decision rather than fixing the realm wiring — the maintainers should decide between host-plane compaction vs repairing the preset realm, as you say. |
|
Runtime result — the decisive experiment ran, and it's decisive: compaction still never fires in web sessions, even with the host copy re-enabled. Setup: dsh 0.1.0-rc.6, web profile, web process started after my home patch (so the composition with Result:
So the host-copy re-enable is composition-verified but runtime-ineffective: web sessions still don't compact. That points to your candidate (1): the session resolves the preset-realm backend (or none), not the host copy we enabled. One extra measurement that may explain a lot — the fixed request overhead from the session's own
The failed mission hit ~64K of conversation (5 full reads of a 31.8KB file alone ≈ 40K+ tokens). For compaction to help, the token meter must be counting this dense tool-result surface correctly — the behavior is consistent with the meter undercounting (e.g. a chars-per-token heuristic on file content) so the 0.6 threshold in real terms is never reached in time. Worth checking Happy to run any variant you want (e.g. a controlled headless long session with a file-read-heavy task, or |
|
The 47-schema measurement gives us a useful discriminator, but it does not yet prove that schemas are the root cause. At current The decisive trace is therefore
A clean second arm would fork the same pre-failure session and keep the file-read pattern unchanged, but expose only two entry tools (search → exact schema → call) or a strict manual allowlist. Record canonical tool-schema JSON bytes, provider prompt usage, meter values, first failing step, and compaction events. If that arm survives longer while compaction still never fires, it isolates standing schema overhead as one contributor without confusing it with the compaction bug. Disclosure: I maintain MCP Lens, which can provide that two-entry DSH arm. It is not a fix for retained history/tool-result growth; I am offering it only as a reproducible control. |
|
Thanks for the correction — it's fair, and it sharpens what we actually observed. Our "~18K" figure was a chars-derived estimate at ~3 chars/token (6,072 system chars + 47,229 schema chars), not the meter's heuristic value and not a provider usage anchor. At the fallback meter's 4 chars/token it's ~13.3K heuristic tokens, which makes the meter's gap to real usage even larger than we framed — we never claimed the meter itself counted 18K. On the three-arm trace: our failure maps to arm 1. We ran a 22-step file-read mission in a web session after re-enabling the compaction rows (disabled:false, thresholdRatio 0.6, verified via web-profile dump-config), swept all session JSONL for compaction events — zero — and the request died with "Context size has been exceeded" from the llama-server provider while the meter showed no pressure. That's baseline.kind=estimated, meter below the pressure gate, provider rejects: estimator/usage-anchor mismatch, consistent with your arm 1. We did not capture baseline.kind/baseline.tokens/surfaceDeltaTokens/totalTokens per step (not exposed to us in rc.6's session logs), so those numbers can't be reconstructed retroactively. Status on our side: dsh is parked pending the rc.7-era fixes; long-session work has moved to a harness with working compaction. If we resume dsh testing, the per-step trace fields you list are exactly what we'd capture. Not adopting the MCP Lens control arm today, but the disclosure is appreciated and the two-entry-tools isolation logic is sound as a reproducible control. |
Uh oh!
There was an error while loading. Please reload this page.
Environment
0.1.0-rc.6(npm@deepseek-ai/dsh)webllama-server),contextWindow: 98304,maxTokens: 16384Symptom
Long-running web sessions (multi-step agent task, ~50 tool calls) fail mid-turn with
PI_AI_ERROR: Context size has been exceeded— the provider rejects the request (send_error: Context size has been exceededin the server log). The session JSONL shows zero compaction events even after the conversation crosses the provider window.Root cause
node_modules/@deepseek-ai/dsh-web-app/cordis.patch.ymldisables the entire compaction stack for the web profile:The comment adjacent to these rows says the compaction backend should live on the host plane (per the 2026-08-10 host-plane-ownership note) — but the web bundle only disables the preset-plane rows without mounting a host-plane replacement. Net effect: web sessions have no auto-compaction path at all. The
headlessprofile keepscompaction-basicenabled and compacts normally.Repro
dsh webwith any provider.maxTokens), the turn dies withContext size has been exceeded.Expected
Web sessions auto-compact like headless sessions (default
thresholdRatio 0.8; configurable).Workaround (verified)
Home-level
~/.dsh/cordis.patch.yml:Optionally tune thresholds on the same patch entry:
Verified via
dsh --profile web --dump-config(patch applied after the web-app bundle); sessions then compact and survive past the previous failure point.Suggested fix
Either mount the compaction backend on the host plane for web (per the ownership note), or remove the
disabled: truerows until the host-plane migration lands — as shipped, a core reliability feature is silently off in the primary interactive profile.All reactions