AI Agent Hub
Back to plugins
dsh-concurrency-guard preview

dsh-concurrency-guard

Workflow Updated 2026.09.02

Run the following command in DeepSeek Harness:

dsh plugin install fu827707013/dsh-concurrency-guard

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

Run dsh plugin install fu827707013/dsh-concurrency-guard in DeepSeek Harness to install the concurrency monitor and request-gating plugin. Full source: https://github.com/fu827707013/dsh-concurrency-guard

About this plugin

Running main sessions, sub-agents, and workflow-derived tasks in parallel through DeepSeek Harness means every model request flows through the same bus. The moment in-flight concurrency crosses a provider or relay API threshold, 429 rate-limit errors and even account bans follow, and it is nearly impossible to tell which session is hogging the slots. dsh-concurrency-guard exists for exactly this: it hooks the single llm/stream entry point in DSH, tracks every in-flight call (chat turns, sub-agents, compression, title generation, and any request triggered by a plugin), and gently parks subsequent requests in a FIFO queue once the concurrency ceiling is reached, preventing over-limit calls at the source.

Three layers of capability work together. The global latch (default cap of 5, hot-adjustable) guarantees that new requests queue up when the pool is full and never overshoot; a fail-open timeout ensures no request is permanently stuck. Session-level concurrency control aggregates requests by root session, including parent-chain resolution for sub-agents, and lets you set, pause, or clear per-session caps in real time without restarts, while auxiliary calls like compression and titles are exempt by default to avoid collateral throttling. The observability layer, a real-time WebUI panel with gauge cards, a concurrency water bar, daily statistics, classified error breakdowns (rate-limit, timeout, network, interruption, auth, etc.), session activity tables, and a rolling recent-completions list, persists everything to a state file so data survives restarts.

Built for anyone driving multi-agent pipelines, high-frequency conversations, or workflow-heavy workloads in DSH, particularly when calling APIs through a relay that enforces strict concurrency limits. Zero external dependencies, pure Node built-ins, install and go.

Screenshots

Use Cases

  • Prevent 429 rate-limit and account-ban errors when multiple agents run in parallel
  • Set per-session concurrency caps so high-priority tasks are not starved by idle sessions
  • Inspect in-flight requests, classified error breakdowns, and session activity at a glance

Best For

  • Developers driving multi-agent or workflow-derived pipelines in DSH
  • Ops and SRE teams calling APIs through a relay with strict concurrency enforcement
  • Teams that need real-time request visibility, error analytics, and restart-proof statistics