Introduction

The DeepSeek Harness (DSH) ecosystem follows the “everything is a plugin” philosophy, allowing users to extend functionality through plugins. In practice, WebUI process crashes, occupied ports, and browser-side anomalies are common failures. In such cases, session logs may remain intact on disk, but users can no longer continue interacting through the graphical interface.

dsh-rescue-tui is a minimal terminal maintenance entry point mounted on a DSH profile. It does not rely on complex third-party UI libraries; instead, it is implemented using native readline and ANSI, enabling it to take over sessions directly when the WebUI is unavailable. The plugin is maintained by marshfolx, follows the MIT license, requires zero core changes, and can be used immediately after installation.

Core Features

The plugin mainly addresses session continuation, permission control, and model adjustment when the WebUI is unavailable:

  • Session continuation: After startup, it lists historical sessions (prioritizing the current workspace), and users can resume by pressing a numeric key. Sessions without titles automatically use an excerpt of the first user prompt as the title; incomplete turns caused by crashes are automatically synthesized and closed by the persistence layer.
  • Three-level permission inheritance: It mounts sandbox-policy, approval, and permission-presets as-is. By default, it inherits workspace-write (writes are limited to the workspace) + ask approval; out-of-bounds operations trigger a terminal y/N prompt.
  • Model and inference control: It supports dynamically listing and switching model routes via /model (while preserving historical logs), and adjusting inference effort via /effort (low/high/max/off), allowing compute resource allocation to change without switching models.
  • Network and tool trimming: It includes a built-in, custom anonymous HTTP fetch provider to supplement web_fetch (supporting HTML→markdown conversion and truncation control). It also retains basic tools such as pwsh/bash, fs editing, todo, and jobs, while disabling collaborative tools such as subagent/workflow/ralph/goal/plan-mode/skills, focusing on single-user rescue scenarios.

Installation and Activation

Prerequisites: Node.js ≥ 22, the official @deepseek-ai/dsh CLI, and pnpm ≥ 10.

Installation Command

Using the installation script provided by the plugin, specify the GitHub repository address to create the rescue profile:

node dsh-rescue-tui/scripts/install-profile.mjs --package "github:marshfolx/dsh-rescue-tui"

Start the Plugin

After installation, use the following command to activate the profile:

dsh --profile rescue

Usage

After entering the TUI, the interface displays the session list. Users can perform operations with the following commands:

  • Session management: /sessions returns to the list; /new creates a new session; /exit exits.
  • Permission switching: /perm views the current and available presets; /perm read-only / workspace-write / danger-full-access switches permission modes.
  • Model and effort: /model lists all groups in the llm-pi-ai catalog; /model opencode/mimo-v2.5-free switches the model; /effort views and sets the effort.
  • Approval interaction: Out-of-bounds operations during an active turn require direct y or n input to confirm; when idle, use /y or /n to pre-answer the next approval.

Ecosystem and Background

The architectural design of DSH gives it a high degree of flexibility. The community catalog for this plugin is located at https://www.skillhub.cn/plugins/marshfolx/dsh-rescue-tui. It is important to note that the community catalog and this plugin have no official affiliation with DeepSeek or High-Flyer AI, and are purely the products of community collaboration.

Notes

When using this plugin, be aware of the following known limitations:

  1. Log conflicts: If the WebUI backend process is still running, do not resume the same session in both the TUI and WebUI at the same time; otherwise, it can cause dual-write conflicts in append-only logs.
  2. Rendering limitations: The fetch provider has no JavaScript rendering capability and cannot obtain dynamic content from SPA pages. If you need to handle such pages, it is recommended to use pwsh scripts with curl as a fallback.
  3. Dependency versions: Peer dependencies must be aligned with @deepseek-ai/*@^0.1.1-rc.2; regression testing is required after major version upgrades of the harness.
  4. Platform differences: On Windows, bash lines are automatically disabled by base platform gating (with the pwsh stack taking over); POSIX systems behave the opposite way.

Conclusion

dsh-rescue-tui provides a low-cost solution for restoring workflows in extreme environments. By mounting as a plugin, it gives DSH terminal maintenance capabilities without modifying core code, making it suitable for remote maintenance, low-spec environments, or emergency rescue scenarios.

For more details and source code, see:
* GitHub repository
* Community catalog page