Introduction¶
In DeepSeek Harness, after archiving a session, it usually no longer displays in its original workspace location; however, archiving is not equivalent to deleting a session. If you just want to retrieve this session without rebuilding it or manually modifying data, you need an explicit reverse entry.
The dsh-unarchive introduced below fills this gap: it adds a /unarchive command and an unarchive_session agent tool to DeepSeek Harness, removing the session from the registry-global archive set so it reappears in the workspace.
What Is This¶
- Maintainer:
edfrey0044 - License:
MIT - Positioning: Provides a plugin entry point for restoring archived sessions in DeepSeek Harness.
This plugin provides two entry points: one is the /unarchive command for humans, and the other is the unarchive_session tool for agents. Both move the session from the archive set back to the workspace instead of deleting the session or overwriting session logs.
Core Features¶
/unarchive Command¶
/unarchive is used to operate on archived sessions via the command entry.
- Without parameters: Lists archived sessions, returning the session ID and best-effort titles.
- With
<sessionId>: Restores this session.
You can first run /unarchive to see which sessions are archived, then run /unarchive <sessionId> to restore a specific session.
unarchive_session Tool¶
unarchive_session is exposed for agent invocation, behaving correspondingly to the command entry.
- Omitting
sessionId: Lists archived sessions. - Passing
sessionId: Restores a session.
If you are already in a session, you can also directly tell the agent:
Restore the archived session
The model will invoke unarchive_session. If you only want to view, omit sessionId; if you want to restore a specific session, pass sessionId.
Restoration Effects¶
The restoration effects of both entry points are:
- The session is live-restored to all connected GUI clients with the signal
host/archived-sessions-changed. - Changes survive restarts.
- The plugin does not touch session logs.
- The plugin does not touch workspace accounting slots.
Write Path¶
The plugin prioritizes using the core API:
workspaceRegistry.unarchiveSession
When the current build does not provide this API, it directly writes to the workspace domain:
archivedSessionIds
In other words, it directly modifies the same durable, live-updating archive set to make the session reappear.
Bundle Integration¶
The plugin declares:
dsh.bundle.patch
Therefore, when added to a profile in bundle form, the bundle patch is automatically added to the profile’s layer stack.
The plugin itself is self-contained, with no other extra requirements besides a standard DeepSeek Harness profile.
Installation and Activation¶
Install as a Profile Bundle¶
First, add the plugin to the profile:
dsh plugin --profile web add github:edfrey0044/dsh-unarchive
Then restart dsh web or your profile.
After executing the command above, the plugin enters the current profile as part of the profile bundle. Since it declares dsh.bundle.patch, the patch automatically participates in the combination according to DSH’s layer stack mechanism.
Manually Combine into Profile¶
If you do not use bundle installation but manually combine the plugin, you need to first add the dsh-unarchive insert line in the profile’s cordis.patch.yml, then install the package in the profile directory:
cd ~/.dsh/profiles/<name>
pnpm add github:edfrey0044/dsh-unarchive
After the steps above, the plugin enters the dependency and patch combination of that profile. Afterwards, restart dsh according to your profile’s startup method, for example, restarting dsh web.
Typical Usage¶
List First, Then Restore¶
The most common workflow involves two steps:
/unarchive
This step lists archived sessions.
/unarchive <sessionId>
This step restores the specified session so it reappears in its original position in the workspace.
Restore via Agent¶
If there are available agent tools in the current environment, you can directly instruct the agent to operate:
Restore the archived session
The agent will invoke unarchive_session. If you want it to check the archive list first, let it omit sessionId; if you already know which session to restore, let it pass sessionId.
Applicable Scenarios and Notes¶
Who Is It For¶
Suitable for developers or users of DeepSeek Harness, especially those encountering the following situations:
- Want to restore a session after it is archived but do not want to manually modify storage.
- Hope the agent can also complete the archive restoration via tools.
- Only need to restore the display set, without changing session logs or workspace accounting slots.
Security and Audit¶
The plugin runs with the permissions of the current dsh process. It is recommended to check the source code and license before installation. The current plugin license is MIT.
Stability Note on Direct Write Path¶
When the plugin takes the path of directly writing to the archivedSessionIds global of the workspace domain, the workspace registry’s in-memory cache will remain stale until the next restart.
During this window, two types of phenomena may be encountered:
- After refreshing the GUI, the session is hidden again.
- When subsequent archive or workspace changes occur, the session is archived again.
If you have just completed a restoration and find that the state has not stabilized, perform a dsh restart to align the registry cache with the durable archive set.
Optional Peer Dependencies¶
The plugin declares the following optional peer dependencies:
@deepseek-ai/cordis
@deepseek-ai/dsh-commands
@deepseek-ai/dsh-tools
@deepseek-ai/dsh-workspace
These dependencies are optional. The plugin itself only requires a standard DeepSeek Harness profile.
Conclusion¶
The value of dsh-unarchive lies in providing a controllable reverse entry for archiving: it does not delete sessions, does not touch session logs, does not touch workspace accounting slots, and only moves the session from the archive set back to the workspace.
GitHub Repository: https://github.com/edfrey0044/dsh-unarchive
Index Page: Refer to the dsh-unarchive entry in the current DSH plugins directory.