Introduction

A deployment-level plugin for DeepSeek Harness (DSH) that centrally manages all sessions on the “Session Management” page in Web Settings. It addresses the issue of managing archiving, deletion, and batch operations separately in the native interface. It supports restoring archived sessions, deleting sessions, grouping by workspace, and multi-select batch operations.

Core Features

Restore Archived

Moves archived sessions back to the sidebar. The plugin synchronizes all browser pages in real time via the platform host/archived-sessions-changed frame.

Delete Session

The deletion process has three steps: removing workspace bookkeeping, hiding the session from the archive set, and deleting disk logs.
* Inactive sessions: Deleted immediately.
* Running sessions: After hiding, they are automatically deleted once the session stops (after a page refresh or a 60-second scan).

Batch Operations

Supports multi-select deletion, delete selected, delete all archived, delete all, and restore all archived.

Group by Workspace

The list includes ungrouped items. Each row can be archived, restored, or deleted (deletion requires a secondary confirmation).

State Persistence

Deletion and pending-deletion records are written to .session-manager-state.json. After the plugin or process restarts, this state does not automatically restore.

Installation and Enablement

This plugin depends on the dsh runtime and build environment. Direct remote installation is not supported; you must clone the repository first and then install it locally.

  1. Pull the code
git clone git@github.com:DM-Odyssey/dsh-session-manager.git
cd dsh-session-manager
  1. Install locally
    Run the following in the repository root:
dsh plugin --profile web add "$PWD"

This installs the directory as a bundle and handles its dependencies.

  1. Restart
npx @deepseek-ai/dsh web

After restarting, open Settings → Session Management to use it.

Usage

  1. In the sidebar (native three-dot menu), archive unwanted sessions.
  2. Open Settings → Session Management.
  3. Single operations: For each row, you can archive, restore, or delete it (deletion requires a secondary confirmation).
  4. Batch operations:
    * Select all
    * Restore all archived (N)
    * Delete all archived (N)
    * Delete selected (N)
    * Delete all

Notes and Security

  • Deletion mechanism: Deleting a session involves removing workspace bookkeeping, hiding the session from the archive set, and deleting the disk log directory. Log paths are strictly validated; only directories containing session.jsonl[.zstd] named after the session ID can be deleted.
  • Orphaned IDs: Orphaned IDs in the archive set (sessions whose logs no longer exist) are treated as cleanup items and do not repeatedly appear again.
  • State file: Deletion records are stored in <workspace>/.session-manager-state.json. Manually deleting this file resets the records.

References