ChatGPTClaudeGrok / X / CursorGemini

dsh-session-tidy: A DSH plugin that truly deletes sessions and single turns in DeepSeek Harness

weivc/dsh-session-tidy

Sessions & MessagesVerified
Listed on 2026-10-26
Page last updated 2026-11-05

A DSH plugin for DeepSeek Harness that permanently deletes whole sessions or a single turn, with confirmation prompts and automatic log backups.

dsh-session-tidy is a session-cleanup DSH plugin for DeepSeek Harness, built for people whose session list keeps growing and whose individual turns cannot be removed. It applies deletions directly to host storage instead of hiding or archiving, so removed content no longer lingers in the session list. Whole-session deletion clears the log, projection cache, and workspace registration together, while single-turn deletion rewrites the log and renumbers later turns. Every action asks for confirmation, single-turn deletions back up the original log first, and forked sessions, running turns, and concurrent deletions are conservatively refused.

How to Install

install
dsh plugin --profile <your-profile> add github:weivc/dsh-session-tidy

Replace --profile with the profile name you actually run (see ls ~/.dsh/profiles/): usually web in the browser UI, desktop or desktop-NNN in the desktop app.

Category
Sessions & Messages
Platform
DSH Plugin
Author
weivc
Distribution
Plugin

dsh-session-tidy Key Features

Delete an entire sessionDelete a single turnConfirmation before deletionAuto-backup logs before deleteRefuse unsafe deletions
Listed on dsh-plugin.org

dsh-session-tidy Repo Summary

What Does It Do?

Session Tidy is a DSH plugin for DeepSeek Harness that deletes whole sessions or just a single turn inside a session. It solves the problem of sessions piling up and individual turns being impossible to remove: deletions land directly on the host storage rather than hiding or archiving anything. Every deletion asks for confirmation first, and single-turn deletions back up the original log before writing. It is maintained by weiVc under the MIT license.

Core Features

  • Delete a whole session: from the "⋯" menu on a session row in the left sidebar, permanently remove that session's log, projection cache, and workspace registration.
  • Delete a single turn: a small button at the end of any completed turn removes that turn's user message, steps, tool calls, and answer from the log, while later turns are kept and renumbered.
  • Stop before deleting: for a running session the plugin first cancels the turn, waits for silence, and detaches the Agent before touching files.
  • Safety checks and backups: three-level realpath validation of the session directory, log header.id validation, rejection of symlinks pointing at other sessions, and a backup of the original log before each single-turn deletion, followed by a full replay check with the official Session.
  • Conservative refusal: forked sessions, running turns, and concurrent deletions of the same session are rejected, and references that cannot be safely remapped cause the deletion to be refused with the log left untouched.

How to Use This Plugin?

Once enabled in DSH, delete entry points appear only where they are needed: to clear a whole session, choose "Delete session…" from the "⋯" menu on its row in the left sidebar; to remove one turn, click "Delete this turn" at the end of that turn. Each action opens a confirmation dialog with a danger-colored button and is locked while busy. Single-turn deletion only works with the official JSONL session store; other backends return "unsupported". Deletions are irreversible except for the single-turn backup, and other open client windows may show stale content until the page is refreshed.

How to Troubleshoot This Plugin?

When a deletion is refused, check the reason first: forked sessions (including inherited prefixes) do not support single-turn deletion yet, so handle child sessions first; running turns cannot be deleted until the turn finishes; concurrent deletions of the same session are rejected, so retry later. An "unsupported" message means the current session backend is not the official JSONL store, and the plugin will not risk deleting. Stale content in other windows after a single-turn deletion is expected; refresh the page or reopen the session, and use the original log in the backup directory for manual recovery if needed.

This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: weivc/dsh-session-tidy. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.

Install, update, and uninstall this plugin in the Plugin Market of DeepSeek Harness's DSH Plugin Hub
ChatGPTClaudeGrok / X / CursorGemini

DSH Plugin FAQ