AI Agent Hub
Back to plugins
⚙️

dsh-llm-net-retry

Workflow Updated 2026.08.26

Run the following command in DeepSeek Harness:

dsh plugin install fan56/dsh-llm-net-retry

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install fan56/dsh-llm-net-retry in the DeepSeek Harness terminal to install; the source is available at https://github.com/fan56/dsh-llm-net-retry

About this plugin

When routing LLM calls through an OpenAI-compatible gateway (e.g. OpenCode Zen), transient upstream connection drops often surface as a stream-level finish_reason: "network_error" rather than as an HTTP error or timeout. dsh's native retry policy buckets such failures as non-retryable, so the entire agent turn—including subagent turns—hard-fails even though an immediate re-send almost always succeeds. dsh-llm-net-retry fills that gap: it sits at the very tail of the agent/request-error waterfall and only acts when every upstream listener (including dsh-llm-retry) has declined and the failure message clearly matches a network_error variant, then schedules a bounded exponential-backoff retry.

The plugin is zero-invasive by design—no monkey-patch, no service replacement, and no disk state or settings residue after unload. Until the upstream fix lands in dsh proper, it is the only available safety net for this class of gateway hiccups; once the fix merges, it simply stays quiet, because its trigger condition requires the native policy to have already abstained. Retry events follow the existing llm/retry schema, so the TUI picks them up with no modification, and the counter uses its own net-retry policy key so it never pollutes dsh-llm-retry's budget.

Ideal for developers running dsh ≥ 0.1.2-rc.1 agent workflows through an OpenAI-compatible gateway: if your subagents keep dying on "network_error" for reasons that a single re-send would resolve, this plugin quietly turns those otherwise unrecoverable drops into routine retries.

Use Cases

  • Upstream transient disconnects behind an OpenAI-compatible gateway surface as finish_reason network_error, hard-failing the entire turn
  • Subagent turns are killed because the native policy classifies network_error as non-retryable, yet a single re-send would succeed
  • Gateways report upstream connection faults as a stream-terminating finish_reason instead of an HTTP or transport-layer error

Best For

  • Developers running dsh 0.1.2-rc.1+ agent workflows who hit unexplained turn failures behind a gateway
  • Teams routing LLM requests through OpenAI-compatible gateways (e.g. OpenCode Zen) and suffering from transient upstream drops
  • Users who want bounded backoff retry for network-class faults without patching dsh core or replacing any service