Skip to content

DeepSeek sessions written by deepseek-acp 0.9.0 render empty — the parser only reads the v0 session filename #734

Closed

Description

@fanliang123

TL;DR — Since the DeepSeek Harness agent moved to deepseek-acp 0.9.0 (dsh stack 0.1.5-rc.1), a session log is written as session.v3.jsonl.zstd. Codeg's DeepSeek parser only looks for session.jsonl.zstd / session.jsonl, so every conversation created after that upgrade has zero turns: the conversation view shows 「当前会话暂无消息。」 and those sessions are also missing from the local-session list. Codeg 0.30.7 ships the 0.9.0 model-catalog adaptation (feat(deepseek): adapt the model catalog surface to deepseek-acp 0.9.0), so the model surface is in sync but the session reader is not.

Environment

  • codeg 0.30.7 (linux-x64, self-hosted server; same behaviour verified against the v0.30.7 source)
  • agent deepseek-acp 0.9.0 → @deepseek-ai/dsh-* 0.1.5-rc.1 (upgraded from 0.7.0 → 0.1.1-rc.2)
  • session root: $DSH_HOME/sessions/--<normalized-cwd>--/<session-id>/

Symptom

  • A DeepSeek conversation created after the agent upgrade renders as empty: messageList.emptyConversation → 「当前会话暂无消息。」
  • POST /api/get_folder_conversation_turns with {"conversationId":<id>,"beforeIndex":100000,"limit":50} returns {"turns":[],"turns_total":0,...} for those conversations, while a pre-upgrade conversation in the same folder returns 102 turns from the very same endpoint.
  • Those sessions are absent from POST /api/list_conversations (the local-session list), while pre-upgrade DeepSeek sessions are listed.
  • When the agent side has nothing to load either (e.g. an automation-created session that errored before writing), the log shows:
    session/resume failed (Resource not found: <id>) ; falling back to session/load
    session/load failed (Resource not found: <id>) ; surfacing as session_load_failed=resource_not_found

Root cause

src-tauri/src/parsers/deepseek.rs (0.30.7) hardcodes the v0 filename:

let zstd_path = session_dir.join("session.jsonl.zstd");
match fs::read(&zstd_path) {
    Ok(bytes) => decode_zstd_frames_prefix(&bytes),
    Err(_) => fs::read_to_string(session_dir.join("session.jsonl")).ok(),
}

The persistence backend switched to generation-tagged filenames — v0 keeps the suffix-only name, every later generation carries a vN component, and "runtime operations select the numerically highest canonical generation" (@deepseek-ai/dsh-session-persistence-jsonl README). Current builds write session.v3.jsonl.zstd in the same session directory, so both lookups miss and the parser produces zero turns.

Checks that support this:

  • strings codeg-server | grep -c 'session.v3' → 0; repo-wide code search for session.v3 → no matching files.
  • The harness itself reads that log fine: driving deepseek-acp 0.9.0 over ACP (initialize + session/load) replays the v3 session as hundreds of session/update events. The agent side is not the problem.
  • On the affected machine, the last sessions written before the upgrade (≤ 2026-09-08, agent 0.7.0) are session.jsonl.zstd; everything written after upgrading to 0.9.0 is session.v3.jsonl.zstd.

Impact

Anyone who follows codeg's own upgrade path for the DeepSeek agent (0.9.0 is the current release, and codeg 0.30.7 adapts to its model catalog) loses the ability to read all DeepSeek sessions created afterwards: empty conversation view and missing history entries. The v3 logs themselves are intact — they are just not parsed.

Suggested fix

  • Resolve the highest canonical generation instead of a fixed name (e.g. try session.jsonl.zstd, session.jsonl, then session.v<max>.jsonl.zstd, and confirm the generation from the header).
  • A filename glob alone may not be sufficient: the record schema also changed. Current generations store one record per event plus sourceEventSeqs, while the frozen v0/v1 codecs used packed assistant-delta rows (per the persistence README), so the current-generation decoder probably has to be added alongside the existing v0/v1 path.

Workaround

Pin the agent back to deepseek-acp@0.8.0 (still @deepseek-ai/dsh-* 0.1.1-rc.2, which writes session.jsonl.zstd); 0.7.0 works too but is older.


中文摘要:agent 升级到 deepseek-acp 0.9.0(dsh 0.1.5-rc.1)后,会话日志文件名变成带 generation 的 session.v3.jsonl.zstd,而 codeg 的 DeepSeek 解析器(src-tauri/src/parsers/deepseek.rs)只找 session.jsonl.zstd / session.jsonl,于是新会话 turns 为空:界面显示「当前会话暂无消息。」、本地会话列表里也看不到。codeg 0.30.7 已按 0.9.0 适配了模型目录(2026-09-11 的提交),但没适配新的会话 generation 文件名/记录格式。建议按最高 generation 解析文件名,并补上当前格式的解码;临时规避可把 agent 固定回 deepseek-acp@0.8.0。

Activity

  1. xintaofei commented on Sep 14, 2026

    @xintaofei
    Collaborator

    感谢反馈,已修复

  2. 316682032 commented on Sep 15, 2026

    @316682032

    补充确认:Windows 桌面版 0.30.7 同样复现(原报告是 linux-x64 自托管服务端),并且 v3 日志的记录格式与解析器预期一致,所以 b84e76c 这条 generation-aware 修复应该正好覆盖。

    环境

    • codeg 0.30.7(Windows x64 桌面版,codeg.exe 0.30.7)
    • agent deepseek-acp 0.9.0
    • 会话文件:%USERPROFILE%\.dsh\sessions\--<munged cwd>--\<session-uuid>\session.v3.jsonl.zstd

    症状

    重启 codeg 后标签页还在、标题正常,但聊天区是「当前会话暂无消息。」,这些会话也不在本地会话列表里。同一天的 Cursor 会话不受影响——它的历史走 ACP 回放(日志里能看到 [ACP] Drained 288 historical replay notifications),而 DeepSeek 会话一次都没有,正好对应「DeepSeek 转录由本地解析器读取」这条路径。

    二进制佐证(0.30.7 桌面版)

    strings codeg.exe / codeg-server.exe:
      'session.jsonl.zstd'      → 1
      'session.jsonl'           → 1
      'session.v3'              → 0     ← 只认 v0 文件名
      'src\parsers\deepseek.rs' → 1     ← 桌面版与 server 同一个 Rust 解析器
    

    v3 的记录格式没有变(修复只需处理文件名)

    解压一个真实 v3 日志(Python 3.14 compression.zstd),逐行形状与 parsers/deepseek.rs 文档里的 {type, seq, time, data} 完全一致:

    {"type":"session","version":3,"id":"7f843d1c-…","createdAt":…,"cwd":"D:\\…"}
    {"type":"agent/inbox/spliced","seq":0,"time":…,"data":{"target":"next-turn",…}}
    {"type":"turn/start","seq":1,"time":…,"data":{"turn":1}}
    {"type":"tool/call","seq":200,"time":…,"data":{"turn":2,"step":32,…}}
    

    也就是说 v3 只是文件名带 generation,记录结构仍是 {type, seq, time, data},parse_generation_log_filename / resolve_generation_log_path 这条修复路径足够。

    现状

    v0.30.7(2026-09-11)尚未包含该修复,升级前用户会一直看到空会话;agent 侧数据完好,.dsh/sessions 下的日志可以正常解出完整对话。等下一个 release 即可,辛苦了 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions