[BUG] Session history becomes unloadable ("corrupt") after a degenerate model tool call persists an empty callId #6603
alexzeng666
started this conversation in
General
Replies: 1 comment
|
复核确认,校验点与你的报告一致:
修复方向(建议): 恢复现有会话:备份后解压 session.v3.jsonl.zstd,删除/修复该 tool/call + tool/result 对(思路同 #6520 第 2 条的编辑恢复法),重压回。字节格式细节本轮未验证,操作前务必备份。 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
When the model emits a degenerate tool call (empty
callIdand emptyname), the harness executes it, getsToolNotFoundError, and persists atool/resultevent whosemessage.source.callIdis"". On the next load, the session fails validation and the entire session history becomes unloadable from the Web GUI:The write path produced a log that the read path refuses — a log written by the harness itself should always load back.
Evidence (minimal event pair from a real session log, v3 format)
The validator that refuses it:
adoptSessionEvent→assertMessageEventShape(@deepseek-ai/dsh-session, "message must have tool source" — requiressource.kind === "tool"with a non-emptycallId), surfaced asSessionPersistenceCorruptionErrorbyvalidateStoredEvents.Expected behavior
Either:
callId: synthesize a non-empty id (e.g. a UUID) for degenerate calls, orcallIdontool/resultmessages that carrydata.error(they are produced by the harness's own error path, not by the model).Reproduction
callId/name(observed via a community gateway route).Workaround
Rewriting the log with a shared synthetic non-empty
callIdon both thetool/calland itstool/result(seqs,sourceEventSeqsand surface markers untouched) fully restores loading; the repaired log passesadoptSessionEvent+Session.fromRestore.Environment
npx @deepseek-ai/dsh web),@deepseek-ai/dsh-session0.1.5-rc.2, log format v3 (zstd framed JSONL).Related
All reactions