AI Agent Hub
Back to plugins
⚙️

dsh-session-reattach

Workflow Updated 2026.09.14

Run the following command in DeepSeek Harness:

dsh plugin install cnkids/dsh-session-reattach

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

Run dsh plugin install cnkids/dsh-session-reattach in your terminal to install this plugin; the project source is available at https://github.com/cnkids/dsh-session-reattach .

About this plugin

A DSH session that was created before its workspace existed, or that moved to a different directory, can end up permanently unassigned in the sidebar with no built-in way to fix it. dsh-session-reattach closes that gap: drag a session from the ungrouped pile into its correct workspace, or run the host-level /reattach command (no tokens, no model in the loop) to preview and then apply the reassignment. Matching is done via fs.realpath on both the session cwd and the workspace path, so trailing slashes, dot segments, symlinks, and case-insensitive volumes are all normalized before comparison; the five non-matching reasons each get their own clear message. The plugin writes through the host attachSession / detachSession APIs only, never touches session files, ships zero runtime dependencies, and defaults to a dry-run that reports what would change before asking you to apply. It is built for DSH users who have accumulated ungrouped sessions across project moves and want a safe, auditable, single-purpose reattachment step that leaves the rest of their workflow untouched.

Use Cases

  • Reattach orphaned sessions after a project directory move via drag or command
  • Batch-clean the ungrouped sidebar section with a dry-run preview before applying
  • Handle subagent session ownership separately with an explicit flag

Best For

  • Developers switching across project directories in DSH who accumulate ungrouped sessions
  • Technical users who want auditable, dry-run-by-default operations with zero runtime deps
  • DSH users who prefer minimal, non-invasive fixes driven by drag-and-drop with a command fallback