In DeepSeek Harness (DSH), moving a workspace session that contains multiple subagents, media, and files to another instance usually involves copying multiple files and manually configuring things. The dsh-session-port plugin packages a session along with all its references (logs, subagents, media, workspace) into a ZIP so it can be fully restored in another DSH instance.

Plugin Overview

The plugin is maintained by seth-hg and is designed to solve problems with session migration and persistence. It packages session data in a structured way, supporting export and import.

Core Features

  • Export: Packages the session and its references into a ZIP, including the root log, subagents, media, and referenced workspace files.
  • Import: Restores the session, media, and files, and automatically reconnects them to the workspace.
  • Repair: Reconnects an imported session and recollapses titles, fixing “ungrouped” or lost-name issues.

Installation and Activation

The plugin requires Node.js >= 22.10 and pnpm (dsh plugin uses pnpm under the hood).

  1. Install it using the official command:
    dsh plugin --profile web add "github:seth-hg/dsh-session-port"
  1. After installation, restart dsh web to see the Export/Import buttons in the session title bar.

Typical Usage

Through the Session Title Bar

  • Export: Clicking it downloads session-port-<id>.zip.
  • Import: Select a .zip file to restore it to the current session’s workspace (i.e., the header cwd).
    • Import also accepts DSH’s built-in session-log export (this export does not include workspace files, so those files are not expected during import).

Through HTTP Routes

The following endpoints require a loopback-trust environment.

  • Export: Stream-download the ZIP.
    curl 'http://127.0.0.1:3080/wsx/session-pack?sessionId=<id>&scope=referenced' -o out.zip
  • Import: Restore the archive file.
    curl -X POST 'http://127.0.0.1:3080/wsx/session-pack/import?workspace=/path/to/workspace&remap=/old::/new' \
      --data-binary @out.zip
  • Repair: Reconnect and repair the title.
    curl -X POST 'http://127.0.0.1:3080/wsx/session-pack/repair?sessionId=<id>'

Use Cases and Notes

  • The plugin runs with the permissions of the current DSH process. Review the source code and license (MIT) before installing.
  • Ensure trust when using HTTP routes.
  • The import function accepts DSH’s built-in session-log export. This export does not include workspace files, so those files are not expected during import.

Following the steps above allows you to fully migrate DSH sessions across different environments. For more details, refer to GitHub.