DeepSeek Harness history stack-overflow fix
dsh-provenance-guard — detachable plugin for the DeepSeek Harness history failure: history unavailable / RangeError: Maximum call stack size exceeded.
Detachable DeepSeek Harness plugin for the Maximum call stack size exceeded history failure caused by an oversized assistant/message.sourceEventSeqs list.
It follows the DSH external bundle contract:
package.jsondeclaresdsh.bundle.patch.cordis.patch.ymlinserts one ordinary plugin after the official session
persistence provider.
- The plugin decorates the persistence service at runtime and restores the
original methods on disposal.
- It does not replace
@deepseek-ai/dsh-agent-loop, edit DSH source files, or
modify the session message content.
When one assistant message cites more than 4096 streamed chunk sequence numbers, the plugin writes an empty provenance list. DSH explicitly permits that representation for assistant/message; the message content remains lossless, while the unbounded index is removed.
Install
From the DSH profile that should use it:
dsh plugin --profile web add /path/to/dsh-provenance-guardThen restart dsh web. Removing the dependency and restarting disables the guard without changing the official DSH installation.
Version and compatibility
- Plugin version:
0.1.1 - DSH compatibility:
@deepseek-ai/dsh >=0.1.0-rc.6 <0.2.0 - Tested with:
@deepseek-ai/dsh 0.1.0-rc.6