dsh-subagent-cleanup
Run the following command in DeepSeek Harness:
dsh plugin install Momojie-S/dsh-subagent-cleanup
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install Momojie-S/dsh-subagent-cleanup in your DeepSeek Harness terminal to install this plugin; the source is available at https://github.com/Momojie-S/dsh-subagent-cleanup, and a DSH restart is required afterwards.
About this plugin
Long-running autonomous sessions keep spawning sub-agent conversation records, yet DSH only offers archival and hiding today. The session.list count never actually shrinks, and the official README calls deletion a future product decision. A measured 664 entries already cost roughly one second and 880 KB in the Web GUI, so accumulation of dozens or hundreds of stale records quickly becomes a real performance drag. This plugin fills that gap.\n\nIt exposes two model-callable tools. subagent_cleanup performs self-cleanup scoped to the current session, enumerating its sub-agents and deeper descendants and acting only on settled records while skipping anything still running or mid-flush. subagent_cleanup_global performs a cross-workspace sweep, identifying cold records by directory shape and supporting workspace-substring filters plus parent session ID targeting. Both default to reversible archiving with a manifest path, optionally permit permanent deletion, and support a dryRun preview mode.\n\nIdeal for researchers running extended autonomous sessions, ops teams clearing stale sub-agent piles across multiple projects, and anyone noticing DSH slow down as the session list grows. Install it, restart DSH, and you are ready to go with zero extra configuration.
Use Cases
- Cleaning up sub-agent conversation records at the end of a long autonomous session
- Sweeping cold sub-agent records across workspaces idle beyond 24 hours
- Diagnosing Web GUI lag caused by a bloated session.list
Best For
- Researchers running extended autonomous sessions where sub-agent records keep piling up
- Ops engineers periodically sweeping stale sub-agent records across multiple projects
- Users experiencing DSH slowdown from a growing session list and wanting to reclaim space
Related Plugins
Traceable, searchable cross-session memory for AI agents that turns conversation knowledge into a typed knowledge graph and recalls relevant subgraphs instead of replaying full history, natively integrated with DeepSeek Harness.
Gives DSH AI cross-session long-term memory, to-do and skill management, plus multi-session orchestration, external AI delegation, and an infinite canvas that grows with you.
dsh-mnemon is a three-tier, pluggable, Agent-driven memory system for DeepSeek Harness, combining Runtime memory, Project Documents, and replaceable Memory Spaces with nine long-term providers.
An opinionated, zero-infrastructure file-based memory protocol: human-readable markdown files plus a bounded always-loaded index, curation discipline, and no database or embeddings.