heiheiha798/dsh-plugin-subagent-delete

Adds the missing subagent lifecycle interface to DSH: delete_subagent permanently removes a subagent session and drops it from the list, release_subagent stops one without deleting its transcript, and list_subagents lists the calling session's descendants including finished one-shot subagents. It also refreshes open web clients after a permanent delete without a manual page reload.

dsh-plugin-subagent-delete fills a gap in DSH's subagent control surface, which otherwise provides only send_message, interrupt_agent and list_agents and leaves finished one-shot and stale continuable subagents accumulating in the web UI list. It adds three model-callable tools plus optional HTTP routes: list_subagents lists the calling session's descendant subagents (with mode, activity, depth, parentId, hasChildren and whether the durable artifact is still stored, and an unreadable marker for a branch that could not be read); delete_subagent permanently removes a subagent — verifying the target is a descendant, draining live children through the official ctx.subagents.drainChildren seam, detaching the session, removing the on-disk log directory (both uuid spellings), the session_projcache row, workspace accounting and the archive set — refusing a target with descendants unless recursive: true and reporting already_absent for a gone subtree so a recursive delete never aborts half-way; and release_subagent stops and releases a resident child Activation while keeping the durable transcript resumable. For the web UI, after every permanent delete the host publishes a short-lived marker session that the bundled client watches, and on its removal debounces 350 ms and refreshes the affected sessions and projections, so open clients drop the deleted subagent without a manual reload (the marker's _no-cwd artifact is swept after detach).

Agent Capabilities ★ 0
View on GitHub ↗

Install

dsh plugin --profile web add github:heiheiha798/dsh-plugin-subagent-delete

Copied verbatim from the README's Install block, which also shows a pinned-release form (github:heiheiha798/dsh-plugin-subagent-delete#v0.2.2) and a local-checkout form (dsh plugin --profile web add /path/to/dsh-plugin-subagent-delete). The README says to restart the profile, then start a new session to gain the three tools.

Compatibility

Compatibility shims keep DSH 0.2.0-rc.2 and the >=0.1.0-rc.8 <0.2.0-0 line working alongside the verified 0.2.1-alpha.2. The web UI auto-refresh uses the official prepare → enter → announce → detach lifecycle seam and adapts to the current dsh face (pre-0.2.1 releases used sessions.refreshSubagents(parentId) and are still supported).

Details

Alternatives

030611/dsh-telemetry-redactor · 173787247/dsh-wsl-env · acnlabs/dsh-plugin-acn

More plugins in Agent Capabilities

Browse more in Agent Capabilities

Guides for Agent Capabilities plugins