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
{{ message }}
Repository navigation
[Bug] A single corrupt session log makes the entire sidebar session list disappear
#3404
When one session log file has an invalid Zstandard framing (e.g. the whole
JSONL is stored in a single zstd frame instead of the required "header-only
first frame"), the session.list RPC fails with a blanket error and the entire
sidebar session list renders empty β every other healthy session disappears
too, with no indication of which file is at fault.
This is the second time I've hit it (first on 2026-08-18, then again on
2026-08-19), so it is a recurring issue, not a one-off.
Steps to reproduce
Have a workspace with multiple sessions (e.g. 16 sessions under one
workspace).
Recompress one of its session.jsonl.zstd files as a single frame, e.g.:
(This produces one zstd frame containing the header line plus all event
lines, instead of a dedicated first frame holding exactly the header line.)
Open the Web GUI, refresh, and select the workspace.
Actual behavior
session.list returns:
handler failure: Error: corrupt Zstandard session log: first frame is not exactly one header line
The sidebar shows the workspace group but zero session titles underneath
it. workspace.list still returns the correct sessionIds (because it does
not read log bodies), so the IDs are there but no titles ever render.
No error is surfaced in the UI and no console.error is emitted β the list
is just silently empty.
Expected behavior
A single malformed log should be skipped (and logged with a warning) while
the remaining sessions still render, instead of failing the whole list.
If the list must fail, the error should at least name the offending session
file/path, so the user can find and repair it.
Root cause
In @deepseek-ai/dsh-session-persistence-jsonl, the JSONL artifact is a multi-frame zstd container:
the first frame must decode to exactly one header line (a JSON object
ending in a single \n): plaintext.indexOf(10) === plaintext.length - 1
(assertZstdHeaderFrame), and
subsequent event batches live in their own frames, each written with an XXH64
checksum ({ params: { [ZSTD_c_checksumFlag]: 1 } }).
functionassertZstdHeaderFrame(plaintext){if(plaintext.length===0||plaintext.indexOf(10)!==plaintext.length-1)thrownewError("corrupt Zstandard session log: first frame is not exactly one header line");}
The session.list path scans all artifacts and throws on the first bad one,
so a single single-frame file aborts the whole listing (fail-fast, non-isolated).
Suggested fixes
Isolate per-session failures in the list path β catch the per-artifact
header-read error, log a warning that names the file, and continue with the
other sessions (return them; optionally expose the broken ones as a degraded/corrupt set for the UI to show).
Include the session id / file path in the error message so a corrupt
artifact is immediately locatable.
Optionally, surface a visible UI hint (e.g. "N sessions could not be loaded")
instead of a silently empty list.
Manual repair (what worked for me)
Decompress the single-frame file, re-encode with the header in its own frame and
the events in a following frame, then write back:
After this repair, session.list returned ok: true and the sidebar rendered
all 16 sessions again.
Related
This appears related to a previously-noted upstream issue where a
recover/replay flow appends mis-sequenced agent/inbox/spliced messages using a
stale seq cursor (observed 2026-08-18). If a fix uses zstd -f (single-frame)
during repair it produces exactly this header-frame corruption.
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.
Environment
@deepseek-ai/dshv0.1.0-rc.7deepseek-ai/deepseek-harness(apps/cli)v26.3.0dsh webβhttp://127.0.0.1:3080Summary
When one session log file has an invalid Zstandard framing (e.g. the whole
JSONL is stored in a single zstd frame instead of the required "header-only
first frame"), the
session.listRPC fails with a blanket error and the entiresidebar session list renders empty β every other healthy session disappears
too, with no indication of which file is at fault.
This is the second time I've hit it (first on 2026-08-18, then again on
2026-08-19), so it is a recurring issue, not a one-off.
Steps to reproduce
Have a workspace with multiple sessions (e.g. 16 sessions under one
workspace).
Recompress one of its
session.jsonl.zstdfiles as a single frame, e.g.:zstd -dc bad/session.jsonl.zstd | zstd -f -o bad/session.jsonl.zstd.rebuilt mv bad/session.jsonl.zstd.rebuilt bad/session.jsonl.zstd(This produces one zstd frame containing the header line plus all event
lines, instead of a dedicated first frame holding exactly the header line.)
Open the Web GUI, refresh, and select the workspace.
Actual behavior
session.listreturns:The sidebar shows the workspace group but zero session titles underneath
it.
workspace.liststill returns the correctsessionIds(because it doesnot read log bodies), so the IDs are there but no titles ever render.
No error is surfaced in the UI and no
console.erroris emitted β the listis just silently empty.
Expected behavior
the remaining sessions still render, instead of failing the whole list.
file/path, so the user can find and repair it.
Root cause
In
@deepseek-ai/dsh-session-persistence-jsonl, the JSONL artifact is amulti-frame zstd container:
ending in a single
\n):plaintext.indexOf(10) === plaintext.length - 1(
assertZstdHeaderFrame), andchecksum (
{ params: { [ZSTD_c_checksumFlag]: 1 } }).The
session.listpath scans all artifacts and throws on the first bad one,so a single single-frame file aborts the whole listing (fail-fast, non-isolated).
Suggested fixes
header-read error, log a warning that names the file, and continue with the
other sessions (return them; optionally expose the broken ones as a
degraded/corruptset for the UI to show).artifact is immediately locatable.
instead of a silently empty list.
Manual repair (what worked for me)
Decompress the single-frame file, re-encode with the header in its own frame and
the events in a following frame, then write back:
After this repair,
session.listreturnedok: trueand the sidebar renderedall 16 sessions again.
Related
This appears related to a previously-noted upstream issue where a
recover/replay flow appends mis-sequenced
agent/inbox/splicedmessages using astale seq cursor (observed 2026-08-18). If a fix uses
zstd -f(single-frame)during repair it produces exactly this header-frame corruption.
All reactions