AI Agent Hub
Back to plugins
🖥️

dsh-plugin-subagent-delete

Client Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install heiheiha798/dsh-plugin-subagent-delete

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

Run dsh plugin install heiheiha798/dsh-plugin-subagent-delete in DeepSeek Harness to install the plugin from https://github.com/heiheiha798/dsh-plugin-subagent-delete, then restart the profile and start a new session to pick up the three tools.

About this plugin

DSH's built-in subagent control surface only exposes send_message, interrupt_agent, and list_agents. There is no endpoint to delete or release a subagent, so finished one-shot sessions and stale continuable ones keep piling up in the web sidebar with no way to clean them out.

This plugin injects three model-callable tools into the calling session. list_subagents returns the full descendant tree with id, mode, activity, depth, and parent linkage. delete_subagent performs an ownership-verified, child-first permanent removal: it stops the live agent, drains any resident continuation, flushes and detaches the session, deletes the on-disk log directory, clears the projection-cache row, and strips the workspace accounting entry, refusing the call if the target still has children unless recursive is explicitly set. release_subagent halts the current turn and drains the resident continuable activation while preserving the durable transcript, so the subagent can be resumed later with send_message.

Because DSH has no symmetric client contract for subagent deletion, the plugin publishes a short-lived marker session through the official prepare-enter-announce-detach seam. The bundled web component watches the public sessions snapshot and, once the marker disappears, debounces and calls sessions.refresh plus refreshSubagents for affected parents, so open browser tabs update the subagent count instantly with no page reload. Ideal for power users who spawn subagents frequently and need to clean up or pause them on demand.

Use Cases

  • Clean up finished one-shot subagents to keep the web sidebar tidy
  • Pause a continuable subagent while preserving its transcript for later resumption
  • Orchestrate subagent deletion or release via HTTP routes from external scripts

Best For

  • Power users who spawn subagents frequently and need on-demand cleanup
  • Developers building automation around DSH subagent lifecycle
  • Web-profile admins who want real-time sidebar sync without manual reload