dsh-fork-relink
Run the following command in DeepSeek Harness:
dsh plugin install Enosensu/dsh-fork-relink
Paste the following prompt into your AI chat to install this plugin:
Install this plugin in DeepSeek Harness by running dsh plugin install Enosensu/dsh-fork-relink; the source code is available at https://github.com/Enosensu/dsh-fork-relink .
About this plugin
DSH's fork operation inherits conversation history under a new session ID, but sub-agents attached to the old parent session do not follow automatically. The sub-agent panel on the new branch ends up empty, and all working records appear to vanish even though they are still on disk, just detached from the new conversation. dsh-fork-relink exists to solve exactly this: it listens to the official session/created event and, the moment a forked child session enters the store, it calls the official agents.create API to build a full clone of every direct sub-agent from the old session and attaches them to the new parent.
The clone is not a mere reference. The seed is a line-by-line copy of the original sub-agent's complete persistent log, agentOptions inherits the provider and model from the descriptor, and meta fields such as parentSession, origin, and delegationDepth are written correctly at creation time. Composition is injected via the official agentPresets.composeFrom entry point. The entire sub-agent tree is cloned recursively, and each clone is released as a cold session immediately after persistence to avoid write-lease conflicts that would block message delivery. Running sub-agents and seed-orphans (abandoned branches) are safely skipped.
This plugin is ideal for DSH users who frequently fork branches and have sub-agents attached to their sessions. The semantics are copy, not move: the old branch keeps using the original sub-agents, the new branch uses the clones, and both branches operate independently. The sub-agent cloning path has zero external dependencies and zero file rewrites; everything goes through the official API, so any entry point that performs an official fork is covered.
Use Cases
- Sub-agent panel is empty after forking; the full sub-agent tree needs to be auto-cloned onto the new branch
- Multiple branches advancing in parallel, each retaining independent sub-agent copies without cross-interference
- Deeply nested sub-agent trees that must be recursively cloned in their entirety when a session is forked
Best For
- Developers who make heavy use of DSH's fork/branch feature
- Power users whose sessions carry multi-level sub-agent hierarchies
- Collaborative teams that need sub-agent isolation across parallel branches
Related Plugins
A service-oriented sidebar framework for DSH, offering a full workbench with file explorer, embedded browser, real terminal, Git panel, and extensible plugin services.
A beautiful, practical Claude Code-style TUI plugin with pixel whale top bar, flowing glow title, real-time status line, streaming thought expansion, time rewind, context progress bar and TPS gauge — zero core changes.
The plugin market for DeepSeek Harness: browse/search/one-click install community plugins and themes, with updates, backup/restore, hot disable, diagnostics, and AI fix.
A persistent whale widget on the DSH web UI that shows DeepSeek balance, today's usage, and per-turn cost, with drag-and-snap and sound effects.