dsh-agent-delegate
Run the following command in DeepSeek Harness:
dsh plugin install xingyingyuzhui/dsh-agent-delegate
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install xingyingyuzhui/dsh-agent-delegate in your DeepSeek Harness terminal to install the plugin; the full source code is available at https://github.com/xingyingyuzhui/dsh-agent-delegate .
About this plugin
Multi-agent workflows drift out of bounds quickly: delegation depth goes uncounted, roles spread without guardrails, and parallel writes collide on the same tree. dsh-agent-delegate layers a strict delegation boundary on top of DSH's native ctx.subagents—no control-panel UI, pure policy enforcement. It counts real parent-chain depth and hard-rejects any call beyond policy.delegation.maxDepth. Every child must match a role in the delegation.roles allowlist, and its effective policy is the intersection of parent and child (tighter wins). By default at most four unfinished children run concurrently, handoff payloads are capped at 64 KiB, and a parent's new task generation immediately invalidates stale child reports.
Write-type children and background write tasks are assigned an isolated Git worktree while the main session and foreground bash keep writing to the project root, so concurrent edits never collide. On creation the worktree inherits the parent's uncommitted changes and non-ignored untracked files. When a child finishes, its diff against the seed commit is saved as a patch file with status pending—it is never auto-merged. The parent agent calls delegate_handoff to accept (git apply, falling back to --3way), reject, or list outstanding handoffs; a merge failure is flagged as conflicted and the parent tree is left untouched. Read-only roles such as research and reviewer are denied file operations outright when the sandbox reports partial, with no graceful downgrade.
This plugin is best suited for developers and small teams already running multi-agent collaboration in DSH who need explicit, auditable governance over sub-agent behavior. It adds no UI, does not alter foreground interaction, and removing it instantly restores DSH's native sub-agent behavior with zero residue.
Use Cases
- Enforce depth and role boundaries on delegation chains to stop privilege creep
- Assign isolated Git worktrees to parallel write-type children to eliminate merge collisions
- Replace unsafe auto-merge with a patch-based handoff gated by explicit parent acceptance
Best For
- Developers running multi-agent DSH workflows who need explicit subagent governance
- Small and mid-size teams that require auditable delegation paths and strict write denial
- Engineering teams that want foreground/background write isolation with zero-residue rollback
Related Plugins
A method pack that makes AI coding agents plan against your real baseline, prove completion with fresh evidence, and reduce reworks and unsafe changes.
Turns the DeepSeek Harness session into a captain that builds a durable sub-agent team, splits goals into dependency-aware tasks, and coordinates work via direct messages and a live Web UI.
Gives coding agents design judgment, letting Claude Code, Cursor, and 70+ agents generate and iterate high-quality UI, presentations, and graphics right from the terminal.
Run the Pi ecosystem's plugins on DeepSeek Harness, unmodified, via a compatibility layer that implements Pi's public extension ABI on DSH's native services.