dsh-session-robustness
Run the following command in DeepSeek Harness:
dsh plugin install bainianlaoyao/dsh-session-robustness
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install bainianlaoyao/dsh-session-robustness in the DeepSeek Harness terminal, or install from the source at https://github.com/bainianlaoyao/dsh-session-robustness, then restart the web profile to activate the plugin.
About this plugin
When running long multi-step agent workflows in DSH, the most frustrating failure is rarely a wrong answer — it is a transient API hiccup: a timeout, a 429, a 5xx burst, or an SSE stream that drops mid-response. The official dsh-llm-retry executor gives up after five attempts and marks the turn as a terminal failure, forcing you to manually resend the whole prompt mid-workflow. dsh-session-robustness was built to close exactly that gap: it hooks in after the official five retries and re-issues the same request on the same already-open step, backing off with exponential delay plus jitter, until the call succeeds, you hit Stop, or you pause it from the settings panel.
Three design choices matter most. First, it only retries transient failures — timeouts, rate limits, 5xx, SSE disconnects, half-written JSON, HTTP 408/429/499, and similar one-off glitches — while hard-coding AUTH, QUOTA, CONTEXT_WINDOW_EXCEEDED, and other permanent errors as never-retry, so you never waste tokens or hang a session on a quota that will not recover on its own. Second, failed fragments never leak into the model-visible conversation history, so the next successful attempt sees a clean context. Third, for the openai-codex WebSocket path specifically, the plugin discards the stale previous_response_id anchor after a stream failure, preventing every subsequent request from being pinned to an incomplete response even after the upstream recovery.
It is aimed at users who run multi-turn agent workflows over networks or provider gateways prone to transient wobble, and especially at openai-codex users who frequently see Codex overloaded or Upstream request failed messages. With the plugin enabled, those one-off hiccups become silent recoveries instead of hard stops, saving the repeated manual copy-paste-resend ritual that otherwise interrupts a long production run.
Use Cases
- A multi-step agent workflow hits a mid-run timeout or 429; the plugin takes over after the official 5 retries and keeps going
- openai-codex routing repeatedly throws Codex overloaded or 5xx bursts; failures recover silently without manual resend
- SSE streams drop mid-response or return truncated JSON; the turn is not killed as a terminal error
Best For
- Developers running long multi-step agent workflows where a dead turn means lost context
- Users on the openai-codex route whose upstream gateway experiences intermittent wobble
- Heavy DSH users who want transient failures to self-heal silently instead of requiring manual resend
Related Plugins
A method pack that makes AI coding agents plan against your real baseline, prove completion with fresh evidence, and reduce reworks and unsafe changes.
Turns the DeepSeek Harness session into a captain that builds a durable sub-agent team, splits goals into dependency-aware tasks, and coordinates work via direct messages and a live Web UI.
Gives coding agents design judgment, letting Claude Code, Cursor, and 70+ agents generate and iterate high-quality UI, presentations, and graphics right from the terminal.
Run the Pi ecosystem's plugins on DeepSeek Harness, unmodified, via a compatibility layer that implements Pi's public extension ABI on DSH's native services.