Preface¶
Running agents in DeepSeek Harness (DSH), sessions accumulate along with working directories, archive states, and run statuses. The official sidebar allows opening and switching sessions, but deletion often just archives and hides them. Operations like trash, statistics, pause rounds, workspace grouping are scattered across different entry points or require directly browsing log directories. After long-term use, bloated lists, difficulty in recovering from accidental deletions, and uncontrollable timing of context compression are common pain points.
Below, we introduce the community plugin dsh-session-manager (maintainer dream12347). Without modifying DSH’s core, it provides a unified session management interface in the settings page and at the top of conversations, covering deletion with trash, statistics, continue/pause, log directory, workspace grouping and sorting, as well as global context compression thresholds.
What It Is¶
dsh-session-manager is a client-side plugin for DSH (platform: web), injecting a “Session Management” section and quick entry points at the top of conversations into the web UI via official slots. The host layer registers routes for deletion, recovery, permanent deletion, pausing, opening folders, compression thresholds, etc.; the client layer subscribes to standard data sources like useSessions / useWorkspaces to draw lists and drawers.
The plugin does not modify system prompts or add new model tools, having no additional impact on tokens or model behavior. Current version is v0.2.2, compatible with DSH 0.1.1-rc.1.
- Directory page: https://www.skillhub.cn/plugins/dream12347/dsh-session-manager
- GitHub: https://github.com/dream12347/dsh-session-manager
Core Features¶
Settings Page “Session Management” Section¶
After installation, a Session Management section, at the same level as Notifications, appears on the left side of the settings page. The main list displays unarchived sessions (title, working directory); a collapsible area at the bottom separately lists archived sessions, with support for one-click restoration.
Each row is operable:
- Continue Session — Opens and enters the conversation while closing the panel.
- Pause — Stops the current round of a running session.
- Statistics — Displays a centered modal with recent activity (rounds, user messages, assistant messages, all tool calls, activity window).
- Folder — Opens the session’s log directory in the system file manager.
- Delete — Moves the session to the trash (deletable if not running; can also delete currently open and idle sessions).
The trash retains the 10 most recent deletion records, automatically clearing the earliest one when exceeded. Within the trash, you can restore (back to the session list) or permanently delete (irrecoverable). Deletion first goes through the official archive channel, causing the session to immediately disappear from the sidebar.
Quick Entry Points at Conversation Top¶
Three new entry points appear at the top-right of any conversation page (to the left of Session log):
- Conversation Management — Opens the right-side session management drawer (full list + archived + trash); the pin can keep it persistent, clicking outside automatically collapses it.
- Trash — Opens the drawer and directly expands the trash section.
- Delete This Conversation (red) — After confirmation, moves the current conversation to the trash.
Within the drawer row, the “More” menu includes statistics, folder, and Continue in New Chat (calls the official sessions.fork to fork a sub-session and open it).
Unread / Read Status¶
A dot next to the session row title indicates four states:
| Color / Shape | Meaning |
|---|---|
| Blue | Manually marked unread |
| Amber | Official awaiting input |
| Green | Official completion reminder |
| Spinning | Running |
Clicking an amber or green dot marks it as read locally (without navigation); clicking a blue dot clears unread; clicking the blank area marks it unread; opening a session automatically marks it read. The official sidebar also displays blue unread dots next to corresponding session rows (matched by title text; sessions with duplicate titles share the dot, while the drawer precisely marks based on real id). The manually unread set is saved in a shared key dsh.session-unread.v1 in the browser’s localStorage, interoperable with other session management plugins.
Workspace Grouping and Sorting¶
Sessions are grouped by workspace, sorted by last use time within each group, with toggles for newest first / oldest first. Dragging a workspace title adjusts order: placing above or below a group inserts, placing on the title swaps, dragging to the bottom moves to the end. Hovering over a workspace title shows Pin to Top, Rename, Delete (with double confirmation; per official definition, only removes from the list, preserving folders and session records; the session moves to “Ungrouped”).
Context Compression Threshold¶
A new “Context Compression Threshold” slider (17%–90%) is added in Settings → General Settings. When the conversation context reaches the set percentage of the model window (1 million tokens), compression triggers automatically, preserving 16% of the original text each time. Changes take effect immediately after saving (including open sessions), applying uniformly to all agent presets, and persist after restart. The threshold is persisted in DSH’s storage domain; the host writes compression engine configurations for each preset in the agent/pre-step hook.
Sub-Agents and Deletion Restrictions¶
Sub-agent sessions support deletion when not running, including “orphan sub-agents” after the main session is deleted. Sessions currently thinking cannot be deleted (button disabled); in multi-tab scenarios, confirm the session has been stopped elsewhere first. After deleting a live session, the in-memory state is thoroughly cleaned upon DSH restart.
Installation and Enabling¶
Install from GitHub (official README commands):
dsh plugin --profile web add 'github:dream12347/dsh-session-manager#v0.2.2'
Windows CMD:
dsh plugin --profile web add github:dream12347/dsh-session-manager#v0.2.2
From a local directory:
dsh plugin --profile web add /absolute/path/to/dsh-session-manager
From a tarball (after pnpm pack):
dsh plugin --profile web add /absolute/path/to/dsh-session-manager-0.2.2.tgz
After installation, restart dsh web (host plugins and client bundles require restart to load).
Typical Usage¶
Cleaning and Restoring Sessions in Settings¶
- Open Settings (gear icon) at the bottom of the sidebar.
- Click Session Management on the left.
- For unwanted sessions, click Delete → go to the Trash collapsible area at the bottom.
- If deleted by mistake, Restore within the trash; if confirmed unnecessary, Permanently Delete.
- Expand Archived Sessions to restore sessions previously archived officially.
Quick Management During Conversation¶
Click Conversation Management at the top-right of the conversation page to open the drawer; pin it to keep browsing the full list continuously. Click Trash to directly handle recently deleted items; the red Delete This Conversation moves it to the trash with one click.
Adjusting Compression Timing¶
- Settings → General Settings.
- Adjust the “Context Compression Threshold” to 17%–90%.
- Changes take effect immediately after saving, with no need for per-session configuration.
Applicable Scenarios and Notes¶
Who is it for: Developers maintaining multiple workspaces and sessions over time in the DSH web interface; users needing trash-style deletion, activity statistics, pausing rounds, forking sub-sessions, workspace sorting, or unified control of context compression ratios.
Runtime Permissions: The plugin runs with the current dsh process permissions. Operations like deletion, opening folders, reading/writing ~/.dsh/storages/dsh_delete_session.json and ~/.dsh/dsh-delete-session-trash/ are constrained by this permission. Before installation, review the source code and license (the repository includes LICENSE) to confirm compatibility with local security policies.
Compatibility: Currently compatible with DSH 0.1.1-rc.1, depending on slots like settings.section, conversation.session.header.utilities, and services like ctx.sessionPersistence, ctx.workspaceRegistry, ctx.agents. If DSH upgrades change APIs, the plugin will need to wait for synchronization.
Known Limitations: Cannot delete running sessions; sidebar unread dots match by title, causing duplicate-titled sessions to share blue dots; permanently deleted session IDs remain in browser localStorage (preventing “resurrection” on refresh), which is harmless residue.
Conclusion¶
dsh-session-manager consolidates DSH Web’s scattered session operations into the settings section and the conversation-top drawer: deletion with trash, statistics and pausing, workspace grouping and sorting, global compression thresholds—all implemented via official slots without modifying the core. If you have high daily session volume and need recoverable deletion with finer list management, install v0.2.2 via the commands above and restart dsh web.
- Directory page: https://www.skillhub.cn/plugins/dream12347/dsh-session-manager
- GitHub: https://github.com/dream12347/dsh-session-manager