1622352030/dsh-session-rescue ↗★ 0

dsh-session-rescue

Prevents the DeepSeek Harness cold-start turn stall: after a restart or session load the first turn can block forever while the token meter synchronously replays the whole session log; this plugin compacts the session before its size reaches that danger zone, so the replay stays cheap. 适合会话日志过长、频繁遇到重启或加载首轮卡死问题的用户。

Package
dsh-session-rescue
Compatibility
Unverified
Version
0.2.0
License
MIT
Last updated
Sep 24, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1622352030/dsh-session-rescue

Configuration

- insert:
    - id: session-rescue
      name: dsh-session-rescue
      config:
        enabled: true        # false = observe and report only, never compact
        warnSeq: 40000       # start warning/compacting from here
        dangerSeq: 80000     # cold first turn may never return past here
        minGrowthSeq: 20000  # compact only after this much growth since the last compaction
        cooldownMs: 60000
        maxAttemptsPerSession: 6
        maxBusyStreak: 5
        pollMs: 30000
        compactionTimeoutMs: 600000

The default thresholds are calibrated from the table above (40 k is where a cold first turn is already ~16 s; 80 k is inside the "never returned" range). They are machine- and session-dependent — measure your own with /rescue status and adjust.