Preface

DeepSeek Harness (DSH) is a plugin-architecture-based agent runtime platform. In long-running or complex tasks, the model may be unexpectedly interrupted due to resource limits. The dsh-survival-mode plugin introduces a global lifeline to DSH: the entire DSH instance shares a single saturation and health pool. Its core purpose is to fully separate “stopping task execution” from “rejecting user input”—hunger freezes tool calls, while conversation always remains open.

Core Mechanisms

The plugin controls runtime state through the following mechanisms:

  1. Thinking billing: Each thinking step consumed by the model reduces saturation. Deductions are deduplicated by (session, turn, step), and retries do not double-charge.
  2. Zero-saturation damage: The moment saturation reaches zero, 1 health point is immediately deducted, and health then continues to decrease at a preset cadence.
  3. Starvation shutdown: When health reaches zero, tool calls from all sessions are rejected (except survival_feed), but conversational capability is preserved.
  4. Feeding revival: Feed the instance via the panel or tools. Only a golden apple can revive it while starvation has occurred (apple and bread are ineffective).
  5. Conversation rescue: While in the starvation state, a user message triggers health recovery and clears the starvation state, ensuring the user is not locked out of the session.

Presets and Configuration

The plugin provides three presets, allowing one-click switching of an entire rule set (not just a single numeric adjustment):

  • Simple: Deducts 4 saturation per step, with a cap of 200, a health cap of 16, and a damage cadence of 6 seconds/−1❤.
  • Normal: Deducts 6 saturation per step, with a cap of 150, a health cap of 12, and a damage cadence of 4 seconds/−1❤.
  • Hard: Deducts 10 saturation per step, with a cap of 80, a health cap of 8, and a damage cadence of 2 seconds/−1❤.

The ⚙ custom option in the top-right corner of the panel allows adjusting the deduction per thinking step, the saturation cap, the health cap, and the damage interval. After manually changing any parameter, the preset buttons will no longer be highlighted.

Installation and Enablement

The installation command is as follows:

dsh plugin --profile web add "github:X1A0BAN/dsh-survival-mode"

Notes:
* Requires DSH >=0.1.0-rc.5 and Node >=22.19.0.
* Windows users should not use the & separator; otherwise, the error ERR_PNPM_INVALID_DEPENDENCY_NAME may be reported.

Usage

  1. Tool call: The plugin registers a model-callable tool named survival_feed, with parameters supporting apple / bread / golden_apple.
  2. Panel operation: Click the gear icon in the top-right corner of the DSH panel to adjust parameters.
  3. MC mini-game: The panel provides “⛏ Open MC gathering mini-game”, including scenes such as trees, villagers, a crafting table, mining, and more, for obtaining food.
  4. Food rules: Feeding is not allowed when saturation is full; only a golden apple can revive the instance during starvation.

Technical Details

  • Texture assets: Uses original Minecraft textures with zero runtime dependencies. Mojang owns the copyright, and this repository retains them as required by the owner.
  • Data sharing: All sessions share one saturation pool; opening multiple sessions consumes resources collectively.