Introduction¶
In DeepSeek Harness (DSH), archiving a session is simply a set of archivedSessionIds within the workspace storage domain v2. While the sidebar offers a toggle for “Show / Show archived only” and allows unarchiving on a single row, there is no dedicated page to list archived sessions together for searching, filtering, and batch operations.
More problematic is that the DSH full stack has long lacked a public API for “deleting sessions.” Documentation for components like dsh-session-persistence explicitly states there are no deletion or retention capabilities; logic related to deletion in the repository is primarily for search index reconciliation, rather than clearing sessions from disk. If you have archived many old sessions and want to truly free up space or organize your list, there is often a lack of a clear path.
dsh-archive-manager, released by community maintainer YOGEMOW, is categorized as a “Memory” plugin in the DSH ecosystem directory. It provides a settings page similar to Codex’s “Archived chats,” designed for centralized viewing, searching, filtering, unarchiving, and performing irreversible physical deletion of archived sessions.
What is this¶
In short: A Archived Session Manager for DSH—the host side provides the archive list and deletion orchestration, while the client registers a Settings → Archived Chats entry (section id archived-sessions, consistent with the archive entry reserved in the DSH settings shell).
The current plugin version is 0.1.0, license MIT. SkillHub Directory Page: YOGEMOW/dsh-archive-manager; Source Code & Documentation: GitHub Repository.
Core Features¶
The following summarizes the capabilities described in the README; implementation is split into host HTTP routes and the client settings page.
Rich List & Filtering¶
- The host
GET /dsh-archive-manager/archivedreturns a rich list of archived sessions (title, project, time, size, running status, etc.). - The settings page supports search, range and project filtering, grouping, and row-level/batch operations.
Unarchive¶
- The host
POST /dsh-archive-manager/unarchiveunarchives sessions. The behavior is consistent with sidebar unarchiving, but operating within a centralized page is more convenient.
Permanent Deletion¶
DSH originally had no session deletion API; this plugin orchestrates deletion on the host side, including single, batch, and delete-all operations (POST /dsh-archive-manager/delete, delete-all, etc. routes). Key deletion semantics are as follows:
- Only skip truly running sessions: Combines
agents.get(id).status === 'running'withworkspace/session-activity(turn / job / subagent / schedule), sourced from the same admission check asWorkspace.archiveSession; only “loaded but idle” sessions can be deleted. - Keep archive records when sessions remain in memory: Avoids the scenario where unarchiving and then deleting files causes the session to reappear in the sidebar; if a session remains in memory after deletion, a “tombstone” remains in the archive set. The bottom of the page lists “Deleted residual records” separately, which can be cleaned up after restarting DSH.
- Broadcast
api-session/removedafter deletion: Allows the session list snapshot in already open windows to update immediately. - Delete session directories and projection caches: Located via paths like
sessionPersistence.locate(); projection caches prioritize storage domain deletion to avoid being overwritten by checkpoint writes after raw file deletion. - Do not delete global attachment object storage (
~/.dsh/attachments): Content-addressed shared objects may be referenced by other sessions.
List sorting is based on “Last Activity Time” (the maximum of title events, log mtime, and creation time) because the archive set does not store archive timestamps. There is no reverse operation for “restoring deleted sessions.”
Installation & Activation¶
Install from GitHub (Recommended)¶
The repository has committed the lib/ and client/ build artifacts, so no local build is required for installation from Git:
dsh plugin --profile desktop add github:YOGEMOW/dsh-archive-manager
After installation, open Settings → Archived Chats.
Install from Local Directory¶
If you modify the source code yourself, you need to build first before installing to the profile:
npm install
npm run build
dsh plugin --profile desktop add "<local-repo-path>"
Uninstall example:
dsh plugin --profile desktop remove dsh-archive-manager
Scope of Effectiveness¶
- Adding or replacing packages (changing
package.json, installing dependencies) requires a DSH process restart. - Changes to the host half
lib/index.jsare also only loaded on the next startup. - After rebuilding the client
client/client.js, open pages can be hot-updated viadsh-client-hmrpolling.
Optional Configuration¶
Configure in the profile’s cordis.patch.yml (example from README):
- id: dsh-archive-manager
name: "dsh-archive-manager"
config:
skipRunningSessions: true # Default true: skip active turns/jobs/subagents/schedules
maxDeleteBatch: 500 # Maximum number of sessions to delete per request
The old key skipLiveSessions is still compatible, but the semantics have changed from “skip loaded” to “skip running.”
Typical Usage¶
- Install the plugin via the command above and restart DSH (if just installed or host package changed).
- Archive sessions in DSH as usual (sidebar or existing archiving flow).
- Open Settings → Archived Chats.
- Use search, project, and range filters to find target sessions; use Unarchive when visibility needs to be restored.
- After confirming they are no longer needed, use single-row delete, batch delete, or “Delete All”; the interface will not send delete requests without a confirmation check. If prompted to skip running sessions, wait for turns/jobs to finish and try again.
- If “Deleted residual records” appear at the bottom, click “Clean Records” to remove tombstones from the archive set only after the session is no longer resident in memory (usually requires restarting DSH).
Use Cases & Notes¶
Who is it for
- People who use DSH for long-term agent or project development, have many archived sessions, and need centralized retrieval and organization.
- People who need to permanently delete disk sessions and projection caches within the archive scope to free up space (understanding that deletion is irreversible).
Please note before use
- The plugin runs with the current dsh process permissions. Deletion directly operates on directories and related caches under
<DSH_HOME>/sessions/; before installation, you should read the source code and the MIT license to confirm the behavior meets your backup and compliance requirements. - Running sessions (including jobs / subagents / schedules) will not be deleted; deleting sessions still resident in memory will leave tombstones that require a restart to clean up.
- The DSH ecosystem emphasizes “Everything is a plugin”; SkillHub is a community directory with no official affiliation with DeepSeek / Hithink RoyalFlush. The introduction in this article does not represent official endorsement.
Conclusion¶
dsh-archive-manager fills the gap in DSH regarding “centralized management of archived sessions” and “physical deletion”: the settings page handles search and operations, while the host side handles deletion orchestration consistent with the DSH archive model, session directories, and client lists. If you are already using DSH with the desktop profile, you can integrate it using the installation command in the README and maintain your archive pool in Settings → Archived Chats.
- Directory Page: https://www.skillhub.cn/plugins/YOGEMOW/dsh-archive-manager
- GitHub: https://github.com/YOGEMOW/dsh-archive-manager