In DeepSeek Harness, session data is typically bound to a specific workspace directory. To restore the complete conversation history, subagent sessions, and associated attachments on another device, manually copying files is error-prone and hard to maintain. Below is dsh-session-migrator, a plugin that provides a visualized workflow and supports importing ZIP, JSONL, or folders by drag-and-drop to enable cross-device session migration.
Core Features¶
This plugin provides the following capabilities:
- Visual workflow: Complete the import through sidebar actions, with no need to memorize commands.
- Drag-and-drop import: Supports dragging a Harness session ZIP,
session.jsonl, or a complete export folder into the page. - Cross-device workspace mapping: Automatically rewrites the
cwdfield of imported sessions to match the directory structure on the target device. - Full session tree: Imports the root session and all descendant sessions under
subagents/<id>/session.jsonl. - Safe duplicate import: If a session with the same name already exists in the target workspace, the plugin clones the entire import tree, generates new UUIDs, and remaps lineage, never overwriting existing data.
- Attachment migration: Restores referenced PNG, JPEG, WebP, and GIF attachments and validates their content-addressed IDs.
- Harness-native validation: Decodes storage lines with
decodeStorageRecord()and validates reconstructed logs throughSession.create(), ensuring that data written to Harness is correctly formatted. - Instant original titles: Warms up the Harness projection cache during import so that the workspace list displays session titles before the sessions are opened.
- Multilingual support: The UI automatically follows the current Harness language (English and Chinese are supported).
- CLI fallback: Retains the
/session-importcommand for scripted or local workflow needs.
Installation and Enablement¶
Run the following steps on the machine running DeepSeek Harness:
git clone https://github.com/Suixin04/dsh-session-migrator.git
cd dsh-session-migrator
npm install
npm run build:client
Install into the Web configuration file:
dsh plugin --profile web add /absolute/path/to/dsh-session-migrator
After installation, restart the existing dsh web process. An Import sessions action button appears at the bottom of the sidebar.
Typical Usage¶
Visual Import¶
- Click Import sessions in the sidebar.
- Choose a ZIP/JSONL file, a complete export folder, or drag the files directly onto the Harness page.
- Select the target workspace card or drag the files onto it.
- Wait for validation and persistence to complete.
- Click Open imported session.
Command-Line Import¶
Use the workspace of the current session:
/session-import "/absolute/path/dsh-session-xxx.zip"
Specify another existing workspace:
/session-import "/absolute/path/dsh-session-xxx.zip" --workspace "/absolute/path/to/project"
Unpacked export directories or a single JSONL file are supported:
/session-import "/path/to/unpacked-export" --workspace "/path/to/project"
/session-import "/path/to/session.jsonl" --workspace "/path/to/project"
Use Cases and Notes¶
Use cases:
- Migrate full DeepSeek Harness session history between different physical devices.
- Back up session data and restore it to a new environment.
- Create a session copy in the target workspace that matches the source environment structure while preserving lineage.
Notes:
- Version requirement: The DeepSeek Harness version must be 0.1.1-rc.2 or a compatible build.
- Directory requirement: The target workspace directory must already exist on the target host.
- File scope: Session exports do not include project files (such as Git repository files); migrate the project separately with Git or another synchronization method.
- Sensitive data: Session exports may include complete prompts, responses, system context, tool calls, absolute paths, and images. Treat them as sensitive data.
- Limit checks: The plugin enforces archive, JSONL, and entry-count limits; it rejects unsafe paths, duplicate entries, malformed logs, duplicate IDs, and circular lineage.
- Persistence mechanism: Harness persistence is append-only. If the plugin fails during writing, a successfully committed prefix may remain. Importing again after a partial write creates an entirely new cloned tree.
- Migration scope: This plugin migrates only session state and referenced images; it does not migrate repository files, credentials, model provider settings, or external service configurations.