dsh-session-repacker
Run the following command in DeepSeek Harness:
dsh plugin install kkishapppy/dsh-session-repacker
Paste the following prompt into your AI chat to install this plugin:
Find dsh-session-repacker (source: https://github.com/kkishapppy/dsh-session-repacker) in the DeepSeek Harness plugin marketplace and click Install to enable session frame repacking.
About this plugin
DSH's JSONL session backend compresses every write batch into its own zstd frame and appends it to the session file. During streaming, a batch fires roughly every 200 ms, so a moderately long conversation can accumulate tens of thousands of independent frames. The read path has no seek-style suffix access—whether you need just the tail or a full replay, the backend must decompress the entire file frame by frame. In a real benchmark, the largest session at 5.49 MB required about 660 ms of pure decompression, stretching the actual open path to 1.5–3 seconds and slowing down GUI loading, conversation forking (which must fully decode the parent first), and sub-session inheritance.
dsh-session-repacker does exactly one thing well: it repacks those tens of thousands of frames into the native two-frame form that DSH itself uses when writing—a single header frame (one line) plus one event frame (all remaining plaintext concatenated and re-compressed). The plaintext is byte-for-byte identical, so DSH's read path remains fully compatible. Because a single large frame compresses far better than thousands of tiny ones, the compressed size is also roughly halved. In testing, the largest session went from 14,467 frames / 5.49 MB / ~661 ms down to 2 frames / 2.09 MB / ~126 ms—a six-fold speedup. Across all 24 legacy sessions, total frame count dropped from 39,911 to 48 and total size from 20.08 MB to 10.67 MB.
Safety is built in: the plugin only touches .jsonl.zstd files, skips active sessions and recently modified ones, performs a byte-level equivalence check and concurrent-write detection before replacing anything, and uses a temp file with atomic rename to guarantee no data loss. Repacked files can still be appended to by DSH normally and can be repacked again later, making the process fully idempotent. It is ideal for anyone with a backlog of DSH session history who notices each old dialog taking several seconds to open—run it once and every legacy session loads back in milliseconds.
Use Cases
- Opening a long session with tens of thousands of zstd frames takes several seconds in the GUI
- Forking a conversation requires fully decoding the parent session first, adding noticeable delay
- Bulking up legacy sessions on disk to unify frame structure and halve storage size
Best For
- Users with a large backlog of DSH sessions who notice multi-second open times for old dialogs
- Developers who frequently fork or inherit from legacy conversations and feel the decode overhead
- Ops engineers who care about DSH session file compression ratio and I/O throughput
Related Plugins
Traceable, searchable cross-session memory for AI agents that turns conversation knowledge into a typed knowledge graph and recalls relevant subgraphs instead of replaying full history, natively integrated with DeepSeek Harness.
Gives DSH AI cross-session long-term memory, to-do and skill management, plus multi-session orchestration, external AI delegation, and an infinite canvas that grows with you.
dsh-mnemon is a three-tier, pluggable, Agent-driven memory system for DeepSeek Harness, combining Runtime memory, Project Documents, and replaceable Memory Spaces with nine long-term providers.
An opinionated, zero-infrastructure file-based memory protocol: human-readable markdown files plus a bounded always-loaded index, curation discipline, and no database or embeddings.