Preface¶
In DeepSeek Harness (DSH), a session’s “which workspace it belongs to” is not a field that can be changed in the sidebar; it is derived from the cwd in the session log header. The host has no move / reassign API, nor does it accept sessions whose project directory is inconsistent with the cwd in the log. The common scenario is: after manually moving or deleting the project directory, the old session becomes “Ungrouped” in the sidebar, and in severe cases, loading reports corrupt session log. When switching machines, switching drive letters, or having multiple clones of the same repository at different paths, copying folders alone often fails to match the host’s rules when you want to bring sessions along or align their ownership.
The following introduces the community plugin dsh-session-manager (npm: @he0119/dsh-session-manager, maintainer he0119, SkillHub category: Memory). It orchestrates “modifying the cwd in the header, moving the log directory, and making the host accept the new ownership” into operations that can be previewed, confirmed, and rolled back at the byte level. It also supports exporting/importing sessions as .dshsess packages and syncing between multiple machines via WebDAV.
What Is This¶
dsh-session-manager is a session management plugin for DSH: it adds a “Session Management” page under Settings for daily organization of the session library; at the same time, it exposes several tools to the model, allowing natural language to be used to preview before writing to disk. On the sync side, only .dshsess packages are stored remotely; when pulling, the cwd is rewritten to the directory on the current machine according to the path mapping in the configuration, so the same project can interoperate between two machines with different paths.
The plugin integrates with the host through Cordis patches and targets the Web / desktop profile settings interface; disk write operations uniformly go through “read-only plan → user confirmation → execute”, and model tools are invoked as two plan / apply calls.
Core Features¶
The capabilities explicitly stated in the documentation can be summarized into four types of entry points (four tabs in the settings page + model tools), and the migration orchestration shares the same code between the UI and the tools.
Settings → Session Management¶
| Tab | Purpose (excerpted from README) |
|---|---|
| Sessions | Browse the entire library grouped by directory; filter and search; archive / unarchive, regenerate names, view the full timeline, delete; after checking entries, use “Migrate” in the action row to move them to the target directory |
| Transfer | Export / import .dshsess session packages |
| Sync | Sync with the remote according to the WebDAV configuration |
| Backup | Roll back or restore disk write operations performed by the plugin |
Migration addresses the issue of “the session’s cwd ownership is inconsistent with the log directory on disk”: multiple sessions can be checked across directories, and a target project directory can be selected at once; when the source directory has been deleted from disk, as long as the log is still in the library, it can still be checked and migrated to the reconstructed path. Subagent sessions are deleted / moved / exported together with their parent sessions and cannot be selected separately. Sessions still open in the host’s memory (marked as “Active” in the list) are excluded from the plan and require restarting DSH before migration. Each migration rewrites the cwd of the first frame of each log, moves the session directory, updates the workspace registry, and leaves a byte-level backup.
Export generates a .dshsess package: it contains the raw bytes (with sha256) of all generations of logs of the selected sessions, as well as log-referenced image / file objects (from $DSH_HOME/attachments/); it does not contain ordinary project files created by the session. Import is completed on the “Transfer” tab, and the process also has preview and progress.
Delete first backs up to the plugin backup root, then deletes the session directory; accidental deletions can be restored on the “Backup” tab.
Regenerate names asks the host’s name service to recalculate the title based on the entire conversation; manually renamed sessions are skipped by default (the API supports includePinned: true, but the interface does not expose this switch).
The list also allows viewing the full content of a single session (messages, tool calls, thinking and other timelines), including blank, archived, and subagent sessions that are not visible in the sidebar.
Five Model Tools¶
The README states that in addition to the settings page, there are 5 model tools: you can directly say “move the sessions of this workspace to ~/dev/xxx” or “sync with the remote”, and the model will preview before writing to disk, using the same migration logic as the popup confirmation.
Installation and Activation¶
It is recommended to install from npm (the repository states that github: installation is not supported: lib/ is not committed, and the git installation method cannot obtain the build artifacts):
# Use the host's own plugin command: it will create/populate the profile for you, and maintain dependencies and the lockfile
npx @deepseek-ai/dsh@next plugin --profile desktop add @he0119/dsh-session-manager
# Then restart DSH
The host version must be 0.2.0-rc.1 and later 0.2.x (engines.dsh and peer are both ^0.2.0-rc.1). If the running DSH version falls outside the peer range, the entire profile bundle will be skipped (you can see skipping profile bundle … is incompatible with dsh … in the logs).
After installation and restart, Session Management will appear in the left navigation of Settings (after the official pages). The current npm package version is 0.6.4 (subject to package.json).
For local development, install from the path after building (requires pnpm install && pnpm run build first):
pnpm install && pnpm run build
npx @deepseek-ai/dsh@next plugin --profile desktop add /path/to/dsh-session-manager
# Then restart DSH
Typical Usage¶
Scenario 1: Project directory is moved or deleted and reconstructed
- Open Settings → Session Management → Sessions.
- Use grouping, filtering, or searching to find the sessions you want to keep (those falling in “Ungrouped” often have
cwdstill pointing to the old path). - Check the entries, click Migrate in the action row, and select an existing target directory in the popup (can share the directory selector with the “Transfer” tab; you can fill in a new workspace name, and whether to also move files created by the session).
- Read the read-only preview (number of sessions, registry changes, backup location, items that cannot be moved and their reasons), then confirm and execute; if it prompts you to restart DSH, follow the instructions on the page.
Scenario 2: Switch machines or backup
- On the Transfer tab, check the sessions you want to take (you can check entire groups via the directory group header), and Export to get a
.dshsessfile. - On another DSH with this plugin installed, Import the package, and confirm the landing directory according to the preview.
Scenario 3: Multi-machine sync
- On the Sync tab, configure WebDAV (specific fields are subject to the plugin interface and documentation).
- Execute sync: the remote stores
.dshsess; when pulling, rewrite thecwdto the local path according to the mapping before importing.
The disk write buttons (delete, migrate, import, sync, rollback) each have one confirmation popup per operation; during execution, progress is shown except for export, and cancellation mid-way may leave an incomplete state in the library, so the documentation suggests not canceling during the landing phase.
Applicable Scenarios and Notes¶
Who it’s for: Developers who accumulate a large number of sessions in DSH over the long term, need to organize and archive, migrate project paths, align sessions between multiple development machines, or want to use WebDAV for session package synchronization.
Permissions and security: The plugin reads and writes the session library, attachment directory, and backup directory with the permissions of the current DSH process, and can execute deletion and migration according to your confirmation. Before installation, it is recommended to review the GitHub repository source code and license (the README lists the LICENSE file), and only install npm packages from trusted sources.
Behavior constraints (to avoid misoperations):
- Manually moving folders without changing the log
cwdleads to unpredictable host behavior; the plugin’s migration or import flow should be used instead. - Sessions currently “Active” need to have DSH restarted before deletion or migration.
- For rules regarding subagents, forked sessions, archived / blank sessions, etc., see the “Sessions” and “Migration” sections of the README; migration by default only processes sessions visible in the sidebar, and those checked but unable to be moved will be separately explained in the preview.
The community plugin directory SkillHub has no official affiliation with DeepSeek / Hundsun; the DSH ecosystem principle is “everything is a plugin”, and this package is one of the session library governance tools among them.
Conclusion¶
dsh-session-manager turns the three most difficult things to handle manually in the DSH session library—cwd and directory consistency, physical moving of session directories, and workspace registry updates—into a process that can be previewed and rolled back, and complements export/import and multi-machine sync with .dshsess and WebDAV. If you are troubled by “Ungrouped” sessions or corrupt logs, you can start by installing the npm package and opening the “Session Management” page in Settings.